You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Ro...@fastmobile.com on 2006/05/11 21:16:28 UTC
choice with maxOccurs>1
i have a schema of the form...
<xs:complexType name="Foo">
<xs:sequence>
<xs:element name="Bar" type="my:Bar" minOccurs="1"
maxOccurs="1" />
<xs:element name="Baz" type="my:Baz" minOccurs="0"
maxOccurs="1" />
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Blah1" type="my:Blah1" />
<xs:element name="Blah2" type="my:Blah2" />
<xs:element name="Blah3" type="my:Blah3" />
</xs:choice>
</xs:sequence>
</xs:complexType>
which is equivalent to a dtd of the form...
<!ELEMENT Foo (Bar, Baz?, (Blah1 | Blah2 | Blah3)*)>
however, jaxme 0.5.1 complains with the exception...
org.xml.sax.SAXParseException: Model groups with maxOccurs > 1 are not
yet supported.
i the flexibility to modify my schema, but i must have one "Bar"
element, an optional "Baz" element, and one or more "Blah1" "Blah2" and
"Blah3" elements.
is there a different way to write the schema to get the same effect? or,
is there a workaround for this jaxme limitation? or am i totally off
base?
thanks for your help
bobD
--
Roberto Diaz
roberto.diaz@fastmobile.com
---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org
Re: choice with maxOccurs>1
Posted by Jochen Wiedmann <jo...@gmail.com>.
Roberto.Diaz@fastmobile.com wrote:
> i the flexibility to modify my schema, but i must have one "Bar"
> element, an optional "Baz" element, and one or more "Blah1" "Blah2" and
> "Blah3" elements.
If you fix the order of the elements "Blah1", and so on by replacing the
choice with
<xs:element name="Blah1" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Blah2" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Blah3" minOccurs="0" maxOccurs="unbounded"/>
then everything would be fine.
Jochen
---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org