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

Is the Type Library draft valid?

From: Kasimier Buchcik <kbuchcik@4commerce.de>
Date: Wed, 16 Mar 2005 21:39:58 +0100
Message-ID: <4238999E.3050101@4commerce.de>
To: xmlschema-dev@w3.org
xsd type library

Hi,

I have a question regarding the component constraint "Derivation Valid
(Restriction, Simple)" related to the draft Type Library at
"http://www.w3.org/2001/03/XMLSchema/TypeLibrary.xsd".

We have the following definition in
"http://www.w3.org/2001/03/XMLSchema/TypeLibrary-nn-array.xsd" :

<xs:simpleType name="valuesType">
   <xs:list itemType="xs:anySimpleType" />
</xs:simpleType>

According to "http://www.w3.org/TR/xmlschema-1/#cos-st-restricts" :

2 If the {variety} is list, then all of the following must be true:
   2.1 The {item type definition} must have a {variety} of atomic or
       union (in which case all the {member type definitions} must be
       atomic).

and "http://www.w3.org/TR/xmlschema-2/#anySimpleType-component" :

Schema Component: anySimpleType
[...]
{variety}
  absent

Since the variety of the item type definition "anySimpleType" is absent,
I would expect the simple type definition to be invalid.
I'm confused with the results of XSV 2.7 and Xerces 2.6.2, which both do
not report this error. Should I stick with the spec, or do I read it
wrong?

An example which uses this simple type:

Instance:

<?xml version="1.0"?>
<foo values="la la la"/>

Schema:

<?xml version="1.0"?>
<xsd:schema
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:tl="http://www.w3.org/2001/03/XMLSchema/TypeLibrary">
   <xsd:import
     namespace="http://www.w3.org/2001/03/XMLSchema/TypeLibrary"
   schemaLocation="http://www.w3.org/2001/03/XMLSchema/TypeLibrary.xsd"/>

   <xsd:element name="foo" type="tl:vectorAttrVals"/>

</xsd:schema>


Regards,

Kasimier
Received on Wednesday, 16 March 2005 22:24:02 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.