> Is a comparable local extension also possible in P4? I tried a few
> things but ended up using <ab>s for those places where a <fw>
> wasn't possible.
Yes. I'm not sure, but I think almost exactly the same TEI.extensions
file as for P3 would work for P4. I should point out that this kind of
extension is not at all easy. Here is one such. It takes the form of 2
files:
the document instance
the TEI.extensions.ent file
The versions of these files included below are valid on my system.
I.e., if you change the various system identifiers to match your
system, they oughta work.
--------- begin document instance ---------
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE TEI.2 PUBLIC "-//TEI P4//DTD Main Document Type//EN"
"/mnt/macos/share_with_linux/sgml/TEI/P4/tei2.dtd" [
<!ENTITY % TEI.XML 'INCLUDE' >
<!ENTITY % TEI.prose 'INCLUDE' >
<!ENTITY % TEI.transcr 'INCLUDE' >
<!ENTITY % TEI.extensions.ent SYSTEM "/tmp/myExtns.ent" >
]>
<TEI.2>
<teiHeader>
<fileDesc>
<titleStmt>
<title>Fixing <fw> Demo</title>
<author>Syd Bauman</author>
</titleStmt>
<publicationStmt>
<availability>
<p>Copyleft 2002 Syd Bauman and the TEI Consortium</p>
</availability>
<date value="2002-06-10"></date>
<distributor>TEI-L</distributor>
</publicationStmt>
<sourceDesc>
<p>No source; this digital version is the original.</p>
</sourceDesc>
</fileDesc>
</teiHeader>
<text>
<body>
<div type="silly">
<head>One</head>
<p>The first silly division.</p>
</div>
<pb n="547"/>
<fw rend="place(top-left)" type="pageno">547</fw>
<fw rend="align(center)" type="head">Running Title</fw>
<div type="silly">
<head>Two</head>
<p>The second silly division.</p>
</div>
</body>
</text>
</TEI.2>
--------- end instance, begin TEI.extensions.ent file ---------
<!--
** TEI.extensions.ent file for making <fw> globally available by
** making it a part of the m.refsys class. Intended to be used with
** TEI P4 DTDs (xml), should work with TEI P4 (sgml) as well; probably
** would work with little or no modification with TEI P3 (sgml).
-->
<!--
** The easy part: Add <fw> to m.refsys
-->
<!ENTITY % x.refsys " fw |">
<!--
** The hard part: Now we need to remove <fw> from m.phrase, lest we
** get zillions of errors about ambiguous content models, because if
** we didn't remove it the multiple occurences of <fw> in the content
** model of most any phrase-level element would make said content
** model non-deterministic.
**
** To remove it, we need to copy the declaration for m.phrase from
** the file teiclas2.ent to here, and then delete the "| %n.fw;". No
** big deal, eh? Not so fast. Further, it turns out that the various
** m-dot and n-dot parameter entities have not yet been declared when
** this file is envoked, so we need to expand them by hand. This is
** both a pain and a bit dangerous, in that we may run into trouble
** if and when we make further extensions. E.g., if sometime in the
** future we add a new element, <drugName> (along with its brand= and
** generic= attributes) to m.data, we would also have to remember to
** add it here.
-->
<!--
** original declaration from teiclas2.ent, w/ whitespace added
** and comments alongside:
** <!ENTITY % m.phrase
** "%x.phrase; * we know this to be empty
** %m.data; | * = abbr | address | date | dateRange | dateStruct
** | expan | geogName | lang | measure | name | num
** | orgName | persName | placeName | rs | time
** | timeRange | timeStruct
** %m.edit; | * = add | app | corr | damage | del | orig | reg
** | restore | sic | space | supplied | unclear
** %m.formPointers; | * = oRef | oVar | pRef | pVar
** %n.formula; | * = formula
** %n.fw; | * = fw (that which we wish to remove, remember?)
** %n.handShift; | * = handShift
** %m.hqphrase; | * = distinct | emph | foreign | gloss | hi
** | mentioned | soCalled | term | title
** %m.loc; | * = ptr | ref | xptr | xref
** %m.phrase.verse; | * = caesura
** %m.seg; | * = c | cl | m | phr | s | seg | w
** %m.sgmlKeywords;" * = att | gi | tag | val
** >
**
** Note that I have not mentioned the various x-dot entity references
** that are part of the m-dot entity references in the declaration —
** in all cases we know them to be empty (if they were to be declared
** to have anything, it would be in this file :-).
**
** There are many references above to elements that will not actually
** be declared in our DTD. This is not a problem, as it is legal in
** both SGML and XML to reference an element in a content model that
** is never declared. Some application software gets a bit confused,
** though.
**
** So here's our version, the same as the one in teiclas2.ent, but
** with the entity references hand-resolved, and <fw> conspicuously
** missing:
-->
<!ENTITY % m.phrase
"abbr | address | date | dateRange | dateStruct | expan
| geogName | lang | measure | name | num | orgName
| persName | placeName | rs | time | timeRange
| timeStruct |
add | app | corr | damage | del | orig | reg | restore
| sic | space | supplied | unclear |
oRef | oVar | pRef | pVar |
formula |
handShift |
distinct | emph | foreign | gloss | hi | mentioned
| soCalled | term | title|
ptr | ref | xptr | xref |
caesura |
c | cl | m | phr | s | seg | w |
att | gi | tag | val" >
--------- end TEI.extensions.ent file ---------
Although I put the <pb> and associated <fw>s in between the two
<div1>s (where I think they belong), they would also be valid inside
the second <div1> before its <head>.
Hope this helps.
|