<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>
-_-_-