- From: Kasimier Buchcik <kbuchcik@4commerce.de>
- Date: Wed, 16 Mar 2005 21:39:58 +0100
- To: xmlschema-dev@w3.org
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 UTC