Re: Please help (XSLT)

Subject: Re: Please help (XSLT)
From: Mike Brown <mike@xxxxxxxx>
Date: Thu, 1 Jun 2000 11:17:49 -0600 (MDT)
> 	<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.

"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."

"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.


<xsl:for-each select="//EXPIRE">
  <xsl:value-of select="."/>
</xsl:for-each> probably not exactly what you want, but you only asked for a hint :)

   - Mike
Mike J. Brown, software engineer at         My XML/XSL resources: in Denver, Colorado, USA 

 XSL-List info and archive:

Current Thread