<sch:rule context="mei:*[@copyof]">
<sch:assert test="count(child::*[not(comment() or processing-instruction())]) = 0">An
element with a copyof attribute can only have comment or processing instruction
descendents.</sch:assert>
</sch:rule>
<sch:rule context="@copyof">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@copyof attribute
should have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">The
value in @copyof should correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
<sch:rule context="@corresp">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@corresp attribute
should have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">Each
value in @corresp should correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
<sch:rule context="@follows">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@follows attribute
should have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">Each
value in @follows must correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
<sch:rule context="@next">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@next attribute should
have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">Each
value in @next should correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
<sch:rule context="@precedes">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@precedes attribute
should have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">Each
value in @precedes must correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
<sch:rule context="@prev">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@prev attribute should
have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">Each
value in @prev should correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
<sch:rule context="@sameas">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@sameas attribute
should have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">Each
value in @sameas should correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
<sch:rule context="@synch">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@synch attribute
should have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">Each
value in @synch should correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
<classSpec ident="att.linking" module="MEI.shared" type="atts">
<desc>Attributes that specify element-to-element relationships.</desc>
<attList org="group">
<attDef ident="copyof" usage="opt">
<desc>Points to an element of which the current element is a copy.</desc>
<constraintSpec ident="When_copyof_element_empty" scheme="schematron">
<constraint>
<sch:rule context="mei:*[@copyof]">
<sch:assert test="count(child::*[not(comment() or processing-instruction())]) = 0">An
element with a copyof attribute can only have comment or processing instruction
descendents.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
<constraintSpec ident="check_copyofTarget" scheme="schematron">
<constraint>
<sch:rule context="@copyof">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@copyof attribute
should have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">The
value in @copyof should correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</attDef>
<attDef ident="corresp" usage="opt">
<desc>Used to point to other elements that correspond to this one in a generic
fashion.</desc>
<constraintSpec ident="check_correspTarget" scheme="schematron">
<constraint>
<sch:rule context="@corresp">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@corresp attribute
should have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">Each
value in @corresp should correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</attDef>
<attDef ident="follows" usage="opt">
<desc>points to one or more events in a user-defined collection that are known to be
predecessors of the current element.</desc>
<constraintSpec ident="check_followsTarget" scheme="schematron">
<constraint>
<sch:rule context="@follows">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@follows attribute
should have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">Each
value in @follows must correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</attDef>
<attDef ident="next" usage="opt">
<desc>Used to point to the next event(s) in a user-defined collection.</desc>
<constraintSpec ident="check_nextTarget" scheme="schematron">
<constraint>
<sch:rule context="@next">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@next attribute should
have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">Each
value in @next should correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</attDef>
<attDef ident="precedes" usage="opt">
<desc>Points to one or more events in a user-defined collection that are known to be
successors of the current element.</desc>
<constraintSpec ident="check_precedesTarget" scheme="schematron">
<constraint>
<sch:rule context="@precedes">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@precedes attribute
should have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">Each
value in @precedes must correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</attDef>
<attDef ident="prev" usage="opt">
<desc>Points to the previous event(s) in a user-defined collection.</desc>
<constraintSpec ident="check_prevTarget" scheme="schematron">
<constraint>
<sch:rule context="@prev">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@prev attribute should
have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">Each
value in @prev should correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</attDef>
<attDef ident="sameas" usage="opt">
<desc>Points to an element that is the same as the current element but is not a literal
copy
of the current element.</desc>
<constraintSpec ident="check_sameasTarget" scheme="schematron">
<constraint>
<sch:rule context="@sameas">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@sameas attribute
should have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">Each
value in @sameas should correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</attDef>
<attDef ident="synch" usage="opt">
<desc>Points to elements that are synchronous with the current element.</desc>
<constraintSpec ident="check_synchTarget" scheme="schematron">
<constraint>
<sch:rule context="@synch">
<sch:assert role="warning" test="not(normalize-space(.) eq '')">@synch attribute
should have content.</sch:assert>
<sch:assert role="warning" test="every $i in tokenize(., '\s+') satisfies substring($i,2)=//mei:*/@xml:id">Each
value in @synch should correspond to the @xml:id attribute of an
element.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</attDef>
</attList>
</classSpec>