This is regarding the generation of DTD's. There are certain cases when the root element of a DTD has to change since the basic XML's root element changes. The requirement is that the same DTD is needed to do the job for different XML's. Can we make the DTD accept either 'firstType' or 'secondType' as the root element(in the example shown below)? If yes, how would the DTD look like?
The XML
<?xml version="1.0" standalone="no"?>
<!DOCTYPE "firstType" SYSTEM "basic.dtd">
<firstType>
<elementA>
data
</elementA>
</firstType>
<!DOCTYPE "secondType" SYSTEM "basic.dtd">
<secondType>
<elementB>
data
</elementB>
</secondType>
Regards,
Damodharan