<sch:rule context="mei:patch">
<sch:assert test="(parent::mei:folium and @attached.to = ('recto','verso')) or (parent::mei:bifolium
and @attached.to = ('outer.recto','inner.verso','inner.recto','outer.verso'))">The allowed positions of a patch depend on its parent element.</sch:assert>
<sch:assert test="count(child::node()) gt 0">A patch element must contain either a folium
or a bifolium element.</sch:assert>
</sch:rule>
<elementSpec ident="patch" module="MEI.header">
<desc>Describes a physical writing surface attached to the original document.</desc>
<classes>
<memberOf
key="att.common"/>
<memberOf
key="att.evidence"/>
<memberOf
key="att.measurement"/>
<memberOf
key="att.trans"/>
<memberOf
key="att.xy"/>
<memberOf
key="model.paperModLike"/>
</classes>
<content>
<rng:choice>
<rng:ref
name="model.foliumLike"
/>
<rng:ref
name="model.bifoliumLike"
/>
</rng:choice>
</content>
<constraintSpec ident="check_attached_position" scheme="schematron">
<constraint>
<sch:rule context="mei:patch">
<sch:assert test="(parent::mei:folium and @attached.to = ('recto','verso')) or (parent::mei:bifolium
and @attached.to = ('outer.recto','inner.verso','inner.recto','outer.verso'))">The allowed positions of a patch depend on its parent element.</sch:assert>
<sch:assert test="count(child::node()) gt 0">A patch element must contain either a folium
or a bifolium element.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
<attList org="group">
<attDef ident="attached.to" usage="req">
<desc>Describes the position of the patch on the parent folium / bifolium.</desc>
<valList type="closed">
<valItem ident="outer.recto">
<desc>patch attached to outer recto side of bifolium.</desc>
</valItem>
<valItem ident="inner.verso">
<desc>patch attached to inner verso side of bifolium.</desc>
</valItem>
<valItem ident="inner.recto">
<desc>patch attached to inner recto side of bifolium.</desc>
</valItem>
<valItem ident="outer.verso">
<desc>patch attached to outer verso side of bifolium.</desc>
</valItem>
<valItem ident="recto">
<desc>patch attached to recto side of folium.</desc>
</valItem>
<valItem ident="verso">
<desc>patch attached to verso side of folium.</desc>
</valItem>
</valList>
</attDef>
<attDef ident="attached.by" usage="opt">
<desc>Describes the method of attachment of the patch.</desc>
<datatype maxOccurs="1" minOccurs="1">
<rng:data type="NMTOKEN"/>
</datatype>
<valList type="semi">
<valItem ident="glue">
<desc>patch is glued on surface beneath.</desc>
</valItem>
<valItem ident="thread">
<desc>patch is sewn on surface beneath.</desc>
</valItem>
<valItem ident="needle">
<desc>patch is pinned to the surface beneath.</desc>
</valItem>
<valItem ident="tape">
<desc>patch is taped on surface beneath using an adhesive strip.</desc>
</valItem>
<valItem ident="staple">
<desc>patch is attached on surface beneath using a staple.</desc>
</valItem>
</valList>
</attDef>
</attList>
<remarks>
<p part="N">A patch must always contain a
<gi scheme="MEI">folium</gi> or
<gi scheme="MEI">bifolium</gi> element. The @x and @y attributes are used to position the patch on its
parent surface by indicating the upper left corner of the patch. The size of the patch
is
encoded using the @height and @width attributes on the child folium (or bifolium).</p>
</remarks>
</elementSpec>