Bug 20843 - [XT3TS] function-1902
[XT3TS] function-1902
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 Test Suite
Candidate Recommendation
PC Windows NT
: P2 normal
: ---
Assigned To: Abel Braaksma
Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
  Show dependency treegraph
Reported: 2013-02-01 11:09 UTC by Tim Mills
Modified: 2015-03-31 01:28 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Tim Mills 2013-02-01 11:09:10 UTC
This test looks up function names, such as fn:nilled, but 'fn' is not an in-scope namespace prefix.
Comment 1 Michael Kay 2013-02-04 22:52:56 UTC
Updated the test to match the revised input document.
Comment 2 Tim Mills 2013-02-05 16:59:55 UTC
Comment 3 Tim Mills 2015-03-23 16:07:36 UTC
The intent of this test is to

"Test that all functions defined in the F+O 3.0 specification are NOT implemented in a 2.0 processor."

It expects that no "missing-function" elements will be generated.

A missing-element is generate if a function in the 'fn' namespace is _not_ available.

      <xsl:if test="if(@name/starts-with(., 'op')) then function-available(@name, @arity) else not(function-available(@name, @arity))">
            <missing-function name="{@name}" arity="{@arity}"/>
            <xsl:message expand-text="yes">*** Missing function name={@name} arity={@arity}</xsl:message>

For the input line:

   <function name="fn:node-name" arity="0"/>

one would expect an XSLT 2.0 processor to return false for

function-available("fn:node-name", 0)

and therefore this would generate a missing-function element in the output and therefore the assertion 


would fail.

The input data also includes some functions which have been moved from XSLT 2.0 into F&O 3.0 (e.g. format-number).
Comment 4 Abel Braaksma 2015-03-31 01:28:01 UTC
Thanks for reopening this bug-report. I've fixed as follows:

* Added XSLT 2.0 functions (so that they can be excluded)
* Updated the autogen XSLT file (based on the spec XML)
* Fixed some other minor errors (wrong path) in all three autogen XSLT
* Changed the test to create useful XML output and changed the assertion to match it
* Changed version from 3.0 to 2.0

Running it now against Saxon in 2.0 mode shows that at least my version of Saxon supports the math functions and some newly added constructor functions from XP30.

I believe the list of functions is now comprehensive and correct, but I have not checked them one by one against all three specs (they are generated).