xsl-list
[Top] [All Lists]

RE: using xsl:message

2004-10-24 11:26:43
I think that a failure from the doc() function should be a 
fatal error, for
two reasons: 

I've now established that the reason the error isn't fatal is that it occurs
while evaluating a pattern in a template rule.

This is a tricky area of the spec. Because we can't legislate which patterns
are evaluated against which nodes, it's hard to ensure that a pattern such
as

match="*[. = '']"

doesn't get evaluated against an element whose value is (say) a number,
which would cause an error. The spec therefore says that errors that occur
while evaluating a pattern are recoverable. What's happened here is that the
global variable is evaluated during the matching of a pattern, and the error
in evaluating it is therefore treated as non-fatal.

This doesn't feel quite right: although Saxon evaluates global variables on
first reference, it should probably behave as if it didn't, in which case
this would be a hard error. But it's not immediately obvious how to achieve
that... In the meantime (having fixed the spurious "circularity" messages),
I think the behavior is conformant.

Michael Kay
http://www.saxonica.com



<Prev in Thread] Current Thread [Next in Thread>