File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Android Security Essentials Live Lessons this week in the Android 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.
It is sorta covered in the JavaRanch Style Guide.
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
XML valiadation using schema
Not quite getting how to allow any html element