Configuration from the command line
The main command-line interfaces to Saxon are net.sf.saxon.Transform
for running a transformation, net.sf.saxon.Query
for running XQuery, and com.saxonica.Validate
for validating a document against a schema. These
commands allow many configuration options to be specified by command line options: for example if XML Schema 1.1 support is wanted, all three
commands allow this to be requested using the option -xsdversion:1.1
. Many of these options correspond directly to the configuration
properties available on the Configuration
object.
For more specialized options, there is also a fallback mechanism. Each configuration property has a URI, which is always of the form
http://saxon.sf.net/feature/SOME_NAME
. Provided the property allows a string value (as most do), the property can be set from the
command line using the syntax --SOME_NAME:value
. For example the property identified by FeatureKeys.LICENSE_FILE_LOCATION has the URI
http://saxon.sf.net/feature/licenseFileLocation
, and it can therefore be set on the command line using an option such as
--licenseFileLocation:c:/saxon/license.lic
.