[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Schema aware transformations
>>>>> "Andrew" == Andrew Welch <ajwelch@xxxxxxxxxxxxxxx> writes: >> To get the real benefit of schema-aware XSLT processing, you >> really need to start defining match patterns in terms of >> schema-declared elements and types, for example >> >> <xsl:template >> match="schema-element(invoice)/delivery-address/postcode"> Andrew> [snip] >> It's a fair investment to get started (time learning the ropes, >> and time establishing schemas for all your documents) but once >> you're over the curve, it makes the debugging cycle a >> completely different experience - instead of wrong or absent >> output, you get accustomed to expecting early error messages, >> often at compile time. Andrew> The problem here is that template Andrew> match="schema-element(abc)" gets rejected by the non-SA Andrew> processor. You can work round this, using xsl:use-when, combined with the system-property function (testing the xsl:is-schema-aware property), to write stylesheets that will use the SA functionality if it is available, and if not, degrade to basic functionality. Of course, this means more work in writing the stylesheet in the first place. -- Colin Adams Preston Lancashire
|
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
|