This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Ken Holman has pointed out in private email that the example in section 3.14 is incorrect: <xs:variable name="condition" select="'yes'" as="local:yes-no"/> It should read <xs:variable name="condition" select="local:yes-no('yes')" as="local:yes-no"/> Because declaring the type of a variable does not by itself force a cast to that type.
> declaring the type of a variable does not by itself force a cast to that type. Which raises the question, as an enhancement suggestion, whether this rule really improves the usability of the language. What adverse consequences would follow if the XPath function conversion rules were changed so that if the required type is derived by restriction from the supplied type, an implicit cast takes place?
Erratum E28 has been created to correct this error.