[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: selecting all text between two nodes

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

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 (http://www.biglist.com/lists/xsl-list/archives/200509/msg00082.html)


Here's a solution that will fit your demands:

<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:output method="xml" />

<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>

</xsl:stylesheet>


regards, -- Joris Gillis (http://users.telenet.be/root-jg/me.html) Gaudiam omnibus traderat W3C, nec vana fides

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.