|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Apply-templates - how to omit top level element ta
> XSL is fragile because you can break things by messing > around? That's pretty much true of any complex system. Yes: though more true of some systems than of others. XSLT 1.0 is designed with a rather different notion of robustness than many other languages: it's designed on the principle that if you hit something unexpected in the input, you should struggle on to produce some kind of output rather than catching fire and printing a stacktrace on the poor user's screen. There are times when this is quite a good idea. But it does have the consequence that writing incorrect code often causes the stylesheet to produce garbage output. Other languages have a different notion of robustness: incorrect code should wherever possible produce an error message to tell you what you've done wrong. XSLT 2.0, especially if you opt for schema-awareness, has swung a long way towards this more conventional definition of robustness. Write a schema describing the input document, and a schema describing the output document, and write your stylesheet code to be schema-aware, and you will find that many of your coding errors are detected at compile time, or failing that at run-time. If this is a style you are more comfortable with, give schema-aware XSLT a try, and tell us how you get on. Michael Kay http://www.saxonica.com/
|
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
|

Cart








