Mike Kayser
Usenet Archive
- Joined
- Apr 2, 2003
- Messages
- 2
- Reaction score
- 0
Hi,
I have a schema which is fine except for one part giving me trouble:
(...)
<xs:element name="DOC">
<xs:complexType mixed="true">
<xs:sequence>
<xs:any processContents="lax" minOccurs="0"
maxOccurs="unbounded" />
<xs:element ref="IEOutput" minOccurs="1" maxOccurs="1" /> </xs:sequence> <xs:attribute name="ADEPTID" type="xs:string" use="required" /> <xs:anyAttribute processContents="lax" /> </xs:complexType> </xs:element>
(...)
In VS.NET 2003 I get the error: "The content model must be deterministic. Wildcard declaration along with a local element declaration causes the content model to become ambiguous."
I can see how at validation-time it is ambiguous whether the <xs:any> or <xs:element> particle should be responsible for covering a given <IEOutput> element (which I guess means XML processors aren't responsible for things like backtracking).
My question is this: how do I say in a schema that "you can have any number of arbitrary children so long as one of them conforms to the (elsewhere defined) <IEOutput> element particle"? What I really mean by "one of them" is "exactly one" but I'd also settle for "at least one". And I also have a requirement that the <IEOutput> element should come last, but I could drop that req'ment too.
Thanks
Mike
I have a schema which is fine except for one part giving me trouble:
(...)
<xs:element name="DOC">
<xs:complexType mixed="true">
<xs:sequence>
<xs:any processContents="lax" minOccurs="0"
maxOccurs="unbounded" />
<xs:element ref="IEOutput" minOccurs="1" maxOccurs="1" /> </xs:sequence> <xs:attribute name="ADEPTID" type="xs:string" use="required" /> <xs:anyAttribute processContents="lax" /> </xs:complexType> </xs:element>
(...)
In VS.NET 2003 I get the error: "The content model must be deterministic. Wildcard declaration along with a local element declaration causes the content model to become ambiguous."
I can see how at validation-time it is ambiguous whether the <xs:any> or <xs:element> particle should be responsible for covering a given <IEOutput> element (which I guess means XML processors aren't responsible for things like backtracking).
My question is this: how do I say in a schema that "you can have any number of arbitrary children so long as one of them conforms to the (elsewhere defined) <IEOutput> element particle"? What I really mean by "one of them" is "exactly one" but I'd also settle for "at least one". And I also have a requirement that the <IEOutput> element should come last, but I could drop that req'ment too.
Thanks
Mike