XStandoff Examples

Differentiating between containment and dominance

As presented by C.M. Sperberg-McQueen and Claus Huitfeldt in their talk at Balisage 2008, one may differentiate between the two concepts of containment and dominance. The former should be regarded as "the transitive closure of the parent/child relation" while the latter is regarded as "superset/subset relation on the leaf nodes reachable from a node by following parent-child arcs" (quotation taken from the above paper). They demonstrated this by the very same Alice example that we used to demonstrate discontinuous segments (cf. alice.html).

The text

[TXT]

Alice was beginning to get very tired of sitting by her sister on the bank and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, "and what is the use of a book," thought Alice, "without pictures or conversations?"

The annotation level

Only one annotation level is used: the logical document structure containing both the paragraph (p) and the quote (q) elements.

<p>
Alice was beginning to get very tired of sitting by her sister on the bank,
and of having nothing to do: once or twice she had peeped into the book her sister
was reading, but it had no pictures or conversations in it, 
<q>and what is the use of a book,</q>
thought Alice
<q>without pictures or conversation?</q>
</p>

The XStandoff instances

In XStandoff one may encode dominance as hierarchical relationship between the two nodes p and q while containment may be encoded via the corresponding segments' start and end positions. This example may serve as evidence that XStandoff uses the GODDAG data model.
Following the original example in Sperberg-McQueen and Huitfeldt, 2008 we end with two possible XStandoff instances.

p does not dominate q
[XML]

In the first XStandoff instance the p element does not dominate the q element. We achieve this by using the rule R5 in in Sperberg-McQueen and Huitfeldt, 2008 stating that "Given two nodes A and B, if A dominates B, then A contains B" (dominance, i.e., parent-child relation, entails containment).

<?xml version="1.0" encoding="UTF-8"?>
<xsf:corpusData xmlns:xsf="http://www.xstandoff.net/2009/xstandoff/1.1"
  xmlns="http://www.xstandoff.net/2009/xstandoff/1.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.xstandoff.net/2009/xstandoff/1.1 
  http://www.xstandoff.net/2009/xstandoff/1.1/xsf.xsd" xml:id="alice">
  <xsf:primaryData start="0" end="302">
    <xsf:textualContent>Alice was beginning to get very tired of sitting by her sister on the
    bank and of having nothing to do: once or twice she had peeped into the book her sister was
    reading, but it had no pictures or conversations in it, "and what is the use of a book,"
    thought Alice, "without pictures or conversations?"</xsf:textualContent>
  </xsf:primaryData>
  <xsf:segmentation>
    <xsf:segment xml:id="seg1" type="char" start="0" end="302"/>
    <xsf:segment xml:id="seg2" type="char" start="218" end="250"/>
    <xsf:segment xml:id="seg3" type="char" start="266" end="302"/>
    <xsf:segment xml:id="seg4" type="seg" segments="seg2 seg3" mode="disjoint"/>
  </xsf:segmentation>
  <xsf:annotation>
    <xsf:level xml:id="alice-log">
      <xsf:layer xmlns:log="http://www.xstandoff.net/alice/log"
        xsi:schemaLocation="http://www.xstandoff.net/alice/log ../xsd/alice_log.xsd" priority="0">
        <log:text xsf:segment="seg1">
          <log:p xsf:segment="seg1"/>
          <log:q xsf:segment="seg4"/>
        </log:text>
      </xsf:layer>
    </xsf:level>
  </xsf:annotation>
</xsf:corpusData>
p dominates the q fragments
[XML]

In the second possible XStandoff instance the p element dominates the two q fragments.

<?xml version="1.0" encoding="UTF-8"?>
<xsf:corpusData xmlns:xsf="http://www.xstandoff.net/2009/xstandoff/1.1"
  xmlns="http://www.xstandoff.net/2009/xstandoff/1.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.xstandoff.net/2009/xstandoff/1.1 
  http://www.xstandoff.net/2009/xstandoff/1.1/xsf.xsd" xml:id="alice">
  <xsf:primaryData start="0" end="302">
    <xsf:textualContent>Alice was beginning to get very tired of sitting by her sister on the
    bank and of having nothing to do: once or twice she had peeped into the book her sister was
    reading, but it had no pictures or conversations in it, "and what is the use of a book,"
    thought Alice, "without pictures or conversations?"</xsf:textualContent>
  </xsf:primaryData>
  <xsf:segmentation>
    <xsf:segment xml:id="seg1" type="char" start="0" end="302"/>
    <xsf:segment xml:id="seg2" type="char" start="218" end="250"/>
    <xsf:segment xml:id="seg3" type="char" start="266" end="302"/>
    <xsf:segment xml:id="seg4" type="seg" segments="seg2 seg3" mode="disjoint"/>
  </xsf:segmentation>
  <xsf:annotation>
    <xsf:level xml:id="alice-log">
      <xsf:layer xmlns:log="http://www.xstandoff.net/alice/log"
        xsi:schemaLocation="http://www.xstandoff.net/alice/log ../xsd/alice_log.xsd" priority="0">
        <log:text xsf:segment="seg1">
          <log:p xsf:segment="seg1">
            <log:q xsf:segment="seg2"/>
            <log:q xsf:segment="seg3"/>
          </log:p>
        </log:text>
      </xsf:layer>
    </xsf:level>
  </xsf:annotation>
</xsf:corpusData>