<moduleRef>

<moduleRef> (module reference) 參照一個被併入某一模型的模組。 [23.2 Modules and Schemas]
組件 tagdocs — Documentation Elements
屬性
prefix⚓︎ specifies a default prefix which will be prepended to all patterns from the imported module
狀態 非必備的
資料類型 0–1 次可出現: teidata.xmlName 以空白鍵隔開
Schematron

<sch:rule context="tei:moduleRef">
<sch:report test="//*[ not( generate-id(.) eq generate-id( current() ) ) ]/@prefix = @prefix">The prefix attribute
of <sch:name/> should not match that of any other
element (it would defeat the purpose)</sch:report>
</sch:rule>
Schematron

<sch:rule context="tei:moduleRef">
<sch:report test="@except and @include">It is an error to supply both the @include and @except attributes</sch:report>
</sch:rule>
include⚓︎ supplies a list of the elements which are to be copied from the specified module into the schema being defined.
狀態 非必備的
資料類型 0–∞ 次可出現: teidata.xmlName 以空白鍵隔開
except⚓︎ supplies a list of the elements which are not to be copied from the specified module into the schema being defined.
狀態 非必備的
資料類型 0–∞ 次可出現: teidata.xmlName 以空白鍵隔開
key⚓︎ the name of a TEI module
狀態 非必備的
資料類型 teidata.xmlName
url⚓︎ (uniform resource locator) refers to a non-TEI module of RELAX NG code by external location
狀態 非必備的
資料類型 teidata.pointer
俱乐部会员
可包含在於
可包含
tagdocs: content

If neither include nor except is supplied, the effect of this element is to make all the declarations contained by the referenced module available to the schema being compiled. If both attributes are supplied, an ODD processor should signal an error.

A TEI module is identified by the name supplied as value for the ident attribute on a moduleSpec element. The source attribute may be used to specify an online source from which the specification of that module may be read. A URI may alternatively be supplied in the case of a non-TEI module, and this is expected to be written as a RELAX NG schema.

If the url attribute is used, the content element may also be supplied as a child of this element. Its content (which is assumed to be a fragment of RELAX NG code) will be copied along with the content of the resource indicated by the url attribute into the target RELAX NG schema.

例子
<moduleRef key="linking"/>
Schematron

<sch:rule context="tei:moduleRef">
<sch:report test="* and @key"> Child elements of <sch:name/> are only allowed when an external module is being loaded
</sch:report>
</sch:rule>
Content model
<content>
 <elementRef key="contentminOccurs="0"/>
</content>
宣告
<rng:element name="moduleRef">
 <rng:ref name="att.global.attributes"/>
 <rng:ref name="att.global.rendition.attributes"/>
 <rng:ref name="att.global.linking.attributes"/>
 <rng:ref name="att.global.analytic.attributes"/>
 <rng:ref name="att.global.facs.attributes"/>
 <rng:ref name="att.global.change.attributes"/>
 <rng:ref name="att.global.responsibility.attributes"/>
 <rng:ref name="att.global.source.attributes"/>
 <rng:optional>
  <rng:attribute name="prefix">
   <rng:optional>
    <rng:ref name="teidata.xmlName"/>
   </rng:optional>
  </rng:attribute>
 </rng:optional>
 <rng:choice>
  <rng:optional>
   <rng:attribute name="include">
    <rng:list>
     <rng:zeroOrMore>
      <rng:ref name="teidata.xmlName"/>
     </rng:zeroOrMore>
    </rng:list>
   </rng:attribute>
  </rng:optional>
  <rng:optional>
   <rng:attribute name="except">
    <rng:list>
     <rng:zeroOrMore>
      <rng:ref name="teidata.xmlName"/>
     </rng:zeroOrMore>
    </rng:list>
   </rng:attribute>
  </rng:optional>
 </rng:choice>
 <rng:choice>
  <rng:optional>
   <rng:attribute name="key">
    <rng:ref name="teidata.xmlName"/>
   </rng:attribute>
  </rng:optional>
  <rng:optional>
   <rng:attribute name="url">
    <rng:ref name="teidata.pointer"/>
   </rng:attribute>
  </rng:optional>
 </rng:choice>
 <rng:optional>
  <rng:ref name="content"/>
 </rng:optional>
</rng:element>
element moduleRef
{
   att.global.attributes,
   att.global.rendition.attributes,
   att.global.linking.attributes,
   att.global.analytic.attributes,
   att.global.facs.attributes,
   att.global.change.attributes,
   att.global.responsibility.attributes,
   att.global.source.attributes,
   attribute prefix { teidata.xmlName? }?,
   (
      attribute include { list { teidata.xmlName* } }?
    | attribute except { list { teidata.xmlName* } }?
   ),
   ( attribute key { teidata.xmlName }? | attribute url { teidata.pointer }? ),
   content?
}