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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

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

[ Lists Home | Date Index | Thread Index ]

Hi David!

>> 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.

Wow, that sounds great! Can you be persuaded to make it public, or is
it something that you're building into a commercial tool?

> 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.

And it's something that's used at *design time*, to help the
programmer create a better stylesheet, rather than at *run time* to
hide the mistakes that they've made. That seems really beneficial to
me.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/





 

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

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