> [Using lots of entity references for words.]
>
> As I understand it, the XML TEI dtd wouldn't allow me to do this;
> entities are not used the the dtd and extension file is not
> consulted every time the file is loaded.
It's possible I grossly misunderstand something here; if so, please
excuse me. I see no reason why you cannot continue to do exactly what
you've done in the past (except that the markup declared as the
values of your entities will need to be XML-compliant, which your
example was not for lack of quotation marks around the attribute
value[1], and because an ID cannot start with a numeral). While many
of us on this list advocate using pre-compiled (aka "baked") views of
the XML TEI DTDs, the standard method of using the main DTD in your
DOCTYPE declaration, and a bunch of parameter entity definitions
(including for extension files) in your subset, is still the official
way to do things. Here's a fictional example.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE TEI.2 PUBLIC "-//TEI P4//DTD Main Document Type//EN"
"tei2.dtd" [
<!ENTITY % TEI.XML 'INCLUDE'>
<!ENTITY % TEI.verse 'INCLUDE'>
<!ENTITY % TEI.transcr 'INCLUDE'>
<!ENTITY % TEI.extensions.ent
PUBLIC "-//LethbridgeProject//ENTITIES Local modifications to TEI main DTD//EN"
"odonnell.ent">
<!ENTITY % TEI.extensions.dtd
PUBLIC "-//LethbridgeProject//DTD Local element types for TEI main DTD//EN"
"odonnell.dtd">
]>
Note
----
[1] Remember not to use the same kind of quotes (single or double)
that enclose the entity definition. E.g. in the following, word1
word2 are fine, but word3 will cause problems at the spot where
the entity is declared, and word4 and word5 will cause problems
at the point where the entity reference occurs.
<!ENTITY word1 '<w id="w1">OK</w>'>
<!ENTITY word2 "<w id='w2'>AlsoOK</w>">
<!ENTITY word3 '<w id='w3'>NoGoodDecl</w>'>
<!ENTITY word4 '<w id=4>NoGoodXML</w>'>
<!ENTITY word5 '<w id="w5">Same & Confusing</w>'>
|