Fwd: [xsl] XSLT 3.0 and XML Schema version

Subject: Fwd: [xsl] XSLT 3.0 and XML Schema version
From: "Sean B. Durkin" <sean@xxxxxxxxxxxxxxxxx>
Date: Wed, 20 Nov 2013 21:16:54 +1100
If I feed the following stylesheet into an XSLT 3 processor, will the output be implementation dependant?

<xsl:stylesheet
  version="3.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:xs="http://www.w3.org/2001/XMLSchema";
  xmlns:fn="http://www.w3.org/2005/xpath-functions";
  exclude-result-prefixes="xsl xs fn">
 <xsl:output omit-xml-declaration="yes" />

<xsl:variable name="SomeDate" as="xs:date" select="xs:date('-0001-03-01')" />

<xsl:template match="/">
<aYearLater><xsl:value-of select="$SomeDate + xs:dayTimeDuration('P365D')" />
</aYearLater>
</xsl:template>


</xsl:stylesheet>

This question really boils down to: Are compliant XSLT 3.0 processors required to respect a specific version of XML Schema?, or is the implementer free to choose? My reading of the XSLT 3.0 spec (draft 10) says the are free to choose, however I could easily be mistaken about this. The spec is replete with many references to XSD 1.1, and none to XSD 1.0 . XSD 1.0 is not even listed in the normative references, which one could interpret as a rule that a compliant processor must respect XSD 1.1, and not XSD 1.0 .

If the XML processor under the XSLT processor respects XSD 1.0, then, by my calculations, the output should be ...

<aYearLater>0001-02-29</aYearLater>

... but if XSD 1.1, then it should be ...

<aYearLater>0000-03-01</aYearLater>

On a side note, if you change the xsl:stylesheet/@version to 2.0 and feed the stylesheet to Saxon HE 9.5, then you get output ...

<aYearLater>0001-03-01</aYearLater>


Faithfully, Sean B. Durkin

Current Thread