<?tei:SOF p2stov.odd ?>
<!-- $Id: p2stov.odd,v 1.8 1998/02/01 17:38:08 tei Exp $ -->
<!--*
    * $Log: p2stov.odd,v $
    * Revision 1.8  1998/02/01 17:38:08  tei
    * fix Log keyword,
    * normalize SGML
    * replace system identifiers with public identifiers.
    *
    * Revision 1.7  94/04/08  18:54:36  msmcq
    * Last-second fixes for P3
    * 
    * Revision 1.6  1994/04/08  01:36:34  msmcq
    * Last-round changes before publication of P3
    * 
    * Revision 1.5  1994/04/01  16:36:47  msmcq
    * changes / fixes during validation of DTD
    * 
    * Revision 1.4  1994/03/24  22:20:40  msmcq
    * typos found by David Barnard et al. corrected
    * 
    * Revision 1.3  1994/03/16  03:28:24  msmcq
    * changes a propos of PH
    * -->
<!-- Revisions:                                               -->
<!-- 94-04-08 : MSM : use ftdtd, not gfdtd ent                -->
<!-- 94-04-07 : MSM : confuse discussion of conformance       -->
<!-- 94-03-30 : MSM : suppress ref to lmdtd                   -->
<!-- 94-03-22 : MSM : retag some TERMs, Qs, as CODE, IDENT    -->
<!-- 94-03-22 : MSM : typos from WWP team, EBr, JLav          -->
<!-- 94-03-07 : MSM : rename physical as transcr              -->
<!-- 93-09-14 : MSM : move IGNORE keywords to dSTpekw         -->
<!-- 93-09-14 : MSM : dictionar-ies not -y                    -->
<!-- 93-04-06 : MSM : minor changes:  style, typos, slips     -->
<!-- 3 apr 93 : LB revise for publication                     -->
<!--       stylistic changes consequent on singularization    -->
<!--       extended discussion of example a bit (and fixed typo) -->
<!-- 93-03-30 : MSM : changes, cleanup for LB                 -->
<!-- 93-03-24 : MSM : remove dup decls for XXtop entities     -->
<!-- 93-03-23 : MSM : fill out dtd frags, misc rev            -->
<!-- 93-03-16 : MSM : add health warning at beginning, add    -->
<!--                  discussion of user tag sets             -->
<!-- 93-03-06 : MSM : add initial overview                    -->
<!-- 93-03-06 : MSM : break out local mods into separate section -->
<!-- 93-03-04 : MSM : change p2st- ids to ST                  -->
<!-- 93-03-04 : MSM : trivial sgml fix                        -->
<!-- 93-03-04 : MSM : remove TERM gi from inside commdecl     -->
 
<div2 id="STOV"><head>The TEI2.DTD File</head>
 
<p>All TEI-encoded documents use the same top-level DTD file, which
refers to a number of other DTD files, the exact set of other files
referred to depending on which base and which additional tagsets are in
use.  The remainder of this chapter describes in some detail the
organization and function of this file and those it embeds; it is
necessarily of a rather technical and specialized nature.
 
<!--                                                          -->
<!-- Most readers can skip or skim these sections:  they      -->
<!-- document the precise usage of SGML marked sections and   -->
<!-- parameter entities to perform various operations         -->
<!-- behind the scenes with which most users need not         -->
<!-- concern themselves.  Those who do need to know exactly   -->
<!-- what is happening at a detailed level should study the   -->
<!-- following description carefully.                         -->
<!--                                                          -->
<!--                                                          -->
<!-- < p > In addition to the files for core, base, and       -->
<!-- additional tag sets described in section  < xref         -->
<!-- target=STBA > , the TEI DTD uses the following files:    -->
<!--                                                          -->
<!--   < list type=gloss >                                    -->
<!--   < label >  < term > tei2.dtd < /term >   < item >      -->
<!-- main, top-level DTD driver file                          -->
<!--   < label >  < term > teigis2.ent < /term >   < item >   -->
<!-- declares parameter entities for                          -->
<!--  TEI generic identifiers; see section  < xref            -->
<!-- target=STPEGI >                                          -->
<!--   < label >  < term > teiclas2.ent < /term >   < item    -->
<!-- > declares parameter entities for                        -->
<!--  TEI element classes; see section  < xref                -->
<!-- target=STECOV >                                          -->
<!--   < /list >                                              -->
<!--                                                          -->
<!--  Fragments of these files are included in other          -->
<!-- sections of this chapter;                                -->
<!--  this section provides the top-level overview of the     --></p>
 
<p>The main &tei; DTD is always invoked by specifying the file
<ident type="file">tei2.dtd</ident>.  This file:
 
<list type="ordered">
 
<item>takes care of certain necessary preliminaries:
 
<list type="ordered">
 
<item>embeds any locally defined changes to the standard TEI
parameter entities, so that local modifications can take precedence
over default declarations;</item>
 
<item>declares TEI-specific keywords used in other declarations and
declares default values of <code type="kw">IGNORE</code> for all the
parameter entities used to select base and additional tag sets (see
section <xref target="STPEKW">);</item>
 
<item>declares parameter entities for TEI generic identifiers (by
embedding the file <ident type="file">teigis2.ent</ident>; see section
<xref target="STPEGI">);</item>
 
</list></item>
 
<item>declares parameter entities for element classes, content models,
and global attributes (by embedding <ident type="file">teiclas2.ent</ident>; see section <xref target="STECOV">);</item>
 
<item>declares the top-level elements <gi>tei.2</gi> and
<gi>teiCorpus.2</gi>;</item>
 
<item>embeds DTD files containing local modifications (if any),
the core tag sets, the base tag set, and the additional tag sets.</item>
 
</list></p>
 
<div3 id="STOVOV"><head>Structure of the TEI2.DTD File</head>
 
<p>Each parameter entity associated with a tag set controls several
marked sections in the main DTD file <ident type="file">tei2.dtd</ident>.
If the entity has been declared in the DTD subset with the text <code
type="kw">INCLUDE</code>, then the marked sections it controls will be
parsed; otherwise, they will be ignored.  The marked sections controlled
by each entity:
 
<list type="ordered">
<item>declare and refer to the entity file for the tag set,
which defines its global attributes and element classes</item>
<item>declare and refer to the DTD file for the tag set,
which defines its elements and their attributes</item>
<item>declare the parameter entity <ident type="pe">component</ident>) in
a form suitable for texts using that base</item>
</list></p>
 
<p>The <ident type="file">tei2.dtd</ident> file has the following
structure:
 
<dtdFrag id="DSTTEI2" n="File tei2.dtd:  Main document type
declaration file" file="tei2">
&dtdstart;
 
<commDecl>This file first defines some useful entities, then defines the
element TEI.2 and includes files with the various specialized parts of
the document type declaration.  It also declares the top-level TEI.2
and TEI.2.corpus elements.</commDecl>
 
<commDecl>I.  Preliminaries.</commDecl>
<commDecl>Embed any local modifications to TEI entities.</commDecl>
<dtdRef dtdFrag="DSTOVLE">
 
<commDecl>Embed entities for TEI generic identifiers.</commDecl>
<entDecl entDoc="TEIGIS">
<peRef n="TEI.elementNames">
 
<commDecl>Define entities for TEI keywords.</commDecl>
<commDecl>This includes defining the default for each base and additional
tag set as 'IGNORE'.</commDecl>
<dtdRef dtdFrag="DSTPEKW">
 
<commDecl>II. Define element classes for content models, shared
attributes for element classes, and global attributes.  (This all
happens within the file TEIclas2.ent.)
</commDecl>
<entDecl entDoc="TEIECGA">
<peRef n="TEI.elementClasses">
 
<commDecl>III.  Define the top-level TEI elements:  one for individual
texts, one for composites with a collective header.</commDecl>
 
<commDecl>A TEI document is a text preceded by a TEI header.</commDecl>
<tagDecl tagDoc="TEI2">
 
<commDecl>A TEI corpus is a series of TEI.2 documents, preceded by a
corpus-level TEI header.</commDecl>
<tagDecl tagDoc="TEICORP2">
 
<commDecl>IV.  Embed the actual tag sets.  First embed any local
modifications and extensions.  Then embed the core tag sets, the
(single) base tag set, and the (optional) additional tag sets specified
by the user.</commDecl>
<dtdRef dtdFrag="DSTOVLO">
<dtdRef dtdFrag="DSTOVCO">
<dtdRef dtdFrag="DSTOVBA">
<dtdRef dtdFrag="DSTOVAD">
</dtdFrag></p>
 
<p>A TEI-conformant document <emph>must</emph> use the <ident
type="file">tei2.dtd</ident> file, or one derived from it in the manner
described in chapter <xref target="MD">.
It must also specify which base and
which additional tag sets are to be invoked, using the mechanisms
described in section <xref target="STIN">.</p></div3>
 
<div3 id="STOVLO"><head>Embedding Local Modifications</head>
 
<p>As noted above in section <xref target="STBAUS">, local modifications
to the DTD are most conveniently grouped into two files, one containing
modifications to the TEI parameter entities, and the other new or
changed declarations of elements and their attributes.  These files
should be associated with the parameter entities
<ident type="pe">TEI.extensions.ent</ident> and
<ident type="pe">TEI.extensions.dtd</ident> by declarations included in
the document's DTD subset.</p>
 
<p>For example, if the relevant files are called <ident rend="noindex"
type="file">project.ent</ident> and <ident rend="noindex" type="file">project.dtd</ident>, then declarations like the following
would be appropriate:
 
<eg>
<![ CDATA [
 <!ENTITY % TEI.extensions.ent SYSTEM 'project.ent' >
 <!ENTITY % TEI.extensions.dtd SYSTEM 'project.dtd' >
]]>
</eg></p>
 
<p>When an SGML entity is declared more than once, the first declaration
is binding and the others are ignored.  The local modifications to
parameter entities should therefore be handled before the standard
parameter entities themselves are declared in <ident type="file">tei2.dtd</ident>.  The entity <ident type="pe">TEI.extensions.ent</ident> is referred to before any TEI
declarations are handled, to allow the user's declarations to take
priority.  If the user does not provide a <ident type="pe">TEI.extensions.ent</ident> entity, the entity will be expanded
to the empty string.</p>
 
<p>For example the encoder might wish to add two phrase-level elements
<gi tei="no">it</gi> and <gi tei="no">bd</gi>, perhaps as synonyms for
<tag>hi rend='italics'</tag> and <tag>hi rend='bold'</tag>.  As
described in chapter <xref target="MD">, this involves two distinct steps:
one to define the new elements, and the other to ensure that they are
placed into the TEI document structure at the right place.  We deal with
the second first, by specifying the element class to which the new
elements should be attached.  To do this, the standard parameter entity
<ident type="pe">x.phrase</ident> should be modified to include the two
new generic identifiers.  The file containing local declarations of the
standard parameter entities will thus contain a declaration of the
following form:
 
<eg>
<![ CDATA [
 <!ENTITY % x.phrase 'it | bd |' >
]]>
</eg></p>
 
<p>The relevant fragment of the DTD is this:
 
<dtdFrag id="DSTOVLE" n="Local modifications to parameter entities">
<commDecl>Embed local modifications to TEI parameter entities.  Declare
entity as empty string first, in case user has no mods and has not
declared it.</commDecl>
<entDecl entDoc="TEIEXTE">
<peRef n="TEI.extensions.ent">
</dtdFrag></p>
 
<p>The second type of modification needed is most conveniently performed
after all the standard TEI parameter entities have been declared; this
allows the element declarations provided by the user to make use of the
parameter entities which define standard TEI content models and
attribute definitions.  To facilitate this, the parameter entity
<ident type="pe">TEI.extensions.dtd</ident> is used to embed local element
declarations <emph>before</emph> any of the TEI tag sets are embedded by
the file <ident type="file">tei2.dtd</ident>, but <emph>after</emph> all
the TEI element classes and other parameter entities have been declared.</p>
 
<p>The task of declaring the non-standard <gi tei="no">it</gi> and <gi
tei="no">bd</gi> elements is thus simplified:  they can, for example, use
the same parameter entities as the <gi>hi</gi> element.  A suitable
local DTD-modifications file might look like the following (note that
the standard parameter-entity reference for phrase sequence is used):
 
<eg>
<![ CDATA [
 <!ELEMENT it           - -  (%phrase.seq)                      >
 <!ATTLIST it
           id                ID             #IMPLIED
           lang              IDREF          %INHERITED
           n                 CDATA          #IMPLIED
           rend              CDATA          #FIXED 'italics'    >
 <!ELEMENT bd           - -  (%phrase.seq)                      >
 <!ATTLIST bd
           id                ID             #IMPLIED
           lang              IDREF          %INHERITED
           n                 CDATA          #IMPLIED
           rend              CDATA          #FIXED 'boldface'   >
]]>
</eg></p>
 
<p>For further examples of local modifications to both parameter
entities and element declarations, see chapter <xref target="MD">.</p>
 
<p>The relevant fragment of the DTD is this:
<dtdFrag id="DSTOVLO" n="Embed local element declarations, etc.">
<commDecl>Embedding local modifications here allows user modifications
to use all the standard TEI element classes and parameter entities.
</commDecl>
 
<entDecl entDoc="TEIEXTD">
<peRef n="TEI.extensions.dtd">
</dtdFrag></p></div3>
 
<div3 id="STOVCO"><head>Embedding the Core Tag Sets</head>
 
<p>The core tag sets are embedded by the file <ident type="file">tei2.dtd</ident> using the parameter entities <ident
type="pe">TEI.header</ident> and <ident type="pe">TEI.core</ident>.  The
relevant fragment of the DTD is this:
 
<dtdFrag id="DSTOVCO" n="Embed the core tag sets">
<commDecl>These occur in all documents and are therefore defined
unconditionally.</commDecl>
<entDecl entDoc="TEIHDR">
<peRef n="TEI.header.dtd">
<entDecl entDoc="TEICORE">
<peRef n="TEI.core.dtd">
</dtdFrag></p>
 
<p>The default text structure tags, which are also documented as part of
the core, are embedded by the base tag set, unless the base defines its
own text structure tags; see the chapters on the individual bases.</p></div3>
 
<div3 id="STOVBA"><head>Embedding the Base Tag Set</head>
 
<p>The <ident type="file">tei2.dtd</ident> file embeds the appropriate
files for the base tag set previously selected by means of the parameter
entities described in section <xref target="STBA">.  A parameter entity
for the file containing the relevant DTD fragment is declared and
referred to inside a conditional marked section controlled by the
appropriate parameter entity.  The relevant fragment of <ident
type="file">tei2.dtd</ident> is this:
 
<dtdFrag id="DSTOVBA" n="Embed base tag set">
<commDecl>A different base will be embedded, depending on which
parameter entity has been declared by the user
with the value 'INCLUDE'.</commDecl>
 
<msection keywords="%TEI.prose">
<entDecl entDoc="PRDTD">
<peRef n="TEI.prose.dtd">
</msection>
 
<msection keywords="%TEI.verse">
<entDecl entDoc="VEDTD">
<peRef n="TEI.verse.dtd">
</msection>
 
<msection keywords="%TEI.drama">
<entDecl entDoc="DRDTD">
<peRef n="TEI.drama.dtd">
</msection>
 
<msection keywords="%TEI.spoken">
<entDecl entDoc="TSDTD">
<peRef n="TEI.spoken.dtd">
</msection>
 
<msection keywords="%TEI.dictionaries">
<entDecl entDoc="DIDTD">
<peRef n="TEI.dictionaries.dtd">
</msection>
 
<msection keywords="%TEI.terminology">
<entDecl entDoc="TEDTD">
<peRef n="TEI.terminology.dtd">
</msection>
 
<msection keywords="%TEI.general">
<entDecl entDoc="CBGEDTD">
<peRef n="TEI.general.dtd">
</msection>
 
<msection keywords="%TEI.mixed">
<entDecl entDoc="CBMXDTD">
<peRef n="TEI.mixed.dtd">
</msection>
 
</dtdFrag>
<!-- <msection keywords='%TEI.letters'>                       -->
<!-- <entDecl entDoc=LMDTD>                                   -->
<!-- <peRef n='TEI.letters.dtd'>                              -->
<!-- </msection>                                              --></p></div3>
 
 
<div3 id="STOVAD"><head>Embedding the Additional Tag Sets</head>
 
<p>The <ident type="file">tei2.dtd</ident> file embeds the appropriate
files for any additional base tag set previously enabled by means of the
parameter entities described in section <xref target="STBA">.  A parameter
entity for the file containing the relevant DTD fragment is declared and
referred to, inside a conditional marked section controlled by the
appropriate parameter entity.  The relevant fragment of <ident
type="file">tei2.dtd</ident> is this:
 
 
<dtdFrag id="DSTOVAD" n="Embed additional tag sets">
<commDecl>These entities are declared and embedded only when the user
has overridden the default declaration of IGNORE for a specific
additional tag set.
</commDecl>
<msection keywords="%TEI.linking">
<entDecl entDoc="SADTD">
<peRef n="TEI.linking.dtd">
</msection>
 
<msection keywords="%TEI.analysis">
<entDecl entDoc="AIDTD">
<peRef n="TEI.analysis.dtd">
</msection>
 
<msection keywords="%TEI.fs">
<entDecl entDoc="FSDTD">
<peRef n="TEI.fs.dtd">
</msection>
 
<msection keywords="%TEI.certainty">
<entDecl entDoc="CEDTD">
<peRef n="TEI.certainty.dtd">
</msection>
 
<msection keywords="%TEI.transcr">
<entDecl entDoc="PHDTD">
<peRef n="TEI.transcr.dtd">
</msection>
 
<msection keywords="%TEI.textcrit">
<entDecl entDoc="TCDTD">
<peRef n="TEI.textcrit.dtd">
</msection>
 
<msection keywords="%TEI.names.dates">
<entDecl entDoc="NDDTD">
<peRef n="TEI.names.dates.dtd">
</msection>
 
<msection keywords="%TEI.nets">
<entDecl entDoc="GDDTD">
<peRef n="TEI.nets.dtd">
</msection>
 
<msection keywords="%TEI.figures">
<entDecl entDoc="FTDTD">
<peRef n="TEI.figures.dtd">
</msection>
 
<msection keywords="%TEI.corpus">
<entDecl entDoc="CCDTD">
<peRef n="TEI.corpus.dtd">
</msection>
 
</dtdFrag>
 <!-- <msection keywords='%TEI.formulas'>                      -->
<!-- <entDecl entDoc=FTDTD>                                   -->
<!-- <peRef n='TEI.formulas.dtd'>                             -->
<!-- </msection>                                              -->
</p>
</div3></div2>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-default-dtd-file:"~/lib/psgml/p2odd.ced"
sgml-parent-document:(quote ("/home/tei/P3/Master/Odds/p2.odd" "tei.1" "text" "body" "div1" "div2"))
sgml-omittag:t
sgml-shorttag:t
End:
-->
<?tei:EOF p2stov.odd ?>
