XML Schema error on mutually exclusive fields

Discussion in 'XML' started by wooks, Jul 15, 2004.

  1. wooks

    wooks Guest

    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.
     
    wooks, Jul 15, 2004
    #1
    1. Advertising

  2. 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/
     
    Martin Honnen, Jul 15, 2004
    #2
    1. Advertising

  3. wooks

    wooks Guest

    Martin Honnen <> wrote in message news:<40f6a3c1$>...
    > 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
     
    wooks, Jul 16, 2004
    #3
  4. wooks

    wooks Guest

    Martin Honnen <> wrote in message news:<40f6a3c1$>...
    > 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
     
    wooks, Jul 16, 2004
    #4
  5. In <>, on 07/16/2004
    at 12:39 AM, (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
     
    Shmuel (Seymour J.) Metz, Jul 18, 2004
    #5
  6. wooks

    wooks Guest

    "Shmuel (Seymour J.) Metz" <> wrote in message news:<40fa97fc$18$fuzhry+tra$>...
    > In <>, on 07/16/2004
    > at 12:39 AM, (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.
     
    wooks, Jul 19, 2004
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ALuPin

    Mutually exclusive

    ALuPin, Sep 7, 2004, in forum: VHDL
    Replies:
    2
    Views:
    773
    Mike Treseler
    Sep 7, 2004
  2. js
    Replies:
    2
    Views:
    919
  3. Stimp
    Replies:
    2
    Views:
    819
    Stimp
    Oct 24, 2005
  4. Stimp
    Replies:
    5
    Views:
    6,017
    Greg Burns
    Nov 8, 2005
  5. Replies:
    0
    Views:
    645
Loading...

Share This Page