one element multiple times

T

Timo Nentwig

Hi!

I try to write a schema for:

<f4t-config>
<database>
<jndi-url>foo</jndi-url>
<fetch-size>100</fetch-size>
<!-- these are the problem -->
<query id="foo">bar</query>
<query id="bar">foo</query>
</database>
</f4t-config>

This is what is currently looks like:

<xs:element name="f4t-config">
<xs:complexType>
<xs:sequence>
<xs:element name="database">
<xs:complexType>
<xs:sequence>
<xs:element name="jndi-url" type="xs:string"/>
<xs:element name="fetch-size" type="xs:int" />
<xs:element name="query" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" type="xs:string" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>


....but this doesn't seem to be correct (or it's problem with the JAXB
generator...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top