This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Schema for Validating XSLT-Stylesheets
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Schema for Validating XSLT-Stylesheets
- From: Taras Tielkes <taras at info dot nl>
- Date: Fri, 12 Oct 2001 14:53:38 +0200
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi,
Here's another one:
http://lists.w3.org/Archives/Public/xmlschema-dev/2000Apr/0011.html
// tt
> -----Original Message-----
> From: Jeni Tennison [mailto:jeni@jenitennison.com]
> Sent: Thursday, October 11, 2001 7:30 PM
> To: Sebastian Thoene
> Cc: xsl-list@lists.mulberrytech.com
> Subject: Re: [xsl] Schema for Validating XSLT-Stylesheets
>
>
> Hi Sebastian,
>
> > Is there any XML-Schema conforming with the latest XML-Schema
> > Specification (ideally 2001), we could use to validate the
> > stylesheet? Or does anybody know another method to validate a
> > stylesheet with Xerces (or Xalan)?
>
> Searching for "XML Schema for XSLT" on Google produced the following
> article, which contains a link to an XML Schema for XSLT
>
> http://www.xmlhack.com/read.php?item=1143
>
> Usually running an XSLT stylesheet against any document (even itself)
> using an XSLT processor (e.g. Xalan) will tell you if anything's
> syntactically wrong with the stylesheet, which is all that a schema
> will really be able to tell you anyway.
>
> > Our special problem is that we want to validate an XML-Document, in
> > which we have embedded some XSL-Tags. The parser cannot validate the
> > whole document, if it cannot validate the XSL-part, can it?
>
> This is really a schema question, but often it can. What you need to
> do is to add an xs:import element to the schema to reference a
> (non-existant) XSLT schema:
>
> <xs:import namespace="http://www.w3.org/1999/XSL/Transform" />
>
> Then, whenever there's somewhere that XSLT elements might go, you can
> use the xs:any element to represent XSLT elements. Tell the schema
> validator not to bother validating them by adding a processContents
> attribute with a value of 'skip':
>
> <xs:any namespace="http://www.w3.org/1999/XSL/Transform"
> maxOccurs="unbounded"
> processContents="skip" />
>
> or if there are specific XSLT elements that need to be incorporated,
> I *think* you can include references to them and because you haven't
> actually provided a schema for them, it will skip over them:
>
> <xs:element ref="xsl:value-of" />
>
> But you'd be better off asking about this on xmlschema-dev@w3.org.
>
> I hope that helps,
>
> Jeni
>
> ---
> Jeni Tennison
> http://www.jenitennison.com/
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list