Animanera said:
Is there a way to extend an existing DTD (adding only new elements) OR
I've to create a NEW DTD containing both new and old elements?
You can write a short new DTD that uses a parameter entity reference
to include the old DTD.
For example, suppose your old DTD was vegetables.dtd and you want to
add an element brussels-sprout, you can put something like this in
new-vegetables.dtd:
<!ENTITY % old SYSTEM "vegetables.dtd">
%old;
<!ELEMENT brussels-sprout EMPTY>
<!ATTLIST brussels-sprout taste #FIXED "disgusting">
The first line declares "old" as an external parameter entity, the old
DTD. The second line includes that entity. Then you continue with
the extra declarations.
This works if you only need to add declarations. If you need to
modify any declarations (for example, to add brussels-sprout to the
content model of some existing element) then you can't do it unless
the original DTD writer planned ahead for it, typically by making the
content models themselves be parameter entities.
-- Richard