Subject: Re: [xsl] Joining sibling elements From: "Joris Gillis" <roac@xxxxxxxxxx> Date: Wed, 10 Aug 2005 22:06:52 +0200 |
<b>this</b><b> </b><b>is</b><b> </b><b>bold<text</b>
which should be transformed this:
<b>this is bold text</b>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:strip-space elements="*"/> <xsl:output method="xml" indent="yes"/>
<xsl:template match="*"> <xsl:copy> <xsl:apply-templates/> <xsl:call-template name="mergeSiblings"/> </xsl:copy> </xsl:template>
<xsl:template name="mergeSiblings"> <xsl:for-each select="following-sibling::node()[1][name()=name(current())]"> <xsl:apply-templates/> <xsl:call-template name="mergeSiblings"/> </xsl:for-each> </xsl:template>
regards, -- Joris Gillis (http://users.telenet.be/root-jg/me.html) Vincit omnia simplicitas Keep it simple
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Joining sibling elements, Marcin Miłkowski | Thread | Re: [xsl] Joining sibling elements, Marcin Miłkowski |
Re: [xsl] Joining sibling elements, Joris Gillis | Date | Re: [xsl] Joining sibling elements, JBryant |
Month |