xsl-list
[Top] [All Lists]

Re: [xsl] Avoiding boneheaded mistakes in XSLT?

2010-12-30 07:48:32

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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--