carvin5string
IS-IT--Management
I am writing my first xml and dtd documents. I am referring to the external dtd from the .xml file and it works great. Until I add an entity declaration. My .dtd file looks like this -
The error I get is this -
Why does the entity result in an error?
Thanks,
Chip
Code:
<!-- Begin book catalog dtd last updated apr 7, 2004 -->
<!ENTITY tit "Title: ">
<!ENTITY aut "Author: ">
<!ENTITY pub "Publisher: ">
<!ENTITY dat "Year Published: ">
<!ELEMENT Catalog (Book+)>
<!ELEMENT Book (Title, Author*, Publisher*, Pub_Date*)>
<!ELEMENT Title (#PCDATA)*>
<!ATTLIST Title ISBN CDATA #REQUIRED>
<!ELEMENT Author (#PCDATA)*>
<!ATTLIST Author Status CDATA #IMPLIED>
<!ELEMENT Publisher (#PCDATA)*>
<!ELEMENT Pub_Date (#PCDATA)*>
The error I get is this -
Code:
XML Parsing Error: undefined entity
Location: file:///C:/temp/test.xml
Line Number 9, Column 29: <Title ISBN="1234567890">&tit;Test Book 1</Title>
----------------------------^
Why does the entity result in an error?
Thanks,
Chip