Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Deriving from xs:anySimpleType

From: "Michael Kay" <mike@--------.--->
To: <xmlschema-dev@--.--->
Date: 11/15/2006 10:59:00 PM
There are some interesting test cases in the new test suite. One which has
me rather flummoxed for the moment is the Microsoft test (in SimpleType)
stZ007.xsd, the relevant part being:

    <xs:complexType name="t1">
	<xs:simpleContent>
         <xs:extension base="xs:anySimpleType" />
      </xs:simpleContent>
    </xs:complexType>

    <xs:complexType name="t2">
	<xs:simpleContent>
         <xs:restriction base="t1"/>
      </xs:simpleContent>
    </xs:complexType>

    ... <xs:element name="e2 type="t2"/>

According to the metadata this is valid, and indeed, I can't see any rules
that it breaks. But I'm having trouble building the component model for t2.

What {variety} of type is the simpleContent type of t2? It must be a simple
type, and according to the component model for simple types, every simple
type has a {variety} which is one of list, atomic, or union. (The 1.1 spec
clarifies that for anySimpleType, {variety} is absent, and at the same time
confirms that it is present for every other simple type). We also read:

every simple type definition is a .restriction. of some other simple type
(the {base type definition}), which is the .simple ur-type definition. if
and only if the type definition in question is one of the built-in primitive
datatypes, or a list or union type definition which is not itself derived by
restriction from a list or union respectively. 

In the "Complex Type Definition with simple content Schema Component"
definition, we can see that the {content type} of t2 is "a simple type
definition which restricts [xs:anySimpleType] with an [in this case empty]
set of facet components." But what {variety} of simple type definition is
this? (The 1.1 spec is unchanged in this area).

If the restriction of t1 had any facets, what would they mean (e.g. a length
facet)?

Any advice much appreciated!

Michael Kay


From mike@s... Thu Nov 16 03:21:09 2006
Received: from lisa.w3.org ([128.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent