This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: mystery #1: document() without validation
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Sat, 13 Apr 2002 16:38:10 +0100
- Subject: RE: [xsl] mystery #1: document() without validation
- Reply-to: xsl-list at lists dot mulberrytech dot com
> Can I force Xalan's implementation of document() to instance a
> /non-validating/ parser?
>
Xalan supports the JAXP interface. It will probably load whatever parser is
identified by the javax.xml.parsers.SAXParser system property.
If you want to be more specific, you can write a URIResolver, which will be
called to process the URI passed to the document() function. Your
URIResolver can return a SAXSource object which contains a parser; the XSLT
processor will use this parser to process the supplied document. This allows
you to pre-configure the parser with the options you want, for example
switching validation on or off, and your code should work with any
JAXP-conformant XSLT processor.
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list