[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Schema aware transformations

Subject: Re: Schema aware transformations
From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx>
Date: 22 Jun 2005 17:56:03 +0100
paul adams property investment
>>>>> "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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.