[XSLT 2.0] Dynamic errors in patterns

In 5.4 we currently have a rule that says that evaluating the pattern "/"
against an orphan element node will not throw an error, but will return
false.

 

I believe we need to generalize this rule so that all dynamic errors that
occur while evaluating a pattern are masked, and treated as if the pattern
returned false. This is because it is not possible for the user to predict
which patterns will be applied to which nodes, and writing patterns that
will never fail can be quite difficult.

 

For example:

 

*	the pattern match='*[. = ""]' will give an error if applied to an
element whose typed value is a date, or to an element with element-only
content

 

Michael Kay

Received on Saturday, 6 March 2004 02:57:09 UTC