DTD Stumper

wxdqz

New Member
I've run into some DTD reference issues:I'm trying to combine both an Internal and External DTD document referencein the same XML document. It goes that the Internal definition should overridethe 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 sitesand books - they all say it can be done - none of them have an example ofit: go figure ;-)Thanks for any input.Manny.
 
Back
Top