![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - FW: Complex type restriction question >Thread Next - RE: choice attributeGroup choice attributeGroupTo: <xmlschema-dev@--.---> Date: 10/17/2005 6:56:00 PM
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
From mike@s... Tue Oct 18 08:19:24 2005
Received: from lisa.w3.org ([128.30. | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
