Hi everybody,
I need to define a XML schema. The result should looks like this:
<option value="priority">4</option>
<option value="values">
<value name="x86-32" lang="en-GB" group="root">x86 32-Bit</value>
<value name="x86-64" lang="en-GB" group="root">x86 64-Bit</value>
<value name="ARM" lang="en-GB" group="root">ARM</value>
<value name="PowerPC" lang="en-GB" group="root">PowerPC</value>
<value name="SPARC" lang="en-GB" group="root">SPARC</value>
<value name="PA-RISC" lang="en-GB" group="root">PA-RISC</value>
<value name="DEC-Alpha" lang="en-GB" group="root">DEC Alpha</value>
</option>
<option value="editable">true</option>
So the element "option" contains either a string or set of child elements with strings. I have tried something like this:
<xs:element name="options" minOccurs="0" maxOccurs="1">
<xs:complexType mixed="true">
<xs:sequence>
<xs:element name="option" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="value" use="required" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
But the validator doesn't allow this definition:
cvc-complex-type.2.2: Element 'option' must have no element [children], and the value must be valid.
Any idea how to solve it?
Best regards, Radek