- From: Asir S Vedamuthu <asirv@webmethods.com>
- Date: Mon, 23 Dec 2002 13:34:15 -0500
- To: <xmlschema-dev@w3.org>
- Cc: "Ted Liu" <ted.liu@webmethods.com>
Hi,
I am using nested simple type definitions. My sample schema fragment (see
below for the complete schema document) is,
<xsd:simpleType name="mySmallPositiveInteger">
<xsd:restriction>
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:fractionDigits value="0"/>
<xsd:minInclusive value="1"/>
<xsd:maxExclusive value="100"/>
<xsd:whiteSpace value="collapse"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:minInclusive value="50"/>
</xsd:restriction>
</xsd:simpleType>
I am getting mixed results when I used it in various tools. This makes me
wonder if it is valid? If it is valid, how do I make these tools process it
without any errors?
Here is my score card ..
[1] IBM Schema Quality Checker ran without any errors
[2] XML Spy processed without any errors
[3] XSV processed without any errors
[4] webMethods Integration Server processed without any errors
[5] MS XSD Schema Validator at
http://apps.gotdotnet.com/xmltools/xsdvalidator/Default.aspx failed with 1
error,
<quote>
Validation error:
It is an error if maxInclusive is among the members of {facets} of {base
type definition} and {value} is greater than the {value} of the parent
maxInclusive. An error occurred at , (14, 4).
</quote>
[6] AXIS chokes if nested simple type def is used within WSDL types element
[7] .NET chokes if nested simple type def is used within WSDL types element
Complete XML Schema document is,
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.jewellery.org/"
xmlns:j="http://www.jewellery.org/">
<xsd:element name="item">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="quantity" type="j:mySmallPositiveInteger"/>
<xsd:element name="quantity2" type="j:smallPositiveInteger"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="mySmallPositiveInteger">
<xsd:restriction>
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:fractionDigits value="0"/>
<xsd:minInclusive value="1"/>
<xsd:maxExclusive value="100"/>
<xsd:whiteSpace value="collapse"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:minInclusive value="50"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="smallPositiveInteger">
<xsd:restriction>
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:fractionDigits value="0"/>
<xsd:minInclusive value="1"/>
<xsd:whiteSpace value="collapse"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:maxExclusive value="100"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
Appreciate your help,
Asir S Vedamuthu
webMethods, Inc.
703-460-2513 or asirv@webmethods.com
http://www.webmethods.com/
Received on Monday, 23 December 2002 13:29:19 UTC