Subject: Re: [xsl] selecting all text between two nodes From: "Joris Gillis" <roac@xxxxxxxxxx> Date: Wed, 07 Sep 2005 09:41:22 +0200 |
which means I want to open a ulink - copy all text that appears between the <tx.hyperlink> and the <tx.hyperlink_end> then close the ulink.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/> <xsl:strip-space elements="*"/>
<xsl:key name="hyperlink" match="node()" use="preceding::tx.hyperlink[1]/@id [.=current()/following::tx.hyperlink_end[1]/@begin]"/>
<xsl:template match="/"> <xsl:apply-templates select="//tx.hyperlink" /> </xsl:template>
<xsl:template match="tx.hyperlink"> <ulink url="{locator_url/@protocol}:/{locator_url/@file_name}"> <xsl:apply-templates select="key('hyperlink',@id)"/> </ulink> </xsl:template>
regards, -- Joris Gillis (http://users.telenet.be/root-jg/me.html) Gaudiam omnibus traderat W3C, nec vana fides
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] selecting all text between tw, Lynn Alford | Thread | [xsl] Kudos and thanks to the list, Lynn Alford |
Re: [xsl] apply-templates issue, Joris Gillis | Date | Re: [xsl] Processing multiple lists, Joris Gillis |
Month |