Subject: RE: [xsl] document('') in XSLT 2.0 validation mode From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Mon, 9 Jan 2006 21:53:41 -0000 |
When you use document('') you're accessing the stylesheet in the same way as any other source document, and if you specified -val on the command line then schema validation will therefore be attempted. If you want to validate some documents but not others then you can specify -vlax on the command line to request lax validation - this means that validation takes place if a schema can be located, and not otherwise. Alternatively you can control validation on a per-document basis by using query parameters in the URI: see http://www.saxonica.com/documentation/sourcedocs/validation.html I haven't actually tried writing document('?validation=strip') but it should be possible in theory. Using global variables in a stylesheet is likely to perform much better than re-reading the source stylesheet at run-time. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Florent Georges [mailto:darkman_spam@xxxxxxxx] > Sent: 09 January 2006 21:12 > To: XSL Mulberry list > Subject: [xsl] document('') in XSLT 2.0 validation mode > > Hi > > In an XSLT 2.0 script, in validation mode (with Saxon-SA), I access > data embedded in the stylesheet, with: > > document('')/*/wel:i18n > > But Saxon says: > > Recoverable error on line XXX of file:/...: > FODC0005: ValidationException: Cannot validate > <stylesheet>: no element declaration available > > Is it the expected behaviour? How can I supress the validation on > the xsl:stylesheet element? Indeed, I could use an xsl:variable > instead of an extension element here (and I think I'll do that). But > I'm curious... > > Regards, > > --drkm > > > > > > > > > > > > > > > > > > > > > > > > ______________________________________________________________ > _____________ > Nouveau : tiliphonez moins cher avec Yahoo! Messenger ! > Dicouvez les tarifs exceptionnels pour appeler la France et > l'international. > Tilichargez sur http://fr.messenger.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] document('') in XSLT 2.0 vali, Florent Georges | Thread | Re: [xsl] document('') in XSLT 2.0 , David Carlisle |
[xsl] document('') in XSLT 2.0 vali, Florent Georges | Date | Re: [xsl] document('') in XSLT 2.0 , David Carlisle |
Month |