Evaluation model ambiguity in XPath/XSLT

Two important characteristics of the XPath evaluation model
can only be found in the XSLT Recommendation.

1. XSLT 14.2, para 2 states that:

   "If such an extension function occurs in an expression and the extension
   function is actually called, the XSLT processor must signal an error.
   An XSLT processor must not signal an error merely because an expression
   contains an extension function for which no implementation is available."

Note the wording: "If [...] the extension function is actually called."
This implies that XPath engine of an XSLT processor must allow expressions
such as:

    true() or an-unknown-function()
    para[false()][an-unknown-function()]

to be _evaluated_ because the function "an-unknown-function()" can
never be called. If the intention of the XSLT and XPath editors
is to forbid this, the wording should be changed to:

    "If such an extension function occurs in an expression and the
    _expression_ is actually _evaluated_, the XSLT processor must
    signal an error."

making the above would be illegal. If the intention of the XSLT and XPath
editors is to allow the currently-documented behaviour, then I suggest
that it should be documented in the XPath Recommendation, rather than
in the XSLT Recommendation, that function resolution and, by extension,
function argument type-checking, must be lazily evaluated; it is
inappropriate to leave this to be discovered in the dependent Recommendation.

2. The definition of the extension function "system-property()" [XSLT 12.4] as:
    "object system-property(string)"
implies that the XPath data model is based on a dynamic type system.

Unfortunately, there is no hint in XPath that developers must cater for
dynamic typing; indeed, system-property() is at present that only aspect
of either XPath and XSLT that would require it.

Given that the requirement to support dynamic typing imposes quite
distinct design and implementation constraints on the development
of an XPath engine, again it seems inappropriate to leave this fact
to be discovered in the Recommendation that may well not be
implemented until after completion of an XPath engine.


Michael Fuller
____________________________________________
http://www.mds.rmit.edu.au/~msf/
Multimedia Databases Group, RMIT, Australia.

Received on Friday, 4 February 2000 22:10:21 UTC