Re: [xsl] selecting all text between two nodes

Subject: Re: [xsl] selecting all text between two nodes
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Wed, 07 Sep 2005 09:41:22 +0200

Tempore 07:11:11, die 09/07/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Lynn Alford <lynn.alford@xxxxxxxxxx>:

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.

I anwsered a very similar problem a few days ago (

Here's a solution that will fit your demands:

<xsl:stylesheet xmlns:xsl=""; version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:strip-space elements="*"/>

<xsl:output method="xml" />

<xsl:key name="hyperlink" match="node()"

<xsl:template match="/">
  <xsl:apply-templates select="//tx.hyperlink" />

<xsl:template match="tx.hyperlink">
<ulink url="{locator_url/@protocol}:/{locator_url/@file_name}">
	<xsl:apply-templates select="key('hyperlink',@id)"/>


regards, -- Joris Gillis ( Gaudiam omnibus traderat W3C, nec vana fides

Current Thread