w3c / qt3tests

Tests for XPath and XQuery
27 stars 17 forks source link

fn-transform-68 test should use a test method valid in all versions of Saxon #44

Open alanpaxton opened 2 years ago

alanpaxton commented 2 years ago

The test is testing for the vendor field being correctly recognized as - 'vendor' : 'Saxonica' - we are using SaxonHE in the eXist implementation of fn:transform, and the vendor string returned from Saxon matches; therefore we attempt to compile and run the stylesheet. Doing so,

the template used in this test:

<xsl:template name='main'>
              <out><xsl:value-of select=""saxon:in-summer-time(xs:dateTime('2016-07-01T00:00:00'), 'Europe/London')""/></out>
            </xsl:template> 

causes an error when run using Saxon HE: QueryError(FOXT0003,err:FOXT0003 Errors were reported during stylesheet compilation.

Further digging suggests that saxon:in-summer-time is restricted to Saxon EE. Presumably therefore the test passes when run with a version of Saxon EE.

We suggest that the test be modified to use a function valid in all versions of Saxon.

michaelhkay commented 2 years ago

This isn't easily achieved because essentially all Saxon extensions to the W3C specs require Saxon-PE or -EE. I'm inclined to add a dependency on schema-awareness or streaming.

michaelhkay commented 2 years ago

I think the simplest fix is to allow an error code of XPST0017, which is what will be thrown if Saxon-HE is invoked.

alanpaxton commented 2 years ago

Thanks, we can proceed on the assumption that XPST0017 is valid