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

[XML Schema 1.1] anySimpleType versus anyAtomicType?

From: Costello, Roger L. <costello@mitre.org>
Date: Tue, 14 Jul 2009 15:47:21 -0400
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <9E51F88D5247B648908850C35A3BBB5004008D70CC@IMCMBX3.MITRE.ORG>
[XML Schema 1.1] anySimpleType versus anyAtomicType?

Hi Folks,

Consider these two element declarations:

    <element name="A" type="anySimpleType" />

    <element name="B" type="anyAtomicType" />

This is my understanding of the difference between anySimpleType and anyAtomicType:

The value of <A> can be any primitive type or a list type, e.g.

    <A xsi:type="xs:string">Hello World</A>
    <A xsi:type="xs:decimal">12.39</A>
    <A xsi:type="xs:boolean">true</A>
    <A xsi:type="ex:LotteryNumbers">3 8 19</A>

where ex:LotteryNumbers is defined as a list type:

    <xs:simpleType name="LotteryNumbers">
        <xs:list itemType="xs:positiveInteger" />
    </xs:simpleType>

The value of <B> can only be a primitive type, e.g.

    <B xsi:type="xs:string">Hello World</B>
    <B xsi:type="xs:decimal">12.39</B>
    <B xsi:type="xs:boolean">true</B>

Thus, the difference between anyAtomicType and anySimpleType is that an anySimpleType value can be a list type, whereas that's not legal for anyAtomicType.

Correct?

/Roger
Received on Tuesday, 14 July 2009 19:47:58 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.