[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: document('') in XSLT 2.0 validation mode

Subject: RE: document('') in XSLT 2.0 validation mode
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 9 Jan 2006 21:53:41 -0000
document in xslt
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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.