|
[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Restrictions - can anyone help
- From: Eddie Robertsson <eddie@a...>
- To: "Anderson, John" <John@B...>
- Date: Wed, 06 Jun 2001 10:31:12 +1000
I've been testing
out the IBM schema validator against some of the examples in the Schema
Part 0 Primer, and get error below.
The asterisks are mine for highlighting.
That line defines the restriction (from minOccurs="0" to minOccurs="1")
which as far as I can tell should be a valid restriction.
My question:
Is this an error in the Primer or
in the validator? Or am I missing some arcane point about restrictions?
My bet is on an error in the validator. It looks like valid restriction
to me.
Cheers,
/Eddie
Any suggestions
appreciated.
John
-----------------------------------------------------------------------
In the definition of complexType ConfirmedItems,
elementOnly content model (
<xsd:sequence maxOccurs="1" minOccurs="1">
**** <xsd:element maxOccurs="unbounded"
minOccurs="1" name="item">
<xsd:complexType
mixed="false">
<xsd:sequence maxOccurs="1" minOccurs="1">
<xsd:element maxOccurs="1" minOccurs="1"
name="productName" type="string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="quantity">
<xsd:simpleType>
<xsd:restriction base="positiveInteger">
<xsd:maxExclusive value="100"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="USPrice" type="decimal"/>
<xsd:element block="" maxOccurs="1" minOccurs="0" ref="comment"/>
<xsd:element maxOccurs="1" minOccurs="0" name="shipDate" type="date"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
is not a restriction of elementOnly
content model
<xsd:sequence maxOccurs="1" minOccurs="1">
****<xsd:element maxOccurs="unbounded"
minOccurs="0" name="item">
<xsd:complexType mixed="false">
<xsd:sequence maxOccurs="1" minOccurs="1">
<xsd:element maxOccurs="1" minOccurs="1"
name="productName" type="string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="quantity">
<xsd:simpleType>
<xsd:restriction base="positiveInteger">
<xsd:maxExclusive value="100"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element maxOccurs="1" minOccurs="1" name="USPrice" type="decimal"/>
<xsd:element block="" maxOccurs="1" minOccurs="0" ref="comment"/>
<xsd:element maxOccurs="1" minOccurs="0" name="shipDate" type="date"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
the content type defined by the
basetype.
_______________________________________________________
John Anderson
CTO BarbadosoftTM
Pure intelligent XML
+31 (0)20 750 7582 / +31 (0)6 65 347
448 / www.barbadosoft.com
- putting the
"X" in "XML" -

|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November.
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
| RSS 2.0 |
 |
| Atom 0.3 |
 |
| |
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|