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

Selecting text bisected by child nodes.

Subject: Selecting text bisected by child nodes.
From: Gan Uesli Starling <alias@xxxxxxxxxxx>
Date: Tue, 22 Apr 2003 13:52:57 -0400
 Selecting text bisected by child nodes.
I have a node <foo> which has one or more
child nodes. Those child nodes often
bisect the text of <foo>, thus...


<foo>ABC<x>1</x><y>2</y><z>3</z>DEF</foo>



I need to do something with the ABC. So I select the 'ABC' like this...

<xsl:template match="foo">
  <xsl:variable name="left">
    <xsl:value-of select="node()"/>
  </xsl:variable>

Then I do something with that $left which
holds 'ABC'. After that I do...

<xsl:apply-templates/>

...which takes care of the child nodes
just fine.

But I can't seem to get a hold of the 'DEF' from
<foo>. I don't need to make it into a variable
named $right, but I must at least display
it.

My question is, how can I select just the 'DEF'
from <foo>?

Or, baring that, how can I select 'ABCDEF'
sans the child nodes. Always when I use
'select="node()" inside of <foo> the 'DEF'
gets lost.

TIA,

Gan
	
--

Mistera Sturno - Rarest Extinct Bird

 <(+)__       Gan Uesli Starling
  ((__/)=-    Kalamazoo, MI, USA
   `||`
    ++        http://starling.us


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.