Skip to content

Commit

Permalink
Some updates to TEI Pointers.
Browse files Browse the repository at this point in the history
  • Loading branch information
hcayless committed Sep 3, 2023
1 parent d34c180 commit 1d2909f
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions P5/Source/Guidelines/en/SA-LinkingSegmentationAlignment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -746,13 +746,12 @@ kinds of object:
<list type="gloss">
<label>Node</label>
<item>A node is an instance of one of the node kinds defined in
the <ref target="https://www.w3.org/TR/xpath-datamodel/">XQuery
1.0 and XPath 2.0 Data Model (Second Edition)</ref>. It represents
the <ref target="https://www.w3.org/TR/xpath-datamodel/">XQuery and XPath Data Model 3.1</ref>. It represents
a single item in the XML information set for a document. For pointing
purposes, the only nodes that are of interest are Text Nodes,
Element Nodes, and Attribute Nodes.</item>
<label>Sequence</label>
<item>A Sequence follows the definition in the XPath 2.0 Data
<item>A Sequence follows the definition in the XPath 3.1 Data
Model, with one alteration. A Sequence is an ordered collection
of zero or more items, where an item is either a node or a partial
text node.
Expand Down Expand Up @@ -829,7 +828,7 @@ scheme.</p>
<head>xpath()</head>
<p><code>Sequence xpath(XPATH)</code></p>
<p>The <name type="xpscheme">xpath()</name> scheme locates zero or more nodes within an XML
Information Set. The single argument <rs>XPATH</rs> is an XPath selection pattern, as
Information Set. The single argument XPATH is an XPath selection pattern, as
defined in <ref target="https://www.w3.org/TR/xslt-30/#dt-selection-pattern">XSLT
3.0</ref>, that returns a node or sequence of nodes. XPaths returning atomic values
(e.g. <name>substring()</name>) are illegal in the <name type="xpscheme">xpath()</name>
Expand Down Expand Up @@ -882,11 +881,11 @@ recommended when possible.</p>

<div type="div4" xml:id="SATSL">
<head>left()</head>
<p><rs>Point</rs> <code>left( IDREF | XPATH )</code></p>
<p><code>Point left( IDREF | XPATH )</code></p>
<p>The <name type="xpscheme">left()</name> scheme locates the
point immediately preceding the node addressed by its argument,
which is either an <rs>XPATH</rs> as defined above or an
<rs>IDREF</rs>, the value of an <att>xml:id</att>
which is either an XPATH as defined above or an
IDREF, the value of an <att>xml:id</att>
occurring in the document addressed by the base URI in effect
for the pointer.</p>
<p>Example: the pointer <code>#left(//supplied[1])</code>
Expand All @@ -895,11 +894,11 @@ indicates the point between the first <code>lb</code> and the first
<p>Example: <code>#left(//gap[1])</code> indicates the point immediately before
the first <code>gap</code> element in line two and the string <code>si</code>.</p>
<p>Example: <code>#left(line1)</code> indicates the point immediately before
the <code><![CDATA[<lb n="1"/>]]></code> element.</p></div>
the <tag>lb n="1"</tag> element.</p></div>

<div type="div4" xml:id="SATSR">
<head>right()</head>
<p><rs>Point</rs> <code>right( IDREF | XPATH )</code></p>
<p><code>Point right( IDREF | XPATH )</code></p>
<p>The <name type="xpscheme">right()</name> scheme locates the
point immediately following the node addressed by its argument.</p>
<p>Example: the pointer <code>#right(//lb[@n='3'])</code>
Expand All @@ -910,12 +909,12 @@ in the <ref target="#SATSXP-ex">example</ref>.</p>

<div type="div4" xml:id="SATSSI">
<head>string-index()</head>
<p><rs>Point</rs> <code>string-index( IDREF | XPATH, OFFSET )</code></p>
<p><code>Point string-index( IDREF | XPATH, OFFSET )</code></p>
<p>The <name type="xpscheme">string-index()</name> scheme locates a
point based on character positions in a text stream relative
to the node identified by the IDREF or XPATH parameter. The <rs>OFFSET</rs>
to the node identified by the IDREF or XPATH parameter. The OFFSET
parameter is a positive, negative, or zero integer which determines
the position of the <rs>point</rs>. An offset of 0 represents the
the position of the point. An offset of 0 represents the
position immediately before the first character in either the first
text node descendant of the node addressed in the first parameter or the
first following text node, if the addressed element contains
Expand All @@ -925,8 +924,7 @@ between the <q>s</q> and the <q>i</q> in the word <q>si</q> in line 2.</p>
<p><hi rend="bold">Note</hi>: The OFFSET parameter (and similarly the
LENGTH parameter found below in the <name type="xpscheme">string-range()</name>
scheme) are measured in characters. What is considered a single character will
depend (assuming the document being evaluated is in Unicode) on the
Normalization Form in use (see
depend on the Normalization Form in use (see
<ref target="https://unicode.org/reports/tr15/">UNICODE NORMALIZATION
FORMS</ref>). A letter followed by a combining diacritic counts as two
characters, but the same diacritic precombined with a letter would count
Expand All @@ -942,15 +940,15 @@ counting.</p>

<div type="div4" xml:id="SATSRN">
<head>range()</head>
<p><rs>Sequence</rs> <code>range( POINTER, POINTER[, POINTER, POINTER ...])</code></p>
<p><code>Sequence range( POINTER, POINTER[, POINTER, POINTER ...])</code></p>
<p>The <name type="xpscheme">range()</name> scheme takes as parameters one
or more pairs of <rs>POINTER</rs>s, which are each members of the set <rs>IDREF</rs>,
<rs>XPATH</rs>, <name type="xpscheme">left()</name>,
or more pairs of POINTERs, which are each members of the set IDREF,
XPATH, <name type="xpscheme">left()</name>,
<name type="xpscheme">right()</name>, or
<name type="xpscheme">string-index()</name>. A
<name type="xpscheme">range()</name> locates a (possibly non-contiguous)
sequence beginning at the first POINTER parameter and ending at the
last. If the POINTER locates a node (i.e. is an XPATH or IDREF), then
last. If a POINTER locates a node (i.e. is an XPATH or IDREF), then
that node is a member of the addressed sequence. If a sequence addressed
by a range pointer overlaps, but does not wholly contain, an element
(i.e. it contains only the start but not the end tag or vice-versa),
Expand All @@ -971,17 +969,17 @@ the non-contiguous sequence <q>in mentem</q>.</p>

<div type="div4" xml:id="SATSSR">
<head>string-range()</head>
<p><rs>Sequence</rs> <code>string-range(IDREF | XPATH, OFFSET, LENGTH[, OFFSET, LENGTH ...])</code></p>
<p><code>Sequence string-range(IDREF | XPATH, OFFSET, LENGTH[, OFFSET, LENGTH ...])</code></p>
<p>The string-range() scheme
locates a sequence based on character positions in a text stream relative
to the node identified by the first parameter. The location of the
beginning of the addressed sequence is determined precisely
as for <name type="xpscheme">string-index()</name>. The <rs>OFFSET</rs>
as for <name type="xpscheme">string-index()</name>. The OFFSET
parameter is defined as above in <name type="xpscheme">string-index()</name>.
The <rs>LENGTH</rs> parameter is a positive integer that denotes
The LENGTH parameter is a positive integer that denotes
the length of the text stream captured by the sequence. As with
<name type="xpscheme">range()</name>, the addressed sequence may
contain text nodes and/or elements. The
contain text nodes and elements. The
<name type="xpscheme">string-range()</name> scheme can accept multiple
OFFSET, LENGTH pairs to address a non-contiguous sequence in much the
same way that range() can accept multiple pairs of pointers.</p>
Expand All @@ -1002,7 +1000,7 @@ the non-contiguous sequence <q>in mentem</q>.</p>

<div type="div4" xml:id="SATSMA">
<head>match()</head>
<p><rs>Sequence</rs> <code>match(IDREF | XPATH, 'REGEX' [, INDEX])</code></p>
<p><code>Sequence match(IDREF | XPATH, 'REGEX' [, INDEX])</code></p>
<p>The match scheme locates a sequence based on matching the REGEX parameter
against a text stream relative to the reference node identified by the first
parameter. REGEX is a regular expression as defined by
Expand Down

0 comments on commit 1d2909f

Please sign in to comment.