Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > What does invalid character mean?

Reply
Thread Tools

What does invalid character mean?

 
 
D. Alvarado
Guest
Posts: n/a
 
      02-25-2004
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
 
Reply With Quote
 
 
 
 
Charles Fineman
Guest
Posts: n/a
 
      02-25-2004
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


 
Reply With Quote
 
 
 
 
Johannes Koch
Guest
Posts: n/a
 
      02-25-2004
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.)
 
Reply With Quote
 
D. Alvarado
Guest
Posts: n/a
 
      02-27-2004
Charles Fineman <cfineman-no&> wrote in message news:<7fc83$403cc4cf$d89e2d9a$ wsgroups.com>...
> 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 -
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
invalid character in base-64 string and invalid postback or callba kevin ASP .Net 0 01-16-2008 09:39 PM
How do fix: "Wrong number of arguments" / "invalid propert assignment"/ "Invalid argument" Java Guy Java 1 10-15-2006 08:31 PM
Invalid URI: There is an invalid sequence in the string. Error!! Patrick.O.Ige ASP .Net 1 07-02-2006 11:21 AM
invalid@invalid.org Hank Sniadoch Computer Information 1 08-20-2004 11:24 AM
Character reference "&#c" is an invalid XML character cgbusch XML 6 09-02-2003 07:04 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57