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

Re: Please help (XSLT)

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


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.