xsl-list
[Top] [All Lists]

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

2006-01-09 14:53:41
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(_at_)yahoo(_dot_)fr] 
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 : téléphonez moins cher avec Yahoo! Messenger ! 
Découvez les tarifs exceptionnels pour appeler la France et 
l'international.
Téléchargez sur http://fr.messenger.yahoo.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>