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

Support for enumeration and pattern in list-simpleTypes

From: Mik Lernout <mik@futurestreet.org>
Date: Mon, 29 Dec 2003 10:21:08 +0100
Message-ID: <3FEFF204.7040805@futurestreet.org>
To: xmlschema-dev@w3.org
pattern and enumeration in xsd

Hey guys,

When doing some XMLSchema testing, I encountered a strange thing with
the Sun Multi-Schema XML Validator. When using the enumeration and
pattern-facets in a list simpleType it gives me schema validity errors.
A good example is the po.xsd from the spec. (Primer 2.1) When you change
SKU simpleType from a restriction to a list type (see below) and add one
of these facets I get this exception: "element "xsd:pattern" is not
allowed here" or "element "xsd:enumeration" is not allowed here".
My question is: is this kind of non-conformance to the spec normal? Only
in this specific case? Or is this a bug I should address with the Sun
people?

Thanks anyway!

Mik

<!-- Stock Keeping Unit, a code for identifying products -->
<xsd:simpleType name="SKU">
  <xsd:list itemType="xsd:string">
   <xsd:enumeration value="SKU1"/>
   <xsd:enumeration value="SKU2"/>
  </xsd:list>
</xsd:simpleType>

<!-- Stock Keeping Unit, a code for identifying products -->
<xsd:simpleType name="SKU">
  <xsd:list itemType="xsd:string">
   <xsd:pattern value="SKU*"/>
  </xsd:list>
</xsd:simpleType>
Received on Monday, 29 December 2003 04:22:20 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.