<?tei:SOF p2stga.odd ?>
<!-- $Id: p2stga.odd,v 1.9 1998/02/05 17:14:35 tei Exp $ -->
<!--*
    * $Log: p2stga.odd,v $
    * Revision 1.9  1998/02/05 17:14:35  tei
    * make examples parse
    *
    * Revision 1.8  94/04/08  01:36:34  msmcq
    * Last-round changes before publication of P3
    * 
    * Revision 1.7  1994/03/28  16:34:42  msmcq
    * back out version 1.6, which once more overwrites msm changes in error
    * 
    * Revision 1.5  1994/03/27  23:03:43  msmcq
    * restore changes made in version 1.3, overwritten by 1.4 in error.
    * 
    * Revision 1.3  1994/03/24  22:20:40  msmcq
    * typos found by David Barnard et al. corrected
    * -->
<!-- P2.133 :  Global Attributes                              -->
<!-- Revisions:                                               -->
<!-- 94-04-07 : MSM : typos, minor fixes from MSM             -->
<!-- 94-03-22 : MSM : typos from DB, EBr, JLav                -->
<!-- 94-03-22 : MSM : retag some TERMs, Qs, as CODE, IDENT    -->
<!-- 94-03-21 : MSM : typos, corrections, stylistic changes   -->
<!--                  as suggested by WWP proofreading team   -->
<!--                  Including new paras on TEIform att      -->
<!-- 93-09-13 : MSM : add default declarations of inherited global atts -->
<!-- 93-04-06 : MSM : mostly cosmetic changes                 -->
<!-- 3 apr 93 : LB revise for publication                     -->
<!--     cut some kindergarten stuff; tried to obscure probs  -->
<!--   w. rendition and teiform; plus minor changes in wording -->
<!-- 93-03-30 : MSM : minor changes for LB                    -->
<!-- 93-03-16 : MSM : minor fixes for clarity, from J.Lav.    -->
<!-- 93-03-06 : MSM : fix xrefs to CO, HD                     -->
<!-- 93-03-06 : MSM : minor fixes for clarity                 -->
<!-- 93-03-06 : MSM : minor changes for pedantry              -->
<!-- 93-03-04 : MSM : trivial sgml fix                        -->
<!-- 93-01-27 : MSM : correct ref to ccedil                   -->
<!-- 21 Oct 92 : CMSMcQ : new name new id some text.          -->
<!-- 17 May 92 : CMSMcQ : began draft                         -->
 
<div2 id=STGA><head>Global Attributes</head>
 
<p>The following attributes are defined for every TEI element.<note>More
exactly, these are the attributes of the element class
<ident type=class>global</ident>, to which all elements belong; for
further discussion of attribute classes and ways in which attributes
may be inherited and over-ridden, see section <xref target=STECAT>.
</note>
 
<adList classDoc=GLOBAL atts='id n lang rend'>
 
<p>Some tag sets (e.g. those for terminology, linking, and analysis)
define other global attributes; these are documented in the appropriate
chapters of Part III and Part IV.  See also section <xref
target=STECAT>.
 
<p>An additional attribute, <att>TEIform</att>, is also defined
for every TEI element.  Unlike the other attributes defined for every
element, <att>TEIform</att> is not defined by class <ident
type=class>global</ident> because its default value is different in
every case and must be defined individually for each element.<note
place=foot>A dummy element class <ident type=class>TEIform</ident> is
defined in the reference section, solely for documentary purposes.
</note>
 
<adList classDoc=TEIFORM atts='TEIform'>
 
<p>Any TEI element may be given values for <att>id</att>, <att>n</att>,
<att>lang</att>, <att>rend</att>, or <att>TEIform</att>, simply by
specifying values for these attributes.
 
<!-- not sure if this is not too obvious here, but left it in for now -->
 
The following two examples convey the same information about the text:
that the material transcribed occurs within a <gi>p</gi> element
(paragraph).  They differ only in that the second provides an identifier
for the paragraph, to which other elements (e.g. notes or hypertext
links) can conveniently refer.
 
<eg>
<![ CDATA [
<p>If to do were as easy as to know what were
good to do, chapels had been churches and poor men's cottages
princes' palaces.  It is a good divine that follows his own
instructions ...</p>
]]>
</eg>
 
<eg>
<![ CDATA [
<p id='MV1.2.5'>If to do were as easy as to know what were
good to do, chapels had been churches and poor men's cottages
princes' palaces.  It is a good divine that follows his own
instructions ...</p>
]]>
</eg>
<!-- Merchant of Venice, I.ii, speech 5 (Portia)              -->
 
<p>ID values must be legal SGML names; by default, this means they must
begin with a letter from A to Z or a to z and contain no characters
other than the letters A to Z or a to z, the digits 0 to 9, the full
stop, and the hyphen.  Furthermore, by default upper and lower case
letters are not distinguished:  thus, the strings <cited>a23</cited> and
<cited>A23</cited> are identical, and may not be used to identify two
distinct elements.
 
<!-- delete from here .... -->
 
<!--                                                          -->
<!-- Under the reference concrete syntax of SGML, ID values   -->
<!-- do not distinguish between upper and lower case.  The    -->
<!-- following are thus legal names and thus legal values     -->
<!-- for  < att > id < /att > , of which the first two pairs are -->
<!-- synonyms:                                                -->
<!--                                                          -->
<!--  < list type=simple >                                    -->
<!--  < item > A                                              -->
<!--  < item > a                                              -->
<!--  < item > e23                                            -->
<!--  < item > E23                                            -->
<!--  < item > init.                                          -->
<!--  < item > Chapter.1                                      -->
<!--  < item > Ovid.Met.9.10-11                               -->
<!--  < item > x78y                                           -->
<!--  < /list >                                               -->
<!--                                                          -->
<!-- while the following are  < emph > not < /emph >  legal   -->
<!-- names in the default SGML syntax (though the SGML        -->
<!-- declaration might be modified to make some of them       -->
<!-- legal): < note place=foot > The first three are          -->
<!-- illegal because they do not begin with a letter; the     -->
<!-- last four because they contain non-name characters. <    -->
<!-- /note >                                                  -->
<!--                                                          -->
<!--  < list type=simple >                                    -->
<!--  < item > 23                                             -->
<!--  < item > 35mm                                           -->
<!--  < item > .init                                          -->
<!--  < item > a_name_with_underscores                        -->
<!--  < item > a name with spaces                             -->
<!--  < item > fran&ccedil;ais                                -->
<!--  < item > x*#$@!                                         -->
<!--  < /list >                                               -->
<!--                                                          -->
<!--  < p > ID values must be unique within the SGML          -->
<!-- document; if two elements                                -->
<!-- to here -->
 
If two elements are given the same identifier, the SGML parser will
signal a syntax error.  The following example, therefore, is
<emph>not</emph> valid:
 
<eg>
<![ CDATA [
<p id=PAGE1><q>What's it going to be then, eh?</q></p>
<p id=PAGE1>There was me, that is Alex, and my three droogs,
that is Pete, Georgie, and Dim, ... </p>
]]>
</eg>
<!-- Clockwork Orange, opening -->
 
<p>For a discussion of methods of providing unique identifiers for
elements, see section <xref target=CORS2>.
 
<p>The <att>n</att> attribute allows identifying information (e.g.
chapter numbers, etc.) to be encoded even if it would not be a legal
<att>id</att> value.  Its value may be any string of characters;
typically it is a number or other similar enumerator or label.  For
example, the numbers given to the items of a numbered list may be
recorded with the <att>n</att> attribute; this would make it possible to
record errors in the numeration of the original, as in this list of
chapters, transcribed from a faulty original in which the number 10 is
used twice, and 11 is omitted:
 
<eg>
<![ CDATA [
<list type=ordered>
<item n=1>About These Guidelines
<item n=2>A Gentle Introduction to SGML
<!-- ... -->
<item n=9>Verse
<item n=10>Drama
<item n=10>Spoken Materials
<!-- sic:  original has '10' twice! -->
<item n=12>Printed Dictionaries
<!-- ... -->
</list>
]]>
</eg>
 
The <att>n</att> attribute may also be used to record non-unique names
associated with elements in a text, possibly together with a unique
identifier as in the following examples:
 
<eg>
<![ CDATA [
  <div type=chap n='One' id='TXT0101'>
]]>
</eg>
 
<eg>
<![ CDATA [
  <div type=stanza n='xlii'>
]]>
</eg>
 
<p>The <att>lang</att> attribute indicates the language, writing system,
and character set associated with a given element and all its contents.
If it is not specified, the value is inherited from that of the
immediately enclosing element.  As a rule, therefore, it is simplest to
specify the base language of the text on the <gi>tei.2</gi> element, and
allow most elements to take the default value for <att>lang</att>; the
language of an element then need be explicitly specified only for
elements in languages other than the base language.
 
<p>The following two encodings convey the same information about the
language of the text, since in the first the <att>lang</att> attributes
on the <gi>emph</gi> elements specify the same value as that on the
parent <gi>p</gi> element, while in the second they inherit that value
without specifying it.
 
<eg>
<![ CDATA [
 <p lang=en> ... Both parties deprecated war, but one of
 them would <emph lang=en>make</emph> war rather than let
 the nation survive, and the other would <emph lang=en>accept
 </emph> war rather than let it perish, and the war came.</p>
]]>
</eg>
 
<eg>
<![ CDATA [
 <p lang=en> ... Both parties deprecated war, but one of
 them would <emph>make</emph> war rather than let
 the nation survive, and the other would <emph>accept</emph>
 war rather than let it perish, and the war came.</p>
]]>
</eg>
 
<!-- Lincoln's Second Inaugural Address, 4 March 1865, rpt.   -->
<!-- (from Richardson, ed., Messages and Papers, 6:276ff) in  -->
<!-- H. S. Commager, ed., Documents of American History, 5th  -->
<!-- ed.  (New York:  Appleton-Century-Crofts, 1949), p.      -->
<!-- 442.                                                     -->
 
<p>In the following example, by contrast, the <att>lang</att> attribute
on the <gi>term</gi> element must be given if we wish to record the fact
that the technical terms used are Latin rather than English; no
<att>lang</att> attribute is needed on the <gi>q</gi> element, by
contrast, because it is in the same language as its parent.  It is
strongly recommended that all language shifts in the source be
explicitly identified by use of the <att>lang</att> attribute, as
described in chapter <xref target=CH>.
 
<!-- Choose one?  i vote to keep both. -MSM -->
<!-- I chose one. -->
<!-- < eg > -->
<!-- < ! [ CDATA [ -->
<!--  < p lang=en > ... If they do afford him a remedy, is it -->
<!--  a < term lang=la >mandamus< /term> issuing from this court? ... -->
<!--  < / p > -->
<!-- ] ]> -->
<!-- < / eg > -->
<!-- Marbury v. Madison, 1 Cranch, 137 (1803), rpt. in H. S.  -->
<!-- Commager, ed., Documents of American History, 5th ed.    -->
<!-- (New York:  Appleton-Century-Crofts, 1949), p. 191.      -->
 
<eg>
<![ CDATA [
 <p lang=en>The constitution declares <q>that no bill of
 attainder or <term lang=la>ex post facto</term> law shall
 be passed.</q> ... </p>
]]>
</eg>
 
<!-- Marbury v. Madison, 1 Cranch, 137 (1803), rpt. in H. S.  -->
<!-- Commager, ed., Documents of American History, 5th ed.    -->
<!-- (New York:  Appleton-Century-Crofts, 1949), p. 192.      -->
 
<p>Formally, the <att>lang</att> attribute is an
<code type=kw>IDREF</code>; a reference
to the <att>id</att> value of a <gi>language</gi> element in the TEI
header.<note place=foot>SGML validation checks that all
<code type=kw>IDREF</code> values
exist as <att>id</att> values on elements somewhere in the current SGML
document.  It is a requirement of the TEI scheme, not of SGML, that the
<att>lang</att> attribute point to a <gi>language</gi> element.</note>
This means that each language used in the document should be declared in
the TEI header using the <gi>language</gi> element defined in section
<xref target=HD41>.
 
<p>The <att>rend</att> attribute is used to give information about the
physical presentation of the text in the source.  In the following
example, it is used to indicate that both the emphasized word and the
proper name are printed in italics:
 
<eg>
<![ CDATA [
 <p> ... Their motives <emph rend='italics'>might</emph> be
 pure and pious; but he was equally alarmed by his knowledge
 of the ambitious <name rend='italics'>Bohemond</name>, and
 his ignorance of the Transalpine chiefs: ...</p>
]]>
</eg>
 
<!-- Gibbon, Decline and Fall, chapter 58, para beginning     -->
<!-- 'In some Oriental tale I have read ...', p. 391 of       -->
<!-- Britannica edition.                                      -->
<!--  ... played fast and loose with by LB for pedagogic purposes -->
<!-- Shame, shame.                                            -->
 
If all or most <gi>emph</gi> and <gi>name</gi> elements are rendered in
the text by italics, it will be more convenient to register that fact in
the &tei; header once and for all and specify a <att>rend</att> value
only for any elements which deviate from the usual rendition.
 
<p>The contents of the <att>rend</att> attribute are free text.  In any
given project, encoders are advised to settle on a standard vocabulary
with which to describe typographic or manuscript rendition of the text,
and to document their usage of that vocabulary in the <gi>rendition</gi>
element of the &tei; header.
 
<!-- Although no consensus exists in practice, however, to    -->
<!-- allow for standardization of such vocabularies for all   -->
<!-- projects. The standard vo                                -->
<!--                                                          -->
<!-- < note place=foot >  [However, the < gi >                -->
<!-- encodingDesc < /gi >  or the  < gi > profileDesc < /gi   -->
<!-- >  does need to be able to document the language used,   -->
<!-- somehow.  Formal facilities for language definition      -->
<!-- would be useful but are out of the question:  no one     -->
<!-- knows how best to construct a rendition language.  It    -->
<!-- would be nice to be able at least to include prose or    -->
<!-- a bibliographic reference, though.  -MSM]  <  /note  >   -->
 
<p>The <att>TEIform</att> attribute is used to allow application
programs to handle TEI-encoded documents correctly even if some or all
elements have been renamed.  Most users can ignore this attribute
entirely; it is only relevant when the TEI DTDs are modified.  <note
place=foot>The <att>TEIform</att> attribute is based on the notion of
<term>architectural forms</term> developed for HyTime (ISO 10744).
<!-- The details, however, vary. -->
</note>
 
<p>The default value of <att>TEIform</att> for any element is the
generic identifier of that element, as described in this document.  The
value for <gi>p</gi> is <cited>p</cited>, the value for <gi>div1</gi> is
<cited>div1</cited>, etc.  When elements are renamed, as described in
chapter <xref target=MD>, the declaration of <att>TEIform</att> is not
modified.  If <gi>div1</gi> is renamed <gi tei=no>chapter</gi>, for
example, the default value of <att>TEIform</att> remains
<cited>div1</cited>.  An application program which does not recognize
the new generic identifier can check to see whether the attribute
<att>TEIform</att> exists, and examine its value if it does to find out
which TEI element, if any, is being used.
 
<p>Modifications of DTDs, however, may involve more than simple renaming
of elements:  sometimes elements are given not just new names, but
complete new definitions.  In such cases, the <att>TEIform</att>
attribute may be used to indicate the standard &tei; element
corresponding to the modified element.  For example, if a local
modification of a DTD renamed the <gi>div1</gi> element as <gi
tei=no>chapter</gi> and also modified its formal declarations (e.g. to
change its content model), then the <att>TEIform</att> attribute on the
modified element should be given the default value <code
type=val>div1</code>, in order to indicate that the local <gi
tei=no>chapter</gi> element is a modification of the standard &tei;
<gi>div1</gi>.
 
<p>When new elements are introduced, they may be identified as
specialized variants of existing &tei; elements by giving them the
appropriate default value for <att>TEIform</att>.  For example, if a
local element called <gi tei=no>quatrain</gi> were introduced, as a
specialized variant of the <gi>lg</gi> (line group) element which must
contain exactly four lines, then its declaration might give its
<att>TEIform</att> as <code type=val>lg</code>, to signify that a
quatrain is a particular type of line group, thus:
 
<eg>
<![ CDATA [
 <!ELEMENT quatrain - O (l, l, l, l)            >
 <!ATTLIST quatrain     %a.global
           TEIform      (lg)            'lg'    >
]]>
</eg>
 
 
<!-- Following paragraph deleted as being, alas, not true.    -->
<!-- It should be made true for P4.  (msm)                    -->
 
<!-- <p>Constraints on the use of <att>TEIform</att> (rules   -->
<!-- determining when it is legitimate, and when not, to      -->
<!-- identify a new element as corresponding to a given TEI   -->
<!-- element) are given in chapter <xref target=MD>.          -->
<!-- Further discussion of the relationship between the TEI   -->
<!-- DTD and other standard DTDs is given in chapter <xref    -->
<!-- target=OS>.                                              -->
 
 
<!-- < p >N.B. Future versions of the TEI encoding scheme     -->
<!-- may add new global attributes to relate TEI elements     -->
<!-- to the architectural forms of HyTime and the DTD being   -->
<!-- prepared by ICADD (International Committee on            -->
<!-- Accessible Document Design) to aid in the automatic      -->
<!-- conversion of electronic text to level-2 Braille.        -->
<!-- Would have been this version if their draft had been ready. -->
 
<p>The formal definition of the global attributes is as follows:
 
<dtdFrag id=DSTGA n='Global attributes'>
 
<commDecl>The global attributes are defined for every element in the TEI
tag set; individual declarations may be overridden by local declarations
for individual elements.</commDecl>
<commDecl>If the tag sets invoked by the user define extra global
attributes (they do this in their .ent file), then they are inherited by
GLOBAL; otherwise the parameter entities referred to expand to the empty
string, as shown here.  </commDecl>
 
<claDecl type=atts classDoc=DFTANA>
<claDecl type=atts classDoc=DFTLINK>
<claDecl type=atts classDoc=DFTTERM>
<claDecl type=atts classDoc=GLOBAL>
 
<commDecl>The TEIform attribute is also global, but is declared
individually for each element, not in a parameter entity
declaration.</commDecl>
</dtdFrag>
<!-- <claDecl type=atts classDoc=DFTSPOK>                     -->
<!-- <claDecl type=atts classDoc=DFTCERT>                     -->
<!-- <claDecl type=atts classDoc=DFTFS>                       -->
<?tei:EOF p2stga.odd ?>
