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

Re: Avoiding boneheaded mistakes in XSLT? (to warn or

Subject: Re: Avoiding boneheaded mistakes in XSLT? (to warn or not to warn)
From: Emmanuel Bégué <eb@xxxxxxxxxx>
Date: Thu, 30 Dec 2010 09:25:17 +0100
Re:  Avoiding boneheaded mistakes in XSLT? (to warn or
I hope I won't get hit on the head with a stick for doing this, but
I'd like to weight in on the "warning" side.

Greg's arguments revolve around the fact that an instance of a schema
that allows optional elements may or may not have those elements; when
optional elements are not present, it's not an error of any kind, so
"reporting" it would be misleading at best and extremely annoying at
worst.

And of course, when there is no schema then everything is
possible/optional, so there is even less rationale to report anything.

But, there are many cases where one is processing an XML file that has
been produced specifically for the job at hand; it's the only
representation of its kind and there will never be "other instances"
of the same structure.

Therefore the transforms are specific to this one instance, and they
are written so that every template should actually select something
(because they will not be executed against another instance, and if
they don't match something this time around then they are entirely
useless).

Wouldn't it be useful to have a switch that said "for this transform,
I expect all my templates to select something; please tell me at the
end of the transformation the ones that were not run"?

Or is it more the job of an IDE?

Regards,
EB

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.