<?tei:SOF p2aisp.odd ?>
<!--* $Id: p2aisp.odd,v 1.7 1998/02/01 17:45:38 tei Exp $ *-->
<!--*
    **
    * $Log: p2aisp.odd,v $
    * Revision 1.7  1998/02/01 17:45:38  tei
    * *** empty log message ***
    *
    * Revision 1.6  98/01/28  11:44:14  cmsmcq
    * LB changes of Jan 1998 and RCS keywords added.
    * 
    *-->
<!-- Revisions:                                               -->
<!-- 5 Jan 98 : LB : fix 2 typos in egs -->
<!-- 26 feb: move description of ANA here -->
<!-- 93-11-26 : MSM : cosmetic and typos                      -->
<!-- 93-11-23 : MSM : provide correct pointer to saag for JOIN -->
<!-- 93-07-04 :  DTL :  Renumber to AIsp.  Change < fvp >     -->
<!--   to < span > and < fvpGrp > to < spanGrp >. Add         -->
<!--   < interp > and < interpGrp > tags, the first defined   -->
<!--   by omitting from= and to= from < span >, the second    -->
<!--   the corresponding grouping tag.  Change title to       -->
<!--   "Spans and Interpretations".  < span > has been        -->
<!--   removed from COnono section. Remove < analysis >       -->
<!--   tags.  Add Lessing example.                            -->
<!-- 30 Mar 93 :  LB renumber to AIfvp                        -->
<!-- 18 Jul 92 :  DTL :  Renumber from p2.444 to p2.445.      -->
<!-- 15 Jul 92 :  DTL :  Add < analysis > tags.               -->
<!-- 13 Jul 92 :  DTL :  Correct ODD tagging.                 -->
<!-- 01 Jul 92 :  DTL :  Define grouping tag < fvpGrp >.      -->
<!--   Assign section number p2.444.                          -->
<!-- 30 Jun 92 :  DTL :  Complete draft, modifying text from  -->
<!--   old section P2.234 on < span >. Change the Sigmund     -->
<!--   example to eliminate most anchors.  Make other changes -->
<!--   in the definition of < span > in accordance with an    -->
<!--   exchange between DTL and CMSMcQ on TEI-TECH in early   -->
<!--   June.  However, make from= required and to= optional,  -->
<!--   in conformity with their use in other pointing tags.   -->
<!--   Change name of tag to < fvp >. Rename type= as         -->
<!--   feature=.  Write TAGDOC.                               -->
 
<div2 id=AIATTS><head>Global Attributes for Simple Analyses</head>
 
<p>When the tag set described by this chapter is selected, an
additional attribute is defined for all elements:
 
<adList classDoc=CLANA atts='ana'>
 
The <att>ana</att> attribute may be specified for  any SGML element.
Its effect is to  associate the element with one or more others
representing an analysis or interpretation of it. Its target should be
one of the elements described in the section <xref target=AISP> below,
or some other interpretative element such as <gi>note</gi>, on which 
see section <xref target=CONO> or <gi>fs</gi>, on which see chapter
<xref target=FS>.


<!-- interp class should be a subclass of metadata maybe, except -->
<!-- that if interp includes note and fs their positions in tree -->
<!-- are constrained -->

<!-- Fixed problem raised by following comment. LB -->
 
<!-- Oh, damn.  Just realized this obvious constraint means   -->
<!-- that INST probably should not be a global attribute at   -->
<!-- all, but instead a class with members SPAN, SPANGRP,     -->
<!-- INTERP, INTERPGRP, FS.  Hmm.  If you want to change it   -->
<!-- now, I'll agree; otherwise, let it wait for P4.  Or      -->
<!-- maybe we can provide a rationale / rationalization:      -->
<!-- (msm)                                                    -->
 
<!-- deleted following para pending clarification -->

<!-- <p>When used on elements other than the overtly -->
<!-- interpretive <gi>span</gi>, <gi>interp</gi>, etc., the -->
<!-- <att>inst</att> attribute serves both to indicate that the -->
<!-- element bearing it is to be regarded in some sense as an -->
<!-- interpretive one, as well as serving to provide a link to -->
<!-- the text being interpreted.  It ought not, however, to be -->
<!-- used as a substitute for the <att>target</att> attributes -->
<!-- of <gi>note</gi> and other elements. -->
 
<!-- why do we need INST  attribute anyway? I'd kill it if I hadnt -->
<!-- just spent an hour defining it, dammitall: whats the diff  -->
<!-- between inst and the various target attributes? I now suspect -->
<!-- it makes sense *only* as a global - and not much then! -->

 
<p>The <att>ana</att> attribute is formally declared as follows:
 
<dtdFrag id=DAIGA
         n='Global attribute for analysis'>
<claDecl classDoc=CLANA type=atts>
</dtdFrag>

<div2 id=AISP><head>Spans and Interpretations</head>
 
<p>The simplest mechanisms for attaching analytic notes in some
structured vocabulary to particular passages of text are provided by the
empty <gi>span</gi> and <gi>interp</gi> elements, and their associated
grouping elements <gi>spanGrp</gi> and <gi>interpGrp</gi>.
 
<tagList>
<tagDesc tagDoc=SPAN atts='value from to'>
<tagDesc tagDoc=SPANGRP>
<tagDesc tagDoc=INTERP atts='value'>
<tagDesc tagDoc=INTERPGP >
</tagList>
 
<p>These elements are all members of the class <ident
type=class>interpret</ident>, and thus share the following attributes:

<adList classDoc=CLINTERP atts='resp type inst'>

<p>The <att>type</att> and <att>value</att> attributes of the
<gi>span</gi> and <gi>interp</gi> elements may be used to associate an
interpretive name, type, and
value with a specific stretch (or <term>span</term>) of
text.  In the case of the <gi>span</gi> element, the span of text being
annotated is indicated by values of the <att>from</att> and
<att>to</att> attributes, the value of each being a pointer.  If
the optional <att>to</att> attribute is omitted, the span consists just
of the element pointed at by the obligatory <att>from</att> attribute.
In the case of <gi>interp</gi> (see below), the span is indicated by a
pointer from a <gi>link</gi> element or some similar mechanism.  Here is
an example of the <gi>span</gi> element.
 
<eg><![ CDATA [
<p id=MQP1S2P114>
<s id=MQP1S2P114S1>There was certainly a definite point
at which the thing began.</s>
 
<s id=MQP1S2P114S2>It was not; then it was suddenly
inescapable, and nothing could have frightened it
away.</s>
 
<s id=MQP1S2P114S3>There was a slow integration,
during which she, and the little animals, and the moving
grasses, and the sun-warmed trees, and the slopes of
shivering silvery mealies, and the great dome of blue
light overhead, and the stones of earth under her feet,
became one, shuddering together in a dissolution
of dancing atoms.</s>
 
<s id=MQP1S2P114S4>She felt the rivers under the ground
forcing themselves pain&shy;fully along her veins,
swelling them out in an unbearable pressure; her flesh
was the earth, and suffered growth like a ferment; and
her eyes stared, fixed like the eye of the sun.</s>
 
<s id=MQP1S2P114S5>Not for one second longer (if the
terms for time apply) could she have borne it; but then,
with a sudden movement forwards and out, the whole
process stopped; and <emph rend=italic>that</emph> was
<soCalled rend=dquo>the moment</soCalled> which it was
impossible to remember afterwards.</s>
 
<span resp=DTL
      value='the moment'
      from=MQp1s2p114s3
      to=MQp1s2p114s5>
 
<s id=MQP1S2P114S6>For during that space of time (which
was timeless) she understood quite finally her
smallness, the unimportance of humanity.</s>
 
<!-- ... -->
</p>
]]>
</eg>
<!-- Doris Lessing, Martha Quest, 1952, p52-53  -->
 
<p>The <gi>span</gi> element may, as in this example, be placed in the
text near the textual span it is associated with, or it may be placed
outside the text enclosed within a <gi>spanGrp</gi> element as follows.
 
<eg><![ CDATA [
<spanGrp resp=DTL>
  <span value='the moment' from=MQp1s2p114s3 to=MQp1s2p114s5>
</spanGrp>
]]>
</eg>
 
As may be seen, the <att>type</att> attribute may be omitted in order to
associate a span of text simply with a descriptive name.
 
<p>Spans may also be used to represent the structural divisions assigned
to the narrative by an interpreter.  Consider the following narrative:
 
<q rend=display>
<p>Sigmund, the son of Volsung, was a king in Frankish country.
Sinfiotli was the eldest of his sons, the second was Helgi, the
third Hamund.
Borghild, Sigmund's wife, had a brother named ----
But Sinfiotli, her stepson, and ---- both wooed the same woman
and Sinfiotli killed him over it.<note place=foot>The rule marks spaces
left for the missing name in the manuscript.</note>
And when he came home, Borghild asked him to go away,
but Sigmund offered her weregild, and she was obliged to accept it.
At the funeral feast Borghild was serving beer.  She took poison, a big
drinking horn full, and brought it to Sinfiotli.  When Sinfiotli looked
into the horn, he saw that poison was in it, and said to Sigmund <q>This
drink is cloudy, old man.</q> Sigmund took the horn and drank it off.
It is said that Sigmund was hardy and that poison did him no harm,
inside or out.  And all his sons could tolerate poison on their skin.
Borghild brought another horn to Sinfiotli, and asked him to drink, and
everything happened as before.  And a third time she brought him a horn,
and reproachful words as well, if he didn't drink from it.  He spoke
again to Sigmund as before.  He said <q>Filter it through your mustache,
son!</q> Sinfiotli drank it off and at once fell dead.

<p>Sigmund carried him a long way in his arms and came to a long,
narrow fjord, and there was a small boat there and a man in it.  He
offered to ferry Sigmund over the fjord.  But when Sigmund carried the
body out to the boat, it was fully laden.  The man said Sigmund should
go around the fjord inland.  The man pushed the boat out and then
suddenly vanished.

<p>King Sigmund lived a long time in Denmark in the kingdom of
Borghild, after he married her.  Then he went south to Frankish lands,
to the kingdom he had there.  Then he married Hiordis, the daughter of
King Eylimi.  Their son was Sigurd.  King Sigmund fell in a battle with
the sons of Hunding.  And then Hiordis married Alf, the son of King
Hialprec.  Sigurd grew up there as a boy.

<p>Sigmund and all his sons were tall and outstanding in their
strength, their growth, their intelligence, and their accomplishments.
But Sigurd was the most outstanding of all, and everyone who knows about
the old days says he was the most outstanding of men and the noblest of
all the warrior kings.
</q>
<!-- "Fr&aacute; dau&eth;a Sinfi&otail;tla," in Edda:  Die    -->
<!-- Lieder des Codex Regius nebst verwandten                 -->
<!-- Denkm&auml;lern, ed.  Gustav Neckel, Vol.  I, Text, 4th  -->
<!-- ed. revised by Hans Kuhn (Heidelberg:  Carl Winter,      -->
<!-- 1962), pp. 162-3.  Tr. CMSMcQ                            -->
 
<p>A structural analysis of this text, dividing it into narrative units
in a pattern shared with other texts from the same literature, might
look like this:
 
<eg>
<![ CDATA [
<p id=P1>
<s id=S1>Sigmund ... was a king in Frankish country.</s>
<s id=S2>Sinfiotli was the eldest of his sons.</s>
<s id=S3>Borghild, Sigmund's wife, had a brother ... </s>
<s id=S4A>But Sinfiotli ... wooed the same woman</s>
<s id=S4B>and Sinfiotli killed him over it.</s>
<s id=S5>And when he came home, ... she was obliged to accept it.</s>
<s id=S6>At the funeral feast Borghild was serving beer.</s>
<s id=S7>She took poison ... and brought it to Sinfiotli.</s>
<!-- ... -->
<s id=S17>Sinfiotli drank it off and at once fell dead.</s>
<anchor id=NIL1>
<p id=P2>Sigmund carried him a long way in his arms ... </p>
<p id=P3>King Sigmund lived a long time in Denmark ... </p>
<p id=P4>Sigmund and all his sons were tall ... </p>
 
<!-- ... -->
 
<span resp=TMA type='structural unit' value='introduction'
      from=S1 to=S3                                             >
<span resp=TMA type='structural unit' value='conflict'
      from=S4a                                                  >
<span resp=TMA type='structural unit' value='climax'
      from=S4b                                                  >
<span resp=TMA type='structural unit' value='revenge'
      from=S5 to=S17                                            >
<span resp=TMA type='structural unit' value='reconciliation'
      from=nil1                                                 >
<span resp=TMA type='structural unit' value='aftermath'
      from=P2 to=P4                                             >
]]>
</eg>
 
Note the use of an empty <gi>anchor</gi> element to provide a target for
the <soCalled>reconciliation</soCalled> unit which is normally part of
the narrative pattern but which is not realized in the text shown.
 
<p>If groups of <gi>span</gi> elements with the same <att>resp</att> or
<att>type</att> are used, as in this example, they may be grouped
together inside a <gi>spanGrp</gi> element, with the values of the
common attribute(s) inherited from the higher element, as follows.
 
<eg>
<![ CDATA [
<spanGrp resp=TMA type='structural unit'>
 <span value='introduction'   from=S1   to=S3 >
 <span value='conflict'       from=S4a        >
 <span value='climax'         from=S4b        >
 <span value='revenge'        from=S5   to=S17>
 <span value='reconciliation' from=nil1       >
 <span value='aftermath'      from=P2   to=P4 >
 </spanGrp>
]]>
</eg>
 
<p>The same analysis may be expressed with the <gi>interp</gi> element
instead of the <gi>span</gi> element; this element provide attributes
for recording an interpretive category and its value, as well as the
identity of the interpreter, but does not itself indicate which passage
of text is being interpreted; the same interpretive structures can thus
be associated with many passages of the text.  The association between
text passages and <gi>interp</gi> elements must be made either by
pointing from the text to the <gi>interp</gi> element with the
<att>ana</att> attribute defined in section <xref target=AIATTS>, or by
pointing at both text and interpretation from a <gi>link</gi> element,
as described in chapter <xref type=div1 target=SA>.
 
<p>To encode the first example above using <gi>interp</gi>, it is
necessary to create a text element which contains --- or corresponds to
--- the the third, fourth, and fifth orthographic sentences (S-units) in
the paragraph.  This can be done either with the <att>seg</att> element,
described in <xref type=div2 target=SASE>, or the <att>join</att>
element, described in <xref type=div2 target=SAAG>.  The resulting
element can then be associated with the <gi>interp</gi> element using the
<att>ana</att> attribute described in section <xref type=div1
target=AIATTS>.  We illustrate using the <gi>seg</gi> element.
 
<eg><![ CDATA [
<p id=MQP1S2P114>
<s id=MQP1S2P114S1>There was certainly a definite point ... </s>
<s id=MQP1S2P114S2>It was not; then it was suddenly inescapable ... </s>
<seg id=MQP1S2P114S3-5 ana=moment>
<s id=MQP1S2P114S3>There was a slow integration ... </s>
<s id=MQP1S2P114S4>She felt the rivers under the ground ... </s>
<s id=MQP1S2P114S5>Not for one second longer ... </s>
</seg>
<s id=MQP1S2P114S6>For during that space of time ... </s>
<!-- ... -->
</p>
<!-- ... -->
<interp id=MOMENT resp=DTL value='the moment'>
]]>
</eg>
 
<p>The second example above can be recoded using <gi>interp</gi> and
<gi>interpGrp</gi> tags in a similar manner.  The interpretation
itself can be expressed in an <gi>interpGrp</gi> element, which would
replace the <gi>spanGrp</gi> in the example shown above:
 
<eg>
<![ CDATA [
<interpGrp resp=TMA type='structural unit'>
 <interp id=INTRO    value='introduction'   >
 <interp id=CONFLICT value='conflict'       >
 <interp id=CLIMAX   value='climax'         >
 <interp id=REVENGE  value='revenge'        >
 <interp id=RECONCIL value='reconciliation' >
 <interp id=AFTERM   value='aftermath'      >
</interpGrp>
]]>
</eg>
 
<p>This <gi>interpGrp</gi> element would be linked to the text either
by means of the <att>ana</att> attribute, or by means of <gi>link</gi>
elements.  Using the <att>ana</att> attribute (on <gi>seg</gi> elements
introduced specifically for this purpose), the text would be encoded as
follows:
 
<eg>
<![ CDATA [
 
<p id=P1>
<seg id=S1-S3 ana=intro>
<s id=S1>Sigmund ... was a king in Frankish country.</s>
<s id=S2>Sinfiotli was the eldest of his sons.</s>
<s id=S3>Borghild, Sigmund's wife, had a brother ... </s>
</seg>
<s id=S4A ana=conflict>But Sinfiotli ... wooed the same woman</s>
<s id=S4B ana=climax>and Sinfiotli killed him over it.</s>
<seg id=S5-S17 ana=revenge>
<s id=S5>And when he came home, ... she was obliged to accept it.</s>
<s id=S6>At the funeral feast Borghild was serving beer.</s>
<!-- ... -->
<s id=S17>Sinfiotli drank it off and at once fell dead.</s>
</seg>
<anchor id=NIL1 ana=reconcil>
<p id=P2>Sigmund carried him a long way in his arms ... </p>
<p id=P3>King Sigmund lived a long time in Denmark ... </p>
<p id=P4>Sigmund and all his sons were tall ... </p>
<!-- ... -->
<join id=P2-P4 targets='P2 P3 P4' ana=afterm>
]]>
</eg>
 
<p>The linkage may also be accomplished using a <gi>linkGrp</gi> element,
whose content is a set of <gi>link</gi> elements which point to each
interpretive element and its corresponding text unit.  This method does
not require the use of the <att>ana</att> attribute on the text
units.
 
<eg>
<![ CDATA [
<linkGrp resp=TMA targFunc='text interpretation'>
  <link targets='intro    S1-S3'>
  <link targets='conflict S4a'>
  <link targets='climax   S4b'>
  <link targets='revenge  S5-S17'>
  <link targets='reconcil nil1'>
  <link targets='afterm   P2-P4'>
</linkGrp>
]]>
</eg>
 
<p>One obvious advantage of using <gi>interp</gi> rather than
<gi>span</gi> elements for the Sigmund text is that the <gi>interp</gi>
elements can be reused for marking up other texts in the same document,
whereas the <gi>span</gi> elements cannot.  Another is that the
<gi>interp</gi> element can be used to provide interpretations for
discontinuous text elements (represented by <gi>join</gi> elements).  On
the other hand, the use of <gi>interp</gi> elements may require the
creation of special text elements not otherwise needed (e.g. the
<gi>seg</gi> and the <gi>join</gi> in the revised encoding of the text),
whereas the the use of <gi>span</gi> elements does not.
 
<p>The formal declarations for the <gi>span</gi>, <gi>spanGrp</gi>,
<gi>interp</gi> and <gi>interpGrp</gi> elements are:
 
<dtdFrag id=DAISP n='Spans'>
<tagDecl tagDoc=SPAN>
<tagDecl tagDoc=SPANGRP>
<tagDecl tagDoc=INTERP>
<tagDecl tagDoc=INTERPGP>
</dtdFrag>
<?tei:EOF p2aisp.odd ?>
