[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

choice attributeGroup

From: Tomasz Olchawa <thm@parasoft.com.pl>
Date: Mon, 17 Oct 2005 16:55:30 +0200
Message-Id: <200510171453.j9HEr11v027035@parasoft.com.pl>
To: <xmlschema-dev@w3.org>
attributegroup choice

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 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.