OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

error in DTD with multiple entities

I have one DTD that references 2 other DTDs by using entities. The 2
other DTDs are from 3rd party sources and I am not at liberty to change
them. Both the referenced DTDs have an element named "country" and so I
get errors from the parser when I try to parse an XML document that
uses my DTD. The error I'm getting makes sense to me, since using the
entities is like bringing the elements from the other 2 DTDs into my
DTD, and you can't have 2 elements declared with the same name, right?
But since I cannot change the referenced DTDs, I am looking for some
kind of a work-around. Each of these entities is used in isolation from
each other, by a separate root element in the DTD. I am wondering if
there is some way I can isolate the entities or put them in some kind of
scope so they don't conflict with each other? Simplified examples of the
DTD and XML are below, as this is a pretty complicated question. Thanks
in advance for any help or pointers you may be able to give me. Wendi 

<?xml version="1.0" encoding='UTF-8'?>
<!ENTITY % tx1 SYSTEM "tx1.dtd">
<!ENTITY % tx2 SYSTEM "tx2.dtd">
<!ELEMENT tx1Root (commonData1,commonData2,tx1)>
<!ELEMENT tx2Root (commonData1,commonData2,tx2)>
<!ELEMENT commonData1 (#PCDATA)>
<!ELEMENT commonData2 (#PCDATA)>

<?xml version="1.0" encoding='UTF-8'?>
<!ELEMENT tx1 (data1,data2)>
<!ELEMENT data1 (#PCDATA)>
<!ELEMENT data2 (#PCDATA)>

<?xml version="1.0" encoding='UTF-8'?>
<!ELEMENT tx2 (data2,data3)>
<!ELEMENT data2 (#PCDATA)>
<!ELEMENT data3 (#PCDATA)>


<!DOCTYPE tx1Root SYSTEM "wrapper.dtd">

Wendi Sisson
Systems Programmer
International Trade Development
FedEx Services
(901) 263-6695