I've been trying to find an answer to the following question in the Archives
and elsewhere, but still don't know if my problem is due to a
misunderstanding of the principles of XML or due to a bug in my editor
(XMLSpy with the MSXML parser).
I'm working with the TEI DTD, and when making modifications to this DTD in
terms of element and attribute declarations, these are to be kept separate
from this basic DTD.
I tried to include an extensions DTD file in the internal DTD subset,
containing these modifications, which, I thought, was supposed to override
any specifications made in the external DTD.
This works fine with changes to attribute declarations, but when I give
slightly different declarations for the same element in both the basic and
the modifications DTDs, the editor/parser takes offence.
I get an error message "Element XYZ already defined".
I don't know what the reason for this error message is.
Another thing that puzzled me was that the editor/parser takes offence at
the element declaration in the *internal* DTD (it opens the TEI.extensions
file and highlights the element in question), when, at least, I would have
expected that it would take offence at the *external* element declaration
(which is read after the internal DTD, isn't it).
The relevant part of the DOCTYPE declarations looks like this:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE TEI.2 PUBLIC "-//TEI Consortium//DTD TEI P4//EN"
<!ENTITY % TEI.extensions.dtd SYSTEM "dtds/hcwl.dtd">
TEI.extensions.dtd contains the modified element and attribute declarations.
I would be grateful for an explanation.
[log in to unmask]