OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: RE: [xml-dev] XPath/XSLT 2.0 concerns

[ Lists Home | Date Index | Thread Index ]

Mike Champion wrote:

> I've heard talk about an XSLT "lint" that would catch this kind of error
> with knowledge of the input schema/dtd but without static typing built deep
> into XLST or reference to types in the stylesheet.  Is such a thing
> just a thought experiment, or has anyone done such a thing?


Yes, I have (probably not the one you've heard of though since I've
never made it public). It works along the following lines:

Transform the input stylesheet into a new xml document where each
XPath expression and pattern has been turned into an XML structure.
Apply a second transform to this document which also reads a schema
(RELAX NG in my case). The result of  this transformation is an
enumeration of patterns and XPath expressions found in the input 
stylesheet, which can never match or select nodes in a document which
is valid against the input schema.

As you point out this is done without any schema or static typing
knowledge built into XSLT. So this kind of static checking is really not
an argument to build schema support into XSLT.

Cheers,
David

----------------------------------------------------
David Rosenborg
Pantor Engineering AB






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS