Subject: RE: [xsl] Generic template for collapsing arbitrary length runs o f same tag into one tag? From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 15 Aug 2002 18:37:08 -0400 |
<xsl:template match="i"> <xsl:if test="not(name(preceding-sibling::node()[1])='i')">
<i> <xsl:apply-templates/> <xsl:if test="name(following::node()[1])='i'"> <xsl:apply-templates select="following::node()[1]" mode="following"/> </xsl:if>
</i> </xsl:if> </xsl:template>
<xsl:template match="i" mode="following"> <xsl:apply-templates/> <xsl:if test="name(following::node()[1])='i'"> <xsl:apply-templates select="following::node()[1]" mode="following"/> </xsl:if>
</xsl:template>
Seems to work in Saxon 6.5.2.
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Generic template for coll, McNally, David | Thread | [xsl] How to handle XML with and wi, gerry . king |
[xsl] Inserting softHyphens in FO, Danny Vint | Date | RE: [xsl] Inserting softHyphens in , Roland Neilands |
Month |