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

Re: how to append a "," to the end of number

Subject: Re: how to append a "," to the end of number
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 26 Aug 2002 18:46:15 -0400
append value through xsl attribute
Mac,

A simple value-of won't do it for you, since it returns only the value of the first node in a node-set, so if you have more than one occurrence of NightlyRates you'd lose all but the first. But something like this will:

<input type="hidden" name="NightlyRates">
  <xsl:attribute name="value">
    <xsl:for-each select="NightlyRates">
       <xsl:if test="position() > 1">
         <xsl:text>, </xsl:text>
       </xsl:if>
       <xsl:value-of select=".">
    </xsl:for-each>
  </xsl:attribute>
</input>

If this doesn't answer your question, could you clarify what you mean by "NightlyRates will have 1-M occurrences" (maybe showing us a sample source file).

And someone else will answer (since I'm going home :-).

Cheers,
Wendell

At 06:02 PM 8/26/2002, you wrote:
I have this problem, I have an unknown number of prices that will be
separated with a comma. I need to know if it is possible to do this in
my xsl.


<input type="hidden" name="NightlyRates"> <xsl:attribute name="value"><xsl:value-of select="NightlyRates"/></xsl:attribute> </input>

This is my problem here. NightlyRates will have 1-M occurrences and it
needs to be formatted like this. 54.95, 65.95 and so on.


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and 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.