<rule>

<rule> (rule) marks a ruled line
Module lim
Attributes Attributes
unit provides a conventional name for the kind of section changing at this milestone.
Derived from att.milestoneUnit
Status Required
Datatype teidata.enumerated
Sample values include
section
(section) a rule separating sections of some sort on the page, but not between items.
item
(item) a rule that separates items.
extent the extent of the rule in percentage. By default, 100%.
Status Optional
Datatype token
Suggested values include:
25%
(25%) A quarter of the page
50%
(50%) Half of the page
75%
(75%) Three-quarters of the page
100%
(100%) The entire width of the page. [Default]
place specifies where this item is placed.
Status Optional
Legal values are:
left
(left) left
right
(right) right
Member of
Contained by
May contain
core: desc
Note
This element is semantically equivalent to the standard TEI milestone with rendition values. However, it may contain an optional desc child if further description of line is necessary.
The place attribute (which is borrowed from att.placement) has no bearing on rule elements that do not specify an extent less than 100% (which is the default).
Schematron
The place attribute only makes sense when extent is less than 100%

<sch:pattern>
   
<sch:rule context="tei:rule[@place]">
      
<sch:assert test="exists(@extent) and xs:integer(replace(@extent,'%','')) lt 100">ERROR: @place only makes sense if an @extent exists and is less than 100%.</sch:assert>
   
</sch:rule>
</sch:pattern>
The extent of a rule should be between 1 and 100%

<sch:pattern>
   
<sch:rule context="tei:rule[@extent]">
      
<sch:let name="int" value="xs:integer(replace(@extent,'%',''))"/>
      
<sch:assert test="$int = (1 to 100)">ERROR: @extent should be a percentage value between 1 and 100.</sch:assert>
   
</sch:rule>
</sch:pattern>
We used to use the milestone element, but that construct is now deprecated.

<sch:pattern>
   
<sch:rule context="tei:milestone">
      
<sch:assert test="not(ancestor::tei:text)">ERROR: milestone elements for ruled lines are deprecated. Use <rule> instead.</sch:assert>
   
</sch:rule>
</sch:pattern>
Source Github

<elementSpec rend="add" ident="rule" module="lim" mode="add">
   
<gloss>rule</gloss>
   
<desc>marks a ruled line</desc>
   
<classes>
      
<memberOf key="model.milestoneLike"/>
      
<memberOf key="att.milestoneUnit"/>
   
</classes>
   
<content>
      
<elementRef key="desc" minOccurs="0" maxOccurs="1"/>
   
</content>
   
<attList>
      
<attDef ident="unit" usage="req" mode="change">
         
<valList mode="replace">
            
<valItem ident="section">
               
<gloss>section</gloss>
               
<desc>a rule separating sections of some sort on
                             the page, but not between items.
</desc>
            
</valItem>
            
<valItem ident="item">
               
<gloss>item</gloss>
               
<desc>a rule that separates items.</desc>
            
</valItem>
         
</valList>
      
</attDef>
      
<attDef ident="extent" usage="opt">
         
<desc>the extent of the rule in percentage. By default, 100%.</desc>
         
<datatype>
            
<dataRef name="token" restriction="\d+%"/>
         
</datatype>
         
<defaultVal>100%</defaultVal>
         
<valList type="semi">
            
<valItem ident="25%">
               
<gloss>25%</gloss>
               
<desc>A quarter of the page</desc>
            
</valItem>
            
<valItem ident="50%">
               
<gloss>50%</gloss>
               
<desc>Half of the page</desc>
            
</valItem>
            
<valItem ident="75%">
               
<gloss>75%</gloss>
               
<desc>Three-quarters of the page</desc>
            
</valItem>
            
<valItem ident="100%">
               
<gloss>100%</gloss>
               
<desc>The entire width of the page.</desc>
            
</valItem>
         
</valList>
      
</attDef>
      
<attDef ident="place" usage="opt">
         
<desc>specifies where this item is placed.</desc>
         
<valList type="closed">
            
<valItem ident="left">
               
<gloss>left</gloss>
               
<desc>left</desc>
            
</valItem>
            
<valItem ident="right">
               
<gloss>right</gloss>
               
<desc>right</desc>
            
</valItem>
         
</valList>
      
</attDef>
   
</attList>
</elementSpec>