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

Re: get the text value of a following sibling

Subject: Re: get the text value of a following sibling
From: Ronan Klyne <ronan.klyne@xxxxxxxxxxx>
Date: Mon, 13 Nov 2006 13:53:16 +0000
Re:  get the text value of a following sibling
Could you please clarify what you would like to happen in the following
case:

  <a href="...">link2</a>
  <br/>
  just some text 2
  <br/>
  just some more text 2
  <br/>

	# r

Liron wrote:
> Hello,
> 
> Given the following structure:
> <html>
>   <a href="...">link1</a>
>   <br/>
>   just some text 1
>   <br/>
>   <a href="...">link2</a>
>   <br/>
>   just some text 2
>   <br/>
>   <a href="...">link3</a>
>   <br/>
>   just some text 3
>   <br/>
> </html>
> 
> I want to output this tree to a plain text file that looks like this:
> link1:just some text1
> link2:just some text2
> etc..
> 
> Right now I'm doing something like this (part of my xsl):
> <xsl:for-each select="/html/a">
> <xsl:value-of select="text()"/>
> <xsl:value-of select="following-sibling::*[2]/text()"/>
> </xsl:for-each>
> 
> This doesn't work. It only outputs the text in the <a> tag but not the
> text between the <br> tags.
> How should I treat that text? Isn't it considered as a node?
> 
> Thank you very much
> 
> 


-- 
Ronan Klyne
Business Collaborator Developer
Tel: +44 (0)870 163 2555
ronan.klyne@xxxxxxxxxxx
www.groupbc.com

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.