Re: Avoiding boneheaded mistakes in XSLT?
What is useful, has already been provided by SA processors for years.I'm glad you think so, but I think there are still opportunities to get better.
For example, Saxon 9.3, when you call an unknown function, tries quite hard to discover what you did wrong - for example, it will recognize common misspellings of the Saxon namespace. Improving the diagnostics here reduces the number of support calls. Similarly, the schema validator when it encounters an element name that is not allowed in a particular position tries to work out whether you spelt the element name wrong or used the right element name in the wrong place. I think there's an inexhaustible number of refinements that can be made to improve feedback for people who make mistakes, and I shall keep trying!
Producing warnings for constructs that could be correct comes into a different category. Saxon has always produced some such warnings for things that are obviously wrong, even though legal (for example @A/@B), and I think there is plenty more scope to be smarter. For example, If someone writes book/isbn when the schema (or indeed the instance) contains book/@isbn, I think the probability that this is incorrect is sufficiently high to justify a warning, provided it can be suppressed at user option.
Michael Kay Saxonica
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