[Home] [By Thread] [By Date] [Recent Entries]

  • From: Michael Kay <mike@s...>
  • To: Mukul Gandhi <mukulg@s...>
  • Date: Sun, 6 Mar 2022 15:36:35 +0000

Following the paper trail on this leads to


which is a bug against XSD 1.0 that was never resolved. So I think the answer to your question is that it's a known bug in the spec.

In most cases, but perhaps not all, when there's a known bug in XSD 1.0, consulting XSD 1.1 will give you the preferred resolution.

Michael Kay
Saxonica

On 6 Mar 2022, at 12:47, Mukul Gandhi <mukulg@s...> wrote:

Hi all,
   I shall cite following references, from XML Schema specifications.

XSD 1.1 structures spec,

3.16.2 XML Representation of Simple Type Definition Schema Components

<simpleType
  final = (#all | List of (list | union | restriction | extension))
 .....

XSD 1.0 structures spec,

3.14.2 (non-normative) XML Representation of Simple Type Definition Schema Components

<simpleType
  final = (#all | List of (list | union | restriction))
 .....

As you can see that, XSD 1.1 specifies "extension" as a possible value of "final" attribute of simpleType. Is "extension" a valid value of simpleType's attribute "final"? If yes, what is its semantics?

XSD 1.0 doesn't specify "extension" as a possible value of "final" attribute of simpleType.

But there's a following microsoft test case XSD document within W3C XSD 1.0 test suite (which specifies "extension" as a value of simpleType's attribute "final"),

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

     <xs:simpleType name="myType" final="extension">
          <xs:restriction base="xs:string" />
     </xs:simpleType>

     <xs:complexType name="ct">
          <xs:simpleContent>
              <xs:extension base="myType">
                   <xs:anyAttribute />
              </xs:extension>
           </xs:simpleContent>
     </xs:complexType>

     <xs:element name="myElement" type="ct" />

</xs:schema>

The corresponding test case definition, within W3C XSD 1.0 test suite is following,

<schemaTest name="stZ041">
    <schemaDocument xlink:href=""/>
    <expected validity="valid"/>
    <current date="2006-12-22" status="queried" bugzilla="http://www.w3.org/Bugs/Public/show_bug.cgi?id=4064"/>
    <prior date="2006-07-16" status="accepted"/>
</schemaTest>

Is the above cited test case correct?

Any thoughts about above mentioned points, shall be helpful to know.

PS: to my enlightenment, the related w3c bugzilla entry for this test case cited above concludes, "WG agreed that either way the test is invalid".


--
Regards,
Mukul Gandhi



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member