Michael Beddow wrote:
> Ronald Bourret wrote:
> > By design. You're not allowed to redefine element types. See section
> > of the XML spec.
> But if that reading of the spec is correct, the XML version of the TEI
> is in big trouble. Its mechanism for extending/modifying the DTD in a
> way that retains interchangeability across TEI projects depends on the
> ability of the internal subset to override the external DTD.
To quote from section 3.2 of the XML spec:
Validity constraint: Unique Element Type Declaration
No element type may be declared more than once.
So while you can declare an element type more than once, doing so is
invalid. Since element type declarations are primarily used for
validation (as opposed to attribute declarations, which provide defaults
as well as being used for validation), there seems little point in
declaring an element type twice.
> (It was the
> attempt to do that which led to Ingo's original query: emacs-psgml
> allows it to happen, XML Spy objects.
I took a quick look at the page on the TEI Web site about how to modify
the DTD . It appears that this is done through INCLUDE and IGNORE
sections, which are triggered by parameter entities. By setting the
values of these entities (presumably in the internal subset, although
the Web page talks about the file TEI.extensions.ent), you can determine
whether given declarations are included or not. This allows you to avoid
any problems with redeclaring element types and works because, if a
parameter entity is declared more than once, the first definition is
As an example of include ignore sections, consider the following from
section 3.4 of the XML spec:
<!ENTITY % draft 'INCLUDE' >
<!ENTITY % final 'IGNORE' >
<!ELEMENT book (comments*, title, body, supplements?)>
<!ELEMENT book (title, body, supplements?)>
By setting the values of the draft and final PEs, you can control the
definition of the book element type. TEI does the same thing.