This page in the documentation:

attempts to give the correspondence between command line parameters and feature keys that can be passed to the Configuration class (or the s9api Processor or JAXP TransformerFactory). Following the links will also cross-reference details of corresponding entries in the Saxon configuration file.

So -dtd:on corresponds to FeatureKeys.DTD_VALIDATION = true, -expand:off corresponds to FeatureKeys.EXPAND_ATTRIBUTE_DEFAULTS = false, and warnings:fatal corresponds to FeatureKeys.RECOVERY_POLICY = net.sf.saxon.Configuration#DO_NOT_RECOVER.

You can use these settings with the TransformerFactory.setAttribute() method.

Michael Kay

On 19/06/2012 14:38, Paul M wrote:

I hava successfully used the following on command line in script
with -expand:off

Now I have Java app and am using:
javax.xml.transform.Transformer (net.sf.saxon.Controller )

It is not clear how I would go about setting the arguments above within java class.
Any expansion is appreciated.


Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 

saxon-help mailing list archived at