[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSD simpleType with final = extension

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

Re:  XSD simpleType with final = extension
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@softwarebytes.org> 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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.