Parsing Error

Discussion in 'XML' started by Dana, Jul 11, 2003.

  1. Dana

    Dana Guest

    Hello. I'm new to XML and I have a question that looks to me like it
    should be easy to answer, but I have not found anything by searching
    google at all on this.

    We are using msxml.dll (Microsoft XML). The xml code that is getting
    the error is:

    <!ENTITY question.atts
    'id ID #IMPLIED
    diff NUMBER "50"
    discrim NUMBER "50"
    weight NUMBER "50"
    rand (yesrand | norand) "yesrand "
    mand (yesmand | nomand) "nomand"
    mustpass (yesmustpass | nomustpass) "nomustpass"
    partmarks (yespartmarks | nopartmarks) "nopartmarks"
    pool (exercise |
    quiz |
    mandatoryrand |
    modpretest |
    modposttest |
    courseposttest |
    tests) "exercise" ' >

    The error is: The character '>' was expected.
    Error code: -1072896758

    The line and column number are pointing to the 5 in this line:
    diff NUMBER "50"

    It looks to me like there may be a maximum line length allowed for an
    element, but I have found nothing to verify that.

    Any help would be very much appreciated.

    Thanks.
    Dana, Jul 11, 2003
    #1
    1. Advertising

  2. (Dana) writes:

    > Hello. I'm new to XML and I have a question that looks to me like it
    > should be easy to answer, but I have not found anything by searching
    > google at all on this.
    >
    > We are using msxml.dll (Microsoft XML). The xml code that is getting
    > the error is:
    >
    > <!ENTITY question.atts
    > 'id ID #IMPLIED
    > diff NUMBER "50"
    > discrim NUMBER "50"
    > weight NUMBER "50"
    > rand (yesrand | norand) "yesrand "
    > mand (yesmand | nomand) "nomand"
    > mustpass (yesmustpass | nomustpass) "nomustpass"
    > partmarks (yespartmarks | nopartmarks) "nopartmarks"
    > pool (exercise |
    > quiz |
    > mandatoryrand |
    > modpretest |
    > modposttest |
    > courseposttest |
    > tests) "exercise" ' >


    I don't see a problem with this; neither do nsgmls or rxp.

    > The error is: The character '>' was expected.
    > Error code: -1072896758
    >
    > The line and column number are pointing to the 5 in this line:
    > diff NUMBER "50"
    >
    > It looks to me like there may be a maximum line length allowed for an
    > element, but I have found nothing to verify that.


    Before I did anything else, I'd check to see whether there is an
    unclosed double-quoted string somewhere immediately preceding this
    declaration. An XML parser expects a > as the next non-whitespace
    character after a double quote when it believes the double quote
    ends an entity declaration.

    Next (but this is unrelated to your error message) I'd declare this as
    a parameter entity rather than as a general entity. You're going to
    want to use this entity in an ATTLIST declaration somewhere:

    <!ATTLIST question %question.atts; >

    It'll need to be a parameter entity (uses %), not a general entity
    (uses &).

    I hope this helps.

    -C. M. Sperberg-McQueen
    World Wide Web Consortium
    C. M. Sperberg-McQueen, Jul 12, 2003
    #2
    1. Advertising

  3. (C. M. Sperberg-McQueen) wrote in
    news::

    Michael, Michael, Michael...here's the problem:

    >> diff NUMBER "50"
    >> discrim NUMBER "50"
    >> weight NUMBER "50"


    XML doesn't do NUMBER--those should be NMTOKEN instead.

    If rxp didn't catch it, that would be a bug.

    --
    a. m. slotnik
    arnold m. slotnik, Jul 12, 2003
    #3
  4. Dana

    Dana Guest

    Thanks guys. It's nice to see XML parsing error messages are similar
    to some c++ compiler messages. They may not be specific, but I guess
    they generally point to the general location of the error.

    I'll fix up the xml and try again. I'll also look into the "parameter
    entity vs general entity" as well. Thanks again.



    (C. M. Sperberg-McQueen) wrote in message news:<>...
    > "arnold m. slotnik" <> writes:
    >
    > > (C. M. Sperberg-McQueen) wrote in
    > > news::
    > >
    > > Michael, Michael, Michael...here's the problem:
    > >
    > > >> diff NUMBER "50"
    > > >> discrim NUMBER "50"
    > > >> weight NUMBER "50"

    > >
    > > XML doesn't do NUMBER--those should be NMTOKEN instead.
    > >
    > > If rxp didn't catch it, that would be a bug.

    >
    > Ouch! Good eye!
    >
    > Yes, I think it would have to be classed as a bug. Richard, are you
    > paying attention to this?
    >
    > michael
    Dana, Jul 14, 2003
    #4
  5. In article <Xns93B5E7DB3A97Eslotnikattnet@204.127.36.1>,
    arnold m. slotnik <> wrote:

    >XML doesn't do NUMBER--those should be NMTOKEN instead.


    >If rxp didn't catch it, that would be a bug.


    If the entity were actually *used*, then it would catch it. As it is,
    it's just some text, not an ATTLIST declaration. (And it would have
    to be a parameter entity, and referenced from the external subset.)

    -- Richard
    --
    Spam filter: to mail me from a .com/.net site, put my surname in the headers.

    FreeBSD rules!
    Richard Tobin, Jul 15, 2003
    #5
    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. GIMME
    Replies:
    2
    Views:
    873
    GIMME
    Feb 11, 2004
  2. Naren
    Replies:
    0
    Views:
    577
    Naren
    May 11, 2004
  3. Christopher Diggins
    Replies:
    0
    Views:
    607
    Christopher Diggins
    Jul 9, 2007
  4. Christopher Diggins
    Replies:
    0
    Views:
    430
    Christopher Diggins
    Jul 9, 2007
  5. John Levine
    Replies:
    0
    Views:
    727
    John Levine
    Feb 2, 2012
Loading...

Share This Page