468,121 Members | 1,523 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,121 developers. It's quick & easy.

XML Schema error on mutually exclusive fields

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.
Jul 20 '05 #1
5 1675


wooks wrote:
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?

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
Martin Honnen <ma*******@yahoo.de> wrote in message news:<40********@olaf.komtel.net>...
wooks wrote:
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?


MSXML 4.0
Jul 20 '05 #3
Martin Honnen <ma*******@yahoo.de> wrote in message news:<40********@olaf.komtel.net>...
wooks wrote:
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?


MSXML 4.0
Jul 20 '05 #4
In <88**************************@posting.google.com >, on 07/16/2004
at 12:39 AM, wo****@hotmail.com (wooks) 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 sp******@library.lspace.org

Jul 20 '05 #5
"Shmuel (Seymour J.) Metz" <sp******@library.lspace.org.invalid> wrote in message news:<40***************************@news.patriot.n et>...
In <88**************************@posting.google.com >, on 07/16/2004
at 12:39 AM, wo****@hotmail.com (wooks) said:
MSXML 4.0


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.
Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by js | last post: by
8 posts views Thread by arun | last post: by
2 posts views Thread by arun | last post: by
reply views Thread by Gus Gassmann | last post: by
18 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.