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

Re: XSD simpleType with final = extension

  • From: Mukul Gandhi <mukulg@softwarebytes.org>
  • To: Michael Kay <mike@saxonica.com>
  • Date: Thu, 10 Mar 2022 10:03:48 +0530

Re:  XSD simpleType with final = extension
Hi all,
   It seems very clear to me that, within XML Schema 1.1 spec, simpleType definition allows 'extension' as a value of 'final' attribute.

With regards to XML Schema 1.0 structures spec, following are the relevant phrases mentioned within the spec,

<quote>

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

XML Representation Summary: simpleType Element Information Item

<simpleType
  final = (#all | List of (list | union | restriction))
  id = ID
  name = NCName
  {any attributes with non-schema namespace . . .}>
  Content: (annotation?, (restriction | list | union))
</simpleType>

3.4.6 Constraints on Complex Type Definition Schema Components

Schema Component Constraint: Derivation Valid (Extension)

If the {derivation method} is extension, the appropriate case among the following must be true:
1 If the {base type definition} is a complex type definition, then all of the following must be true:
  ......
  ......

2 If the {base type definition} is a simple type definition, then all of the following must be true:
2.1 The {content type} must be the same simple type definition.
2.2 The {final} of the {base type definition} must not contain extension.

</quote>

From the prose mentioned within the XML Schema 1.0 structures spec, as quoted above, although section "3.14.2 (non-normative) XML Representation of Simple Type Definition Schema Components" doesn't mentioned 'extension' as a possible value of 'final' attribute of simpleType (that is a bug in the spec according to me), but the prose within the section "3.4.6 Constraints on Complex Type Definition Schema Components", clearly seems to define semantics of value 'extension' of the simpleType's attribute 'final'.

As stated earlier within this thread, there's microsoft test case within W3C XSD 1.0 test suite, that indicates, that 'extension' is a possible value of simpleType's attribute 'final'. I could verify within Saxon's XSD 1.0 and 1.1 processors, and that allows 'extension' as value of simpleType's attribute 'final'.

Yesterday, we modified Apache Xerces's XSD 1.0 and 1.1 processor's source code, to allow 'extension' as possible value of simpleType's attribute 'final'. 

On Sun, Mar 6, 2022 at 9:06 PM Michael Kay <mike@saxonica.com> wrote:
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
 

--
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.