XML Schema error on mutually exclusive fields

W

wooks

I have defined a schema with an xsd:choice element for 2 mutually
exclusive fields.

When both are present I get an error which is good, but what is not so
good is the error message which says something like "Element content
is invalid. Expecting: fieldname, {...."

The problem (if it is one) is that the "Expecting: fieldname..." bit
is wrong - fieldname is not the next field... in fact it's optional.
However it seems to have tagged the the correct field (the mutually
exclusive one) as being in error.

So is there truly an error here or is it simply a case of a crappy
somewhat misleading error message.
 
M

Martin Honnen

wooks said:
I have defined a schema with an xsd:choice element for 2 mutually
exclusive fields.

When both are present I get an error which is good, but what is not so
good is the error message which says something like "Element content
is invalid. Expecting: fieldname, {...."

The problem (if it is one) is that the "Expecting: fieldname..." bit
is wrong - fieldname is not the next field... in fact it's optional.
However it seems to have tagged the the correct field (the mutually
exclusive one) as being in error.

So is there truly an error here or is it simply a case of a crappy
somewhat misleading error message.

Which validating parser are you using?
 
S

Shmuel (Seymour J.) Metz

on 07/16/2004 said:
MSXML 4.0

The software from m$ is notorious for incorrect, misleading and
unhelpful messages. Have you checked any of the alternatives?

--
Shmuel (Seymour J.) Metz, SysProg and JOAT <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action. I reserve the
right to publicly post or ridicule any abusive E-mail. Reply to
domain Patriot dot net user shmuel+news to contact me. Do not
reply to (e-mail address removed)
 
W

wooks

Shmuel (Seymour J.) Metz said:
The software from m$ is notorious for incorrect, misleading and
unhelpful messages. Have you checked any of the alternatives?

No I will stick to using MSXML but now I know not to panic over
idiosyncratic error messages. THank you.
 

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
473,997
Messages
2,570,239
Members
46,828
Latest member
LauraCastr

Latest Threads

Top