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

RE: Problem with nodes & subnodes

Subject: RE: Problem with nodes & subnodes
From: "Aron Bock" <aronbock@xxxxxxxxxxx>
Date: Sat, 23 Jul 2005 14:07:03 +0000
selecting subnodes
<xsl:template match="manager">
   <xsl:value-of select="text()[1]"/>
</xsl:template>

--A


From: "Michele Patron" <michelepatron@xxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Problem with nodes & subnodes
Date: Sat, 23 Jul 2005 13:43:29 +0000

Dear xsl programmers,

I have the following problem: my xml is

<manager>
manager1
<employee>employee1</employee>
<employee>employee2</employee>
<firm>firm</firm>
</manager>

How can I select just the text inside the main node "manager" (which is "manager1"), without selecting employee & firm nodes?
At the moment



<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" indent="yes"/>
<xsl:template match="/">
<xsl:apply-templates select="manager"/>
</xsl:template>
<xsl:template match="manager">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>


Clearly return me the whole text....

manager1
employee1
employee2
firm

What I want to get is just

manager1

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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.