how can I write a schema that produce an unordered xml with extension
Posted
by ekeren
on Stack Overflow
See other posts from Stack Overflow
or by ekeren
Published on 2010-04-11T01:03:44Z
Indexed on
2010/04/11
1:13 UTC
Read the original article
Hit count: 443
jaxb
|xml-schema
In the following schema I am trying to make an unordered xml that extends simpleConfigurationObject:
<xs:complexType name="forTestingConfigurationObjectCreator">
<xs:complexContent>
<xs:extension base="simpleConfigurationObject">
<xs:all>
<xs:element name="a" type="xs:string"/>
<xs:element name="b" type="xs:string" minOccurs="0"/>
</xs:all>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="simpleConfigurationObject">
<xs:all>
<xs:element name="base" type="xs:string" minOccurs="0"/>
</xs:all>
</xs:complexType>
But I get the following error on the xs:all "all is not the only particle in the group, or is being used as an extension" (which is correct)
Off-course if put the base element inside the xs:all and not use xs:extension at all I will get an unordered schema restriction. (but that is not what I want)
The question is: how can I produce unordered schema with the extension?
Thanks
© Stack Overflow or respective owner