Hi Oleg,
First of all ... thank u for your interest.
I think it's probably to find a "trick" to express this condition ...
something like:
<xs:element name="root">
<xs:complexType>
<xs:choice>
<xs:group ref="noError"></xs:group>
<xs:group ref="error"></xs:group>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:group name="noError">
<xs:sequence>
<xs:element name="error" type="xs:unsignedByte" fixed="0"></xs:element>
<xs:element name="results">
<xs:complexType> ...... <xs:complexType>
</xs:element>
</xs:sequence>
</xs:group>
<xs:group name="error">
<xs:sequence>
<xs:element name="error" type="xs:unsignedByte"></xs:element>
</xs:sequence>
</xs:group>
This schema gets a "ambiguous error" due to "error" node.
I'm trying to find something similar to this to resolve my problem
"Oleg Tkachenko" <oleg@NO_SPAM_PLEASEtkachenko.com> escribió en el mensaje
news:eO**************@tk2msftngp13.phx.gbl...
Manresa wrote:
· Only if there is not error (node error = 0) node "result" appears.
Any idea?
Xml Schema unable to express co-occurence constraints like this one. Try
another schema language or redesign your XML.
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel