[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: RE: XPath/XSLT 2.0 concerns
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|