Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] xsl:value-of

From: Oleg Tkachenko <olegt@------------->
To:
Date: 7/1/2002 5:02:00 AM
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


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent