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

RE: minOccurs maxOccurs doesnt seem to be working correctly in

  • To: Marielou <marielou_h@y...>, Michael Kay <mike@s...>, 'Paul Spencer' <xml-dev-list@b...>, xml-dev@l...
  • Subject: RE: minOccurs maxOccurs doesnt seem to be working correctly in my schema
  • From: Marielou <marielou_h@y...>
  • Date: Wed, 14 Jun 2006 16:01:08 +0100 (BST)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=KDL4tNyJWF6fzEgr/wsrqskcj8er9qr9hjIIs+97Lcd0+1V1EzRUuhYOzvTZosP5PZ8qY4+D163fJSicd/X51BqhR7oulPnur2ELW3QpeAMhc+T3Dyut6p9AD9caTEmf5g1yp2TtEAdzeroW4B8U/ugR8+1ayp2LNoJxSmYyW3g= ;
  • In-reply-to: <20060614101453.44289.qmail@w...>

libxml schema
Im really having problems specifying the occurrences
of elements in my schema without a sequence! I have
declared occurrences for child elements in separate
content models from the parent A, where maxOccurs for
the child may be greater than 1. When I validate a
sample XML the maxOccurs and minOccurs isnt working as
I hope. e.g. below I have specified maxOccurs for
elements in a sequence in B, i.e. element C, to be 7
and minOccurs to be 1, however in my sample XML
document I can have over 7 elements or even no C
elements passing validation.  

</xs:element>
<xs:element name="parentA">
<xs:complexType>
<xs:all>
<xs:element ref="B" minOccurs="1" maxOccurs="1"/>
</xs:all>
</xs:complexType>
</xs:element>


<xs:element name="B">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="7">
<xs:element name="C">
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="8"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>

Any help would be greatly appreciated!

Marie Louise

Send instant messages to your online friends http://uk.messenger.yahoo.com 

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
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.

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-2013 All Rights Reserved.