<?xml version="1.0" encoding="UTF-8"?>
<!-- © TEI Consortium. Dual-licensed under CC-by and BSD2 licenses; see the file COPYING.txt for details. -->
<?xml-model href="https://jenkins.tei-c.org/job/TEIP5-dev/lastSuccessfulBuild/artifact/P5/release/xml/tei/odd/p5.nvdl" type="application/xml" schematypens="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"?>
<elementSpec xmlns="http://www.tei-c.org/ns/1.0" xmlns:sch="http://purl.oclc.org/dsdl/schematron" module="tagdocs" xml:id="gi-elementRef" ident="elementRef">
  <desc versionDate="2010-05-11" xml:lang="en">points to the specification for some element which is to be included in a schema.</desc>
  <classes>
    <memberOf key="att.global"/>
    <memberOf key="att.repeatable"/>
    <memberOf key="model.contentPart"/>
    <memberOf key="model.oddRef"/>
  </classes>
  <content><empty/></content>
  <constraintSpec ident="only_sensible_attrs" scheme="schematron" xml:lang="en">
    <constraint>
      <sch:pattern>
        <sch:rule context="tei:elementRef[ parent::tei:schemaSpec | parent::tei:specGrp ]">
          <sch:report test="@minOccurs | @maxOccurs" role="error">An element reference is not repeatable when part of a schema specification (and thus this &lt;elementRef&gt; should not have @minOccurs or @maxOccurs).</sch:report>
        </sch:rule>
        <sch:rule context="tei:content//tei:elementRef">
          <sch:report test="@source" role="error">An element reference within a content model must refer to a locally defined element specification (and thus this &lt;elementRef&gt; should not have @source).</sch:report>
        </sch:rule>
      </sch:pattern>
    </constraint>
  </constraintSpec>
  <attList>
    <attDef ident="key" usage="req">
      <desc versionDate="2010-05-11" xml:lang="en">the identifier used for the required element within the
        source indicated.</desc>
      <datatype><dataRef key="teidata.xmlName"/></datatype>
    </attDef>
  </attList>
  <exemplum xml:lang="en">
    <egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-elementRef-egXML-js" source="#UND">
      <elementRef key="p"/>
    </egXML>
    <p>Include in the schema an element named <gi>p</gi>  available from the
    current default source.</p>
  </exemplum>
  <exemplum xml:lang="en">
    <egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-elementRef-egXML-vg" source="#UND">
      <elementRef key="p" source="tei:1.2.1"/>
    </egXML>
    <p>Include  in the schema an element named <gi>p</gi> 
    available from the TEI P5 1.2.1 release.</p>
  </exemplum>
  <remarks versionDate="2010-05-14" xml:lang="en">
    <p>Elements are identified by the name supplied as value for the
    <att>ident</att> attribute on the <gi>elementSpec</gi> element in
    which they are declared. TEI element names are unique.
    </p>
  </remarks>
  <listRef>
    <ptr target="#TDmodules"/>
  </listRef>
</elementSpec>
