[tei-council] @predeclare

Sebastian Rahtz sebastian.rahtz at oucs.ox.ac.uk
Wed May 23 18:20:59 EDT 2012


I built testall.dtd without the @predeclare tests, and its definitely
needed:


RomaResults/testall.dtd:263: parser warning : PEReference: %att.global.linking.attributes; not found
xml:space (default|preserve) #IMPLIED'> 
                                      ^
RomaResults/testall.dtd:263: parser warning : PEReference: %att.global.analytic.attributes; not found
xml:space (default|preserve) #IMPLIED'> 
                                      ^
RomaResults/testall.dtd:263: parser warning : PEReference: %att.global.facs.attributes; not found
xml:space (default|preserve) #IMPLIED'> 
                                      ^
RomaResults/testall.dtd:263: parser warning : PEReference: %att.global.change.attributes; not found
xml:space (default|preserve) #IMPLIED'> 
                                      


etc etc etc

What happens is that we declare as DTD entities all the model classes from the module
"tei" first, because they are needed by global macros. Then later modules make use of those.

But a model like att.global can be _extended_ by later
modules with eg att.global.analytic. So the entity for att.global.analytic
needs to be declared _before_ att.global itself (this is the way DTDs
work, sorry; RELAX NG is more rational). In the normal course
of events, modules are processed in declaration order, so 
att.global.analytic would not be met until much later - too late.
So, its tagged with predeclare=true, meaning that it will
get special treatment, and jump to the head of the queue.

if you look at the  things which are predeclared, they all
fall into this "extension" category.

att.datable.custom.xml
att.datable.iso.xml
att.duration.iso.xml
att.duration.w3c.xml
att.duration.xml
att.enjamb.xml
att.global.analytic.xml
att.global.change.xml
att.global.facs.xml
att.global.linking.xml
att.identified.xml
att.identified.xml
att.metrical.xml
att.msExcerpt.xml
att.ptrLike.form.xml
model.divPart.spoken.xml
model.entryLike.xml
model.entryPart.xml
model.global.spoken.xml
model.handDescPart.xml
model.orgPart.xml
model.orgStateLike.xml
model.persNamePart.xml
model.placeEventLike.xml
model.placeNamePart.xml
model.placeStateLike.xml
model.ptrLike.form.xml
model.resourceLike.xml

OK. now you can kill me.

Someone clever and patient could revisit this, and extrapolate the predeclaration thing
from properties of the classes, I think. If I am made redundant in our
upcoming departmental re-organisation[1], I'll certainly tackle this.

Sebastian

[1] so if you know of any jobs going...


More information about the tei-council mailing list