5.4 cline

<..tbody templates..>+
 <xsl:template match=" row[
      (@role = ’cline’)
      and
      preceding-sibling::*[1]
                          [ self::row[ not(@role) ] ]
      and
      (   count(child::entry)
        = count(preceding-sibling::*[1]/child::entry))
 ]" />
 <xsl:template match=" row[
        not(@role)
    and
        following-sibling::*[1][ self::row[@role = ’cline’] ]
    and
      (   count(child::entry)
        = count(following-sibling::*[1]/child::entry))
 ] ">
    <xsl:copy>
       <xsl:apply-templates select="@*" />
       <xsl:apply-templates select="*|text()|comment()" mode="cline" />
    </xsl:copy>
 </xsl:template>
-_-_-

<..tbody templates..>+
 <xsl:template match=" text()|comment() " mode="cline">
    <xsl:copy>
       <xsl:apply-templates select="*|@*|text()|comment()"  />
    </xsl:copy>
 </xsl:template>
-_-_-

<..tbody templates..>+
 <xsl:template match="*" mode="cline">
    <xsl:copy>
       <xsl:if test="self::entry">
          <xsl:attribute name="rowsep">
              <xsl:variable name="pos">
                 <xsl:value-of select="position()" />
              </xsl:variable>
              <xsl:value-of select="parent::row
                                    / following-sibling::*[1]
                                    / child::entry[position()=$pos]
                                    / @rowsep
                                     " />
           </xsl:attribute>
       </xsl:if>
       <xsl:apply-templates select="*|@*|text()|comment()"  />
    </xsl:copy>
 </xsl:template>
-_-_-