This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Please help (XSLT)
- To: xsl-list at mulberrytech dot com
- Subject: Re: Please help (XSLT)
- From: Mike Brown <mike at skew dot org>
- Date: Thu, 1 Jun 2000 11:17:49 -0600 (MDT)
- Reply-To: xsl-list at mulberrytech dot com
> <xsl:template match="CONDITION">
> ...
> </xsl:template>
>
> At the CONDITION, when I tried this:
>
> <xsl:value-of select="//EXPIRE" />
>
> It only print out the first TICKET's EXPIRE value
When you do not see the behavior you expect, consult the specs.
http://www.w3.org/TR/xslt#value-of
"The xsl:value-of element is instantiated to create a text node in the
result tree. The required select attribute is an expression; this
expression is evaluated and the resulting object is converted to a string
as if by a call to the string function."
http://www.w3.org/TR/xpath#function-string
"The string function converts an object to a string as follows:
A node-set is converted to a string by returning the string-value of the
node in the node-set that is first in document order."
So that is why xsl:value-of only gets the value of the first EXPIRE.
This:
<xsl:for-each select="//EXPIRE">
<xsl:value-of select="."/>
</xsl:for-each>
...is probably not exactly what you want, but you only asked for a hint :)
- Mike
____________________________________________________________________
Mike J. Brown, software engineer at My XML/XSL resources:
webb.net in Denver, Colorado, USA http://www.skew.org/xml/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list