choice attributeGroup

I have XML format like this:
 
....
<Property name="aaa" value="string"/>
<Property name="iii" value="16"/>
....
 
I want to create XML schema  for this XML format, but I cannot do this:
 
....
<xs:element name="Property">
   </xs:choice>
      <xs:attributeGroup ref="strPropType"/>
      <xs:attributeGroup ref="numPropType"/>
   <xs:choice>
</xs:element>
 
<xs:attributeGroup name="strPropType">
   <xs:attribute name="aaa" type="xs:string" fixed="aaa" />
   <xs:attribute name="value" type="xs:string" use="required"/>
</xs:attributeGroup>
 
<xs:attributeGroup name="numPropType">
   <xs:attribute name="aaa" type="xs:string" fixed="iii" use="required"/>
   <xs:attribute name="value" type="xs:integer" use="required"/>
</xs:attributeGroup>
....
 
I cannot do this because:
cos-nonambig: "http://www.parasoft.com/GRS":Property and
"http://www.parasoft.com/GRS":Property (or elements from their substitution
group) violate "Unique Particle Attribution". During validation against this
schema, ambiguity would be created for those two particles.

 
How I can to this?
(any workaround?)
 
Regards,
Tomasz Olchawa

Received on Tuesday, 18 October 2005 01:43:46 UTC