Source Documents on the Command Line
When Saxon (either XSLT or XQuery) is invoked from the command line, the source document will normally be an XML 1.0 document. See also XML 1.1.
If a custom parser is specified using the
-x option on the command line, then
the source document can be in any format accepted by this custom parser. The parser must behave as a
SAX2 parser, delivering a stream of events that define a
virtual XML document. For example, the TagSoup parser can be used to feed an
HTML document as input to Saxon.
Non-standard input formats can also be handled by specifying a user-written
URIResolver (Java) or
-u option is used on the command line, or if
the source file name begins with
classpath:, then the source file name is resolved
With SaxonJ, the
URIResolveris called, and returns a JAXP
Sourceobject; if a user-written
URIResolveris nominated (using the
-roption) then this may translate the file name into a
Sourceobject any way that it wishes.
With SaxonCS, it is not currently possible to nominate an
XmlResolverwhen running from the command line; the default Saxon-supplied