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

Re: xsl:value-of

Subject: Re: xsl:value-of
From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx>
Date: Mon, 01 Jul 2002 16:03:39 +0200
Re:  xsl:value-of
Cenk Uysal wrote:

I try to print same named tags one after another. my XML is just like
this:

<a>
  <b at=""></b>
  <b at=""></b>
  <b at=""></b>
</a>

I also have to control attributes of them. If they are valid, I will
print them on screen.

Here is the part of XSL:

<xsl:for-each select="b[@at=$something]"> <xsl:value-of select="../b"/>
</xsl:for-each>


But this time XSL prints first element all the time repeatedly. What
can be the solution?
<xsl:value-of select="../b"/> stands for "output string value of the first node in ../b node-set". ../b xpath expression means "all b children of the current node's parent", so <xsl:value-of select="../b"/> will always output string value of the first b element. If you want to output current element value, use <xsl:value-of select="."/>

--
Oleg Tkachenko
Multiconn International Ltd, Israel


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



Current Thread
  • xsl:value-of
    • Cenk Uysal - Mon, 1 Jul 2002 08:44:17 -0400 (EDT)
      • Oleg Tkachenko - Mon, 1 Jul 2002 09:01:45 -0400 (EDT) <=
      • Jeni Tennison - Mon, 1 Jul 2002 09:04:40 -0400 (EDT)
      • <Possible follow-ups>
      • Vasu Chakkera - Mon, 1 Jul 2002 09:22:22 -0400 (EDT)

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.