Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   What does invalid character mean? (http://www.velocityreviews.com/forums/t166714-what-does-invalid-character-mean.html)

D. Alvarado 02-25-2004 03:48 PM

What does invalid character mean?
 
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 02-25-2004 03:52 PM

Re: What does invalid character mean?
 
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



Johannes Koch 02-25-2004 04:13 PM

Re: What does invalid character mean?
 
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.)

D. Alvarado 02-27-2004 04:52 PM

Re: What does invalid character mean?
 
Charles Fineman <cfineman-no&spam@yahoo.com> wrote in message news:<7fc83$403cc4cf$d89e2d9a$6245@dcanet.allthene 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 -


All times are GMT. The time now is 08:05 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.