-
DTD Stumper
I've run into some DTD reference issues:
I'm trying to combine both an Internal and External DTD document reference
in the same XML document. It goes that the Internal definition should override
the external one, but I have a problem getting this to work.
I did the linking like so:
<?xml version="1.0"?>
<!DOCTYPE contacts SYSTEM "contactDTD.DTD" [
<!ELEMENT contacts (firstname,lastname)>
<!ELEMENT firstname (#PCDATA)>
<!ELEMENT lastname (#PCDATA)>
]>
<contacts>
<firstname>Lion</firstname>
<lastname>King</lastname>
</contacts>
The actual DTD document is defined like so:
<?xml version="1.0"?>
<!ELEMENT contacts (firstname,lastname)>
<!ELEMENT firstname (#PCDATA)>
<!ELEMENT lastname (#PCDATA)>
The error I get when trying to open this in IE 5.0 is:
The element 'contacts' is already declared. Line 2, Position 11
<!ELEMENT contacts (firstname,lastname)>
----------^
Is my syntax for the mixed DTD reference wrong? I've looked in various sites
and books - they all say it can be done - none of them have an example of
it: go figure ;-)
Thanks for any input.
Manny.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|