This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The errata http://www.w3.org/XML/2007/qt-errata/xslt-errata.html#E28 corrects the inline schema example to <xsl:import-schema> <xs:schema targetNamespace="http://localhost/ns/yes-no" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:simpleType name="local:yes-no"> <xs:restriction base="xs:string"> <xs:enumeration value="yes"/> <xs:enumeration value="no"/> </xs:restriction> </xs:simpleType> </xs:schema> </xsl:import-schema> <xs:variable name="condition" select="local:yes-no('yes')" as="local:yes-no"/> That still has two errors in my understanding, the obvious is that the variable declaration needs to use xsl:variable, not xs:variable, and in my understanding the type needs to be defined as <xs:simpleType name="yes-no"> without a prefix, as http://www.w3.org/TR/xmlschema-1/#declare-datatype defines the name as an NCName, not as a QName.
You are quite correct. For the F+O spec I have added automated testing of examples to the build process for the spec. It's trickier to do for the XSLT spec because the examples are usually fragments, but there would clearly be value in doing it.
At the 20 May 2010 the XSLT WG accepted the correction and decided to issue an erratum. We will also explore using automated checking.
Decided to apply this change to the PER text of the spec so that it will be corrected in the second edition.
Committed this change (to xsl-query-specs/xslt/ed2/xslt20.xml)