|
Subject: [xsl] Combining consecutive siblings From: David Sewell <dsewell@xxxxxxxxxxxx> Date: Wed, 29 Jul 2009 21:56:49 -0400 (EDT) |
The volumes of the Docu- mentary History of the Rati- fication of the Consitution are heavy.
<p>The volumes of the <i>Docu</i><i>mentary History of the Rati</i><i>cation of the Constitution</i> are heavy.</p>
<xsl:template match="i">
<xsl:choose>
<xsl:when test="preceding-sibling::node()[1][self::i]">
<!-- omit, the next when-clause handles me -->
</xsl:when>
<xsl:when test="following-sibling::node()[1][self::i]">
<xsl:variable name="stopNode"
select="following-sibling::node()[not(self::i)][1]"/>
<xsl:copy>
<xsl:apply-templates/>
<xsl:apply-templates
select="following-sibling::i[not(. >> $stopNode)]"
mode="copy"/>
</xsl:copy>
</xsl:when>
<xsl:otherwise>
<xsl:copy><xsl:apply-templates/></xsl:copy>
</xsl:otherwise>
</xsl:choose> </xsl:template>
<xsl:template match="i" mode="copy">
<xsl:apply-templates/>
</xsl:template>-- David Sewell, Editorial and Technical Manager ROTUNDA, The University of Virginia Press PO Box 801079, Charlottesville, VA 22904-4318 USA Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903 Email: dsewell@xxxxxxxxxxxx Tel: +1 434 924 9973 Web: http://rotunda.upress.virginia.edu/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Emulating XPATH2 range in, Hermann Stamm-Wilbra | Thread | RE: [xsl] Combining consecutive sib, Michael Kay |
| Re: [xsl] Emulating XPATH2 range in, Hermann Stamm-Wilbra | Date | RE: [xsl] Combining consecutive sib, Michael Kay |
| Month |