<?xml version='1.0' encoding='UTF-8'?>
<!-- AUTO-GENERATED — do not edit directly.
     Source:      schema/grobid.training.references.rng
     Regenerate:  python scripts/build-schema.py -->

<grammar xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" ns="http://www.tei-c.org/ns/1.0">

  <define name="teiHeader">
    <element name="teiHeader">
      <zeroOrMore>
        <choice>
          <ref name="encodingDesc"/>
          <ref name="fileDesc"/>
          <ref name="revisionDesc"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>

  <define name="fileDesc">
    <element name="fileDesc">
      <optional>
        <attribute name="id" ns="http://www.w3.org/XML/1998/namespace"/>
      </optional>
      <zeroOrMore>
        <choice>
          <ref name="editionStmt"/>
          <ref name="publicationStmt"/>
          <ref name="sourceDesc"/>
          <ref name="titleStmt"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>

  <define name="titleStmt">
    <element name="titleStmt">
      <zeroOrMore>
        <choice>
          <ref name="author"/>
          <ref name="respStmt"/>
          <ref name="title"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>

  <define name="respStmt">
    <element name="respStmt">
      <zeroOrMore>
        <choice>
          <ref name="persName"/>
          <ref name="resp"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>

  <define name="resp">
    <element name="resp">
      <text/>
    </element>
  </define>

  <define name="editionStmt">
    <element name="editionStmt">
      <zeroOrMore>
        <ref name="edition"/>
      </zeroOrMore>
    </element>
  </define>

  <define name="edition">
    <element name="edition">
      <interleave>
        <text/>
        <zeroOrMore>
          <choice>
            <ref name="title"/>
            <ref name="date"/>
            <ref name="idno"/>
          </choice>
        </zeroOrMore>
      </interleave>
    </element>
  </define>

  <define name="publicationStmt">
    <element name="publicationStmt">
      <zeroOrMore>
        <choice>
          <ref name="availability"/>
          <ref name="date"/>
          <ref name="idno"/>
          <ref name="ptr"/>
          <ref name="publisher"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>

  <define name="sourceDesc">
    <element name="sourceDesc">
      <zeroOrMore>
        <choice>
          <ref name="sourceDescBibl"/>
          <ref name="biblStruct"/>
          <ref name="licence"/>
          <ref name="ptr"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>

  <define name="sourceDescBibl">
    <element name="bibl">
      <text/>
    </element>
  </define>

  <define name="encodingDesc">
    <element name="encodingDesc">
      <zeroOrMore>
        <ref name="appInfo"/>
      </zeroOrMore>
    </element>
  </define>

  <define name="appInfo">
    <element name="appInfo">
      <zeroOrMore>
        <ref name="application"/>
      </zeroOrMore>
    </element>
  </define>

  <define name="application">
    <element name="application">
      <optional>
        <attribute name="ident"/>
      </optional>
      <optional>
        <attribute name="type"/>
      </optional>
      <optional>
        <attribute name="version"/>
      </optional>
      <optional>
        <attribute name="when"/>
      </optional>
      <zeroOrMore>
        <choice>
          <ref name="desc"/>
          <ref name="label"/>
          <ref name="ref"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>

  <define name="desc">
    <element name="desc">
      <text/>
    </element>
  </define>

  <define name="revisionDesc">
    <element name="revisionDesc">
      <zeroOrMore>
        <ref name="change"/>
      </zeroOrMore>
    </element>
  </define>

  <define name="change">
    <element name="change">
      <optional>
        <attribute name="status"/>
      </optional>
      <optional>
        <attribute name="when"/>
      </optional>
      <optional>
        <attribute name="who"/>
      </optional>
      <interleave>
        <text/>
        <zeroOrMore>
          <ref name="note"/>
        </zeroOrMore>
        <zeroOrMore>
          <ref name="desc"/>
        </zeroOrMore>
      </interleave>
    </element>
  </define>

  <define name="note">
    <element name="note">
      <optional>
        <attribute name="type"/>
      </optional>
      <text/>
    </element>
  </define>


  <!-- ============================================================ -->
  <!-- biblStruct and child elements                                -->
  <!-- ============================================================ -->

  <define name="biblStruct">
    <element name="biblStruct">
      <optional>
        <attribute name="type"/>
      </optional>
      <optional>
        <attribute name="status"/>
      </optional>
      <optional>
        <attribute name="id" ns="http://www.w3.org/XML/1998/namespace"/>
      </optional>
      <group>
        <!-- Zero or more analytic elements (for articles, chapters, etc.) -->
        <zeroOrMore>
          <ref name="analytic"/>
        </zeroOrMore>
        <!-- One or more monogr elements (for books, journals, etc.) -->
        <oneOrMore>
          <ref name="monogr"/>
          <!-- Each monogr can optionally be followed by series elements -->
          <zeroOrMore>
            <ref name="series"/>
          </zeroOrMore>
        </oneOrMore>
        <!-- Trailing elements -->
        <zeroOrMore>
          <choice>
            <ref name="bibl-struct_note"/>
            <ref name="ptr"/>
            <ref name="ref"/>
            <ref name="idno"/>
          </choice>
        </zeroOrMore>
      </group>
    </element>
  </define>

  <define name="analytic">
    <element name="analytic">
      <zeroOrMore>
        <choice>
          <ref name="author"/>
          <ref name="editor"/>
          <ref name="title"/>
          <ref name="meeting"/>
          <ref name="date"/>
          <ref name="idno"/>
          <ref name="ptr"/>
          <ref name="ref"/>
          <ref name="availability"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>

  <define name="monogr">
    <element name="monogr">
      <zeroOrMore>
        <choice>
          <ref name="author"/>
          <ref name="editor"/>
          <ref name="title"/>
          <ref name="imprint"/>
          <ref name="biblScope"/>
          <ref name="bibl-struct_edition"/>
          <ref name="date"/>
          <ref name="idno"/>
          <ref name="ptr"/>
          <ref name="ref"/>
          <ref name="availability"/>
          <ref name="bibl-struct_note"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>

  <define name="series">
    <element name="series">
      <interleave>
        <text/>
        <zeroOrMore>
          <choice>
            <ref name="title"/>
            <ref name="editor"/>
            <ref name="biblScope"/>
            <ref name="idno"/>
            <ref name="availability"/>
          </choice>
        </zeroOrMore>
      </interleave>
    </element>
  </define>

  <!-- ============================================================ -->
  <!-- Person and name elements                                     -->
  <!-- ============================================================ -->

  <define name="author">
    <element name="author">
      <a:documentation>Complete sequence of author names</a:documentation>
      <optional>
        <attribute name="role"/>
      </optional>
      <optional>
        <attribute name="id" ns="http://www.w3.org/XML/1998/namespace"/>
      </optional>
      <interleave>
        <text/>
        <zeroOrMore>
          <choice>
            <ref name="persName"/>
            <ref name="forename"/>
            <ref name="surname"/>
            <ref name="middlename"/>
          </choice>
        </zeroOrMore>
      </interleave>
    </element>
  </define>

  <define name="editor">
    <element name="editor">
      <a:documentation>Sequence of editor names</a:documentation>
      <optional>
        <attribute name="role"/>
      </optional>
      <optional>
        <attribute name="id" ns="http://www.w3.org/XML/1998/namespace"/>
      </optional>
      <interleave>
        <text/>
        <zeroOrMore>
          <choice>
            <ref name="persName"/>
            <ref name="forename"/>
            <ref name="surname"/>
            <ref name="middlename"/>
          </choice>
        </zeroOrMore>
      </interleave>
    </element>
  </define>

  <define name="persName">
    <element name="persName">
      <optional>
        <attribute name="id" ns="http://www.w3.org/XML/1998/namespace"/>
      </optional>
      <interleave>
        <text/>
        <zeroOrMore>
          <ref name="forename"/>
        </zeroOrMore>
        <zeroOrMore>
          <ref name="surname"/>
        </zeroOrMore>
        <zeroOrMore>
          <ref name="middlename"/>
        </zeroOrMore>
      </interleave>
    </element>
  </define>

  <define name="forename">
    <element name="forename">
      <optional>
        <attribute name="type"/>
      </optional>
      <text/>
    </element>
  </define>

  <define name="surname">
    <element name="surname">
      <optional>
        <attribute name="type"/>
      </optional>
      <text/>
    </element>
  </define>

  <define name="middlename">
    <element name="middlename">
      <optional>
        <attribute name="type"/>
      </optional>
      <text/>
    </element>
  </define>

  <!-- ============================================================ -->
  <!-- Title, imprint, and publication elements                     -->
  <!-- ============================================================ -->

  <define name="title">
    <element name="title">
      <optional>
        <attribute name="type"/>
      </optional>
      <optional>
        <attribute name="level">
          <choice>
            <value datatypeLibrary="">a</value>  <!-- analytic -->
            <value datatypeLibrary="">m</value>  <!-- monographic -->
            <value datatypeLibrary="">j</value>  <!-- journal -->
            <value datatypeLibrary="">s</value>  <!-- series -->
            <value datatypeLibrary="">u</value>  <!-- unpublished -->
          </choice>
        </attribute>
      </optional>
      <!-- @key: short resolvable key for a named work, e.g. a statute
           abbreviation (key="UrhG"), so it can later be linked to an
           external norm/case database. -->
      <optional>
        <attribute name="key"/>
      </optional>
      <text/>
    </element>
  </define>

  <define name="imprint">
    <element name="imprint">
      <zeroOrMore>
        <choice>
          <ref name="publisher"/>
          <ref name="pubPlace"/>
          <ref name="date"/>
          <ref name="biblScope"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>

  <define name="publisher">
    <element name="publisher">
      <a:documentation>Publisher name; also used for corporate authors such as web pages</a:documentation>
      <optional>
        <attribute name="id" ns="http://www.w3.org/XML/1998/namespace"/>
      </optional>
      <text/>
    </element>
  </define>

  <define name="pubPlace">
    <element name="pubPlace">
      <a:documentation>Publication place or location of publishing institution</a:documentation>
      <text/>
    </element>
  </define>

  <define name="biblScope">
    <element name="biblScope">
      <optional>
        <attribute name="unit"/>
      </optional>
      <optional>
        <attribute name="from"/>
      </optional>
      <optional>
        <attribute name="to"/>
      </optional>
      <text/>
    </element>
  </define>

  <define name="date">
    <element name="date">
      <optional>
        <attribute name="type"/>
      </optional>
      <optional>
        <attribute name="when"/>
      </optional>
      <text/>
    </element>
  </define>

  <define name="idno">
    <element name="idno">
      <optional>
        <attribute name="type"/>
      </optional>
      <text/>
    </element>
  </define>

  <define name="bibl-struct_edition">
    <element name="edition">
      <text/>
    </element>
  </define>

  <define name="availability">
    <element name="availability">
      <optional>
        <attribute name="status"/>
      </optional>
      <interleave>
        <text/>
        <zeroOrMore>
          <ref name="licence"/>
        </zeroOrMore>
      </interleave>
    </element>
  </define>

  <define name="licence">
    <element name="licence">
      <optional>
        <attribute name="target"/>
      </optional>
      <empty/>
    </element>
  </define>

  <define name="meeting">
    <element name="meeting">
      <optional>
        <attribute name="id" ns="http://www.w3.org/XML/1998/namespace"/>
      </optional>
      <text/>
    </element>
  </define>

  <!-- ============================================================ -->
  <!-- Disambiguated note variant for biblStruct context           -->
  <!-- bibl-struct_note: <note @type?> used inside biblStruct/monogr -->
  <!-- ============================================================ -->

  <define name="bibl-struct_note">
    <element name="note">
      <optional>
        <attribute name="type"/>
      </optional>
      <interleave>
        <text/>
        <zeroOrMore>
          <ref name="lb"/>
        </zeroOrMore>
      </interleave>
    </element>
  </define>


  <define name="lb">
    <element name="lb">
      <empty/>
    </element>
  </define>

  <define name="ptr">
    <element name="ptr">
      <attribute name="target"/>
      <empty/>
    </element>
  </define>

  <define name="ref">
    <element name="ref">
      <optional>
        <attribute name="target"/>
      </optional>
      <text/>
    </element>
  </define>

  <define name="label">
    <element name="label">
      <a:documentation>Reference number or footnote marker (e.g. [1], ¹)</a:documentation>
      <optional>
        <attribute name="type"/>
      </optional>
      <text/>
    </element>
  </define>



  <start>
    <ref name="TEI"/>
  </start>

  <define name="TEI">
    <element name="TEI">
      <zeroOrMore>
        <choice>
          <ref name="teiHeader"/>
          <ref name="text"/>
        </choice>
      </zeroOrMore>
    </element>
  </define>

  <!-- ============================================================ -->
  <!-- training.references main elements                            -->
  <!-- ============================================================ -->

  <define name="text">
    <element name="text">
      <optional>
        <attribute name="lang" ns="http://www.w3.org/XML/1998/namespace"/>
      </optional>
      <optional>
        <element name="front"><empty/></element>
      </optional>
      <optional>
        <element name="body"><empty/></element>
      </optional>
      <element name="back">
        <element name="listBibl">
          <oneOrMore>
            <ref name="bibl"/>
          </oneOrMore>
        </element>
      </element>
    </element>
  </define>

  <define name="bibl">
    <element name="bibl">
      <a:documentation>An individual bibliographic reference</a:documentation>
      <optional>
        <attribute name="type">
          <choice>
            <group>
              <a:documentation>A note or comment that is not a bibliographic reference</a:documentation>
              <value datatypeLibrary="">footnote</value>
            </group>
            <group>
              <a:documentation>A statute / legislation citation</a:documentation>
              <value datatypeLibrary="">legislation</value>
            </group>
            <group>
              <a:documentation>A court ruling / judicial decision citation</a:documentation>
              <value datatypeLibrary="">decision</value>
            </group>
          </choice>
        </attribute>
      </optional>
      <interleave>
        <text/>
        <zeroOrMore>
          <choice>
            <ref name="label"/>
            <ref name="lb"/>
            <ref name="author"/>
            <ref name="orgName"/>
            <ref name="references_title"/>
            <ref name="references_date"/>
            <ref name="references_biblScope"/>
            <ref name="references_citedRange"/>
            <ref name="publisher"/>
            <ref name="pubPlace"/>
            <ref name="editor"/>
            <ref name="references_edition"/>
            <ref name="references_ptr"/>
            <ref name="references_idno"/>
            <ref name="references_note"/>
            <ref name="references_seg"/>
            <ref name="references_ref"/>
          </choice>
        </zeroOrMore>
      </interleave>
    </element>
  </define>

  <define name="orgName">
    <element name="orgName">
      <a:documentation>Institution for theses or technical reports</a:documentation>
      <optional>
        <attribute name="type">
          <choice>
            <!-- legal (new, #41) -->
            <group>
              <a:documentation>Court issuing a decision</a:documentation>
              <value datatypeLibrary="">court</value>
            </group>
            <value datatypeLibrary="">jurisdiction</value>
            <!-- pre-existing, in use in batches/**/*.training.references.tei.xml -->
            <value datatypeLibrary="">institution</value>
            <group>
              <a:documentation>Project-based collaboration acting as an author group</a:documentation>
              <value datatypeLibrary="">collaboration</value>
            </group>
            <value datatypeLibrary="">department</value>
            <value datatypeLibrary="">laboratory</value>
          </choice>
        </attribute>
      </optional>
      <text/>
    </element>
  </define>

  <!-- <citedRange unit="..."> marks a pinpoint into the cited work, as
       opposed to <biblScope>, which carries the container work's own
       extent (reporter volume/issue/page). Used for statute section/
       subsection (§ 19a, Abs. 2) and for a court decision's marginal
       number (Tz./Rn./Rdnr.), which is not a page number. -->
  <define name="references_citedRange">
    <element name="citedRange">
      <a:documentation>Pinpoint into a statute or decision (section, subsection, marginal number, etc.)</a:documentation>
      <attribute name="unit">
        <choice>
          <group>
            <a:documentation>Numbered section, e.g. § 19a</a:documentation>
            <value datatypeLibrary="">section</value>
          </group>
          <group>
            <a:documentation>Subsection, e.g. Abs. 2</a:documentation>
            <value datatypeLibrary="">subSection</value>
          </group>
          <group>
            <a:documentation>Sentence within a subsection, e.g. Satz 2</a:documentation>
            <value datatypeLibrary="">sentence</value>
          </group>
          <group>
            <a:documentation>Numbered item, e.g. Nr. 3</a:documentation>
            <value datatypeLibrary="">number</value>
          </group>
          <group>
            <a:documentation>Lettered item, e.g. lit. b</a:documentation>
            <value datatypeLibrary="">letter</value>
          </group>
          <group>
            <a:documentation>Marginal number, e.g. Rn./Tz. 12</a:documentation>
            <value datatypeLibrary="">margin</value>
          </group>
          <group>
            <a:documentation>Recital of an EU legal act</a:documentation>
            <value datatypeLibrary="">recital</value>
          </group>
          <group>
            <a:documentation>Pinpoint by printed page number</a:documentation>
            <value datatypeLibrary="">page</value>
          </group>
        </choice>
      </attribute>
      <optional>
        <attribute name="from"/>
      </optional>
      <optional>
        <attribute name="to"/>
      </optional>
      <text/>
    </element>
  </define>

  <!-- Local override of the shared bibl-struct <date>: constrains @type
       to the values meaningful for a footnote-embedded reference. Kept
       separate from the generic shared/bibl-struct.rng "date" (used in
       teiHeader/publicationStmt and other biblStruct contexts), so that
       "decision"/"enacted" don't leak into unrelated header/citation
       dates. -->
  <define name="references_date">
    <element name="date">
      <a:documentation>Publication date sequence</a:documentation>
      <optional>
        <attribute name="type">
          <choice>
            <!-- pre-existing, in use in batches/**/*.training.references.tei.xml -->
            <group>
              <a:documentation>Date of publication</a:documentation>
              <value datatypeLibrary="">publication</value>
            </group>
            <!-- legal (new, #41): decision date / statute enactment date -->
            <group>
              <a:documentation>Date a court decision was issued</a:documentation>
              <value datatypeLibrary="">decision</value>
            </group>
            <group>
              <a:documentation>Date a statute was enacted</a:documentation>
              <value datatypeLibrary="">enacted</value>
            </group>
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="when"/>
      </optional>
      <text/>
    </element>
  </define>

  <define name="references_edition">
    <element name="edition">
      <a:documentation>Edition of a publication</a:documentation>
      <optional>
        <attribute name="n"/>
      </optional>
      <text/>
    </element>
  </define>

  <!-- references_idno: local override of the shared bib-struct <idno>,
       scoped to this flat <bibl> content model, so a curated identifier
       type list doesn't leak into teiHeader/biblStruct idno usage
       elsewhere. Includes ISSN (in use in existing training data) alongside
       the legal-citation identifier types from #41. -->
  <define name="references_idno">
    <element name="idno">
      <a:documentation>Document or serial identifier.</a:documentation>
      <optional>
        <attribute name="type">
          <choice>
            <group>
              <a:documentation>Digital Object Identifier</a:documentation>
              <value datatypeLibrary="">DOI</value>
            </group>
            <group>
              <a:documentation>Serial (journal) identifier</a:documentation>
              <value datatypeLibrary="">ISSN</value>
            </group>
            <group>
              <a:documentation>arXiv preprint identifier</a:documentation>
              <value datatypeLibrary="">arXiv</value>
            </group>
            <group>
              <a:documentation>Technical/institutional report number</a:documentation>
              <value datatypeLibrary="">report</value>
            </group>
            <group>
              <a:documentation>Court docket number</a:documentation>
              <value datatypeLibrary="">docket</value>
            </group>
            <group>
              <a:documentation>European Case Law Identifier</a:documentation>
              <value datatypeLibrary="">ECLI</value>
            </group>
            <group>
              <a:documentation>EU CELEX document identifier</a:documentation>
              <value datatypeLibrary="">CELEX</value>
            </group>
          </choice>
        </attribute>
      </optional>
      <text/>
    </element>
  </define>

  <!-- references_biblScope: local override of the shared bib-struct
       <biblScope>, scoped to this flat <bibl> content model. -->
  <define name="references_biblScope">
    <element name="biblScope">
      <a:documentation>Volume/issue/page extent of the containing work.</a:documentation>
      <optional>
        <attribute name="unit">
          <choice>
            <group>
              <a:documentation>Full page range of the article</a:documentation>
              <value datatypeLibrary="">page</value>
            </group>
            <group>
              <a:documentation>Volume number</a:documentation>
              <value datatypeLibrary="">volume</value>
            </group>
            <group>
              <a:documentation>Issue / number</a:documentation>
              <value datatypeLibrary="">issue</value>
            </group>
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="from"/>
      </optional>
      <optional>
        <attribute name="to"/>
      </optional>
      <text/>
    </element>
  </define>

  <!-- references_title: local override of the shared bib-struct <title>,
       scoped to this flat <bibl> content model. Unlike the shared title
       (used by teiHeader/titleStmt and biblStruct, where a title's level
       is legitimately unset), a title inside a flat bibliographic
       reference always classifies as one of the presets below, so —
       unlike the shared define — this one is not left with two
       independent optional attributes: level+type are grouped into named
       presets, since "type=legislation" only ever co-occurs with
       "level=m", never independently. -->
  <define name="references_title">
    <element name="title">
      <a:documentation>Title of the cited work.</a:documentation>
      <optional>
        <attribute name="key">
          <a:documentation>Short resolvable key for a named work, e.g. a
            statute abbreviation (key="UrhG"), so it can later be linked to
            an external norm/case database.</a:documentation>
        </attribute>
      </optional>
      <choice>
        <group>
          <a:documentation>Article or chapter title (analytics)</a:documentation>
          <attribute name="level"><value datatypeLibrary="">a</value></attribute>
        </group>
        <group>
          <a:documentation>Journal title</a:documentation>
          <attribute name="level"><value datatypeLibrary="">j</value></attribute>
        </group>
        <group>
          <a:documentation>Monograph, proceedings, book, or thesis title</a:documentation>
          <attribute name="level"><value datatypeLibrary="">m</value></attribute>
        </group>
        <group>
          <a:documentation>Series title</a:documentation>
          <attribute name="level"><value datatypeLibrary="">s</value></attribute>
        </group>
        <group>
          <a:documentation>Unpublished work title</a:documentation>
          <attribute name="level"><value datatypeLibrary="">u</value></attribute>
        </group>
        <group>
          <a:documentation>Title of a statute / legislative act</a:documentation>
          <attribute name="level"><value datatypeLibrary="">m</value></attribute>
          <attribute name="type"><value datatypeLibrary="">legislation</value></attribute>
        </group>
        <group>
          <a:documentation>Case name of a court ruling</a:documentation>
          <attribute name="level"><value datatypeLibrary="">a</value></attribute>
          <attribute name="type"><value datatypeLibrary="">caseName</value></attribute>
        </group>
      </choice>
      <text/>
    </element>
  </define>

  <!-- <ptr type="web"> contains the URL as text content -->
  <define name="references_ptr">
    <element name="ptr">
      <a:documentation>Web URL (exclude prefixes like 'URL:' and trailing periods).</a:documentation>
      <optional>
        <attribute name="type">
          <choice>
            <value datatypeLibrary="">web</value>
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="target"/>
      </optional>
      <text/>
    </element>
  </define>

  <!-- <note> and <note type="report"> for misc. reference annotations -->
  <define name="references_note">
    <element name="note">
      <a:documentation>Any note not covered by another tag.</a:documentation>
      <optional>
        <attribute name="type">
          <choice>
            <group>
              <a:documentation>Type of report or thesis (e.g. 'Ph.D. thesis', 'Technical Report')</a:documentation>
              <value datatypeLibrary="">report</value>
            </group>
          </choice>
        </attribute>
      </optional>
      <text/>
    </element>
  </define>

  <!-- <seg type="signal"> marks an introductory citation signal that
       governs the reference, e.g. "See", "See also", "Cf.", "But see",
       "Contra", "Accord", "E.g." (common in legal/footnote citations). -->
  <define name="references_seg">
    <element name="seg">
      <optional>
        <attribute name="type">
          <group>
            <a:documentation>Discourse signal word introducing or framing a citation (e.g. 'see', 'vgl.', 'cf.')</a:documentation>
            <value datatypeLibrary="">signal</value>
          </group>
        </attribute>
      </optional>
      <text/>
    </element>
  </define>

  <!-- <ref type="anaphoric|cataphoric"> marks a positional cross-reference
       to another reference/footnote:
         anaphoric  -> points backward, e.g. "ibid.", "id.", "op. cit.",
                       "supra note 5"
         cataphoric -> points forward, e.g. "infra", "see note 12 below"
       @target optionally holds the resolved pointer. -->
  <define name="references_ref">
    <element name="ref">
      <optional>
        <attribute name="type">
          <choice>
            <group>
              <a:documentation>Points backward, e.g. "ibid.", "id.", "op. cit.", "supra note 5"</a:documentation>
              <value datatypeLibrary="">anaphoric</value>
            </group>
            <group>
              <a:documentation>Points forward, e.g. "infra", "see note 12 below"</a:documentation>
              <value datatypeLibrary="">cataphoric</value>
            </group>
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="target"/>
      </optional>
      <text/>
    </element>
  </define>

</grammar>
