newbie: wildcards AND local element declarations

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top