What does invalid character mean?

Discussion in 'XML' started by D. Alvarado, Feb 25, 2004.

  1. D. Alvarado

    D. Alvarado Guest

    Hello,
    I am fairly new to xml. I wanted to indicate in my dtd that the
    element LINE_ITEM must contain one occurrence of the elements ISBN,
    QUANTITY, and TITLE, but in no particular order. However, I get a
    'Invalid character in content model' error when I try to validate in
    IE 6.0 or Cooktop 2.5. The line from my "my.dtd" file that it is
    complaining about is

    <!ELEMENT LINE_ITEM (ISBN & QuANTITY & TITLE)>

    The snippet of XML from my "my.xml" file is:

    <LINE_ITEM ID="1">
    <QUANTITY>1</QUANTITY>
    <ISBN>0030553725</ISBN>
    <TITLE>Teaching Resources</TITLE>
    </LINE_ITEM>

    The manuals I've read say "&" is a vliad character for DTD
    definitions, but for some reason, it is not working for me.

    Any help is appreciated, Dave
    D. Alvarado, Feb 25, 2004
    #1
    1. Advertising

  2. The ampersand (&) is used for entities. For your purposes, you want to say:

    <!ELEMENT LINE_ITEM (ISBN, QUANTITY, TITLE)>

    D. Alvarado wrote:
    > Hello,
    > I am fairly new to xml. I wanted to indicate in my dtd that the
    > element LINE_ITEM must contain one occurrence of the elements ISBN,
    > QUANTITY, and TITLE, but in no particular order. However, I get a
    > 'Invalid character in content model' error when I try to validate in
    > IE 6.0 or Cooktop 2.5. The line from my "my.dtd" file that it is
    > complaining about is
    >
    > <!ELEMENT LINE_ITEM (ISBN & QuANTITY & TITLE)>
    >
    > The snippet of XML from my "my.xml" file is:
    >
    > <LINE_ITEM ID="1">
    > <QUANTITY>1</QUANTITY>
    > <ISBN>0030553725</ISBN>
    > <TITLE>Teaching Resources</TITLE>
    > </LINE_ITEM>
    >
    > The manuals I've read say "&" is a vliad character for DTD
    > definitions, but for some reason, it is not working for me.
    >
    > Any help is appreciated, Dave
    Charles Fineman, Feb 25, 2004
    #2
    1. Advertising

  3. D. Alvarado wrote:
    > Hello,
    > I am fairly new to xml. I wanted to indicate in my dtd that the
    > element LINE_ITEM must contain one occurrence of the elements ISBN,
    > QUANTITY, and TITLE, but in no particular order. However, I get a
    > 'Invalid character in content model' error when I try to validate in
    > IE 6.0 or Cooktop 2.5. The line from my "my.dtd" file that it is
    > complaining about is
    >
    > <!ELEMENT LINE_ITEM (ISBN & QuANTITY & TITLE)>


    The ampersand is valid and has a meaning in SGML DTDs. XML DTDs don't
    have this feature.

    > The manuals I've read say "&" is a vliad character for DTD
    > definitions, but for some reason, it is not working for me.


    Is the manual you use about SGML?
    --
    Johannes Koch
    In te domine speravi; non confundar in aeternum.
    (Te Deum, 4th cent.)
    Johannes Koch, Feb 25, 2004
    #3
  4. D. Alvarado

    D. Alvarado Guest

    Charles Fineman <cfineman-no&> wrote in message news:<7fc83$403cc4cf$d89e2d9a$>...
    > The ampersand (&) is used for entities. For your purposes, you want to say:
    >
    > <!ELEMENT LINE_ITEM (ISBN, QUANTITY, TITLE)>
    >


    Thanks for your reply, but this is not quite what I want to say. When
    I tried this, I got validation errors if I put a QUANTITY element
    before an ISBN element. I want to say that these three elements can
    be included, but not necessarily in that order. Any ideas? Thanks
    again -
    D. Alvarado, Feb 27, 2004
    #4
    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. cgbusch
    Replies:
    6
    Views:
    7,464
    Mike Brown
    Sep 2, 2003
  2. kevin
    Replies:
    0
    Views:
    954
    kevin
    Jan 16, 2008
  3. Li Ma
    Replies:
    1
    Views:
    2,262
    Roedy Green
    Mar 9, 2009
  4. Rahul
    Replies:
    4
    Views:
    545
    Robert Kern
    Apr 7, 2009
  5. C Barrington-Leigh
    Replies:
    1
    Views:
    1,176
    Tim Leslie
    Sep 10, 2010
Loading...

Share This Page