aspose file tools*
The moose likes XML and Related Technologies and the fly likes XSD - all unbounded question ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSD - all unbounded question ??" Watch "XSD - all unbounded question ??" New topic

XSD - all unbounded question ??

Blikkies Marais
Ranch Hand

Joined: Jun 12, 2003
Posts: 50
I have an xsd file, that I need to provide the functionality of 'all' and 'unbounded'. I get validation errors if I do so.
<xs:element ref="field" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="grid" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="buttons" minOccurs="0"/>

Is there anyway I can get this functionality?
Everything I have read says you cannot have an element unbounded if it is attatched to an 'all'. It has to be attatched to a 'sequence' or a 'choice' to be 'unbounded'.
I need unbounded elements, in any sequence.
Please help. Thanks
Blikkies Marais
Ranch Hand

Joined: Jun 12, 2003
Posts: 50
thanks anyway, but in actual fact I asked a silly Q. To do what I needed all I had to do was make the sequence unbounded.
I agree. Here's the link:
subject: XSD - all unbounded question ??
Similar Threads
Three Optional Fields in a XML file but at least on of them is required
Automatically gen. code from WSDL results in XML with same tag for array and array elements
Not quite getting how to allow any html element
XML valiadation using schema