xsl-list
[Top] [All Lists]

Re: [xsl] Avoiding boneheaded mistakes in XSLT?

2010-12-29 07:10:08
Dave Pawson wrote:

On Tue, 28 Dec 2010 23:13:01 +0000
Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:

I think the main reason for the problem is that an XSLT/XPath
program makes many references to names (of elements and attributes)
which do not have to be declared, so that using an incorrect name
is not an error (either static or dynamic), but rather results in
an XPath expression that simply selects nothing.

I guess no one would do that deliberately? 
Yet the rec and implementations don't provide any error | warning 
about it?

It would be nice if processors would have a debug mode in which XPath 
expressions would be checked against a schema or DTD and give a warning when 
some 'impossible' expression is encountered. Impossible meaning something that 
never can give a non-empty result on valid documents. Probably just paths that 
are illegal according to the schema.
-- 
Piet van Oostrum
Cochabamba. URL: http://pietvanoostrum.com/
Nu Fair Trade woonartikelen op http://www.zylja.com

--~------------------------------------------------------------------
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>
--~--