This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Created attachment 1320 [details] ZIP file containing schemas to reproduce the bug If you create a schema that has a top-level xs:annotation and subsequently attempt to override that schema with an xs:override in another component, attempting to apply override.xsl will result in an error. The xs:annotation element doesn't have a name attribute and theat causes f:componentName to attempt to create a QName with an empty local name. You can see this in action by attempting to validate 'sample.xml' with 'over.xsd' from the attached ZIP file.
I have added the test case as test Override/over030 in the Saxonica section of the XSD test suite, and I have reproduced the failure using Saxon. (It might be worth pointing out that the stylesheet Saxon uses internally differs slightly from that published in the spec, though at first sight I don't think the differences are material.)
I fixed this for Saxon by changing the f:componentName function to: <xsl:function name="f:componentName" as="xs:QName?"> <xsl:param name="component" as="element()"/> <xsl:sequence select="if ($component/@name) then QName($component/ancestor::xs:schema/@targetNamespace, $component/@name) else ()"/> </xsl:function> And I also had to add an xs:import for the XML namespace to the overriding schema document.