RE: [xsl] XSLT 2.0 XML Schema definition (.xsd)

Subject: RE: [xsl] XSLT 2.0 XML Schema definition (.xsd)
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 28 Feb 2008 10:52:04 -0000
> Thanks! In order to use an XSLT processor for validating a 
> stylesheet, the imported/included stylesheets have to be 
> available, haven't they? Or can I validate a stylesheet 
> without compiling it?
> 
You could use a URIResolver to return dummy modules for the
included/imported components. But then there's a risk that the module would
be reported invalid when it is actually valid (e.g. if it calls an included
component using call-template). It could also be reported as valid when it
actually contains static errors (e.g. an xsl:decimal-format definition that
conflicts with one in an included module).

Of course you could try and define some concept of "local validity" for a
stylesheet module that allows it to be checked in isolation - but you'd be
checking it on your own terms, not against any criteria defined in the
specification. The only reliable way to detect all static errors defined in
the language specification is to use an XSLT processor for the job.

Michael Kay
http://www.saxonica.com/

Current Thread