XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] 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

https://www.w3.org/Bugs/Public/show_bug.cgi?id=5783

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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS