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

How to substitute a string based on number

Subject: How to substitute a string based on number
From: Mailer Mailer <maillistboxes@xxxxxxxxx>
Date: Mon, 29 Oct 2001 04:37:50 -0800 (PST)
xsl string substitute
Hello All,

How can I substitute a string based on a number, e.g.

1 --- Jaunary
2 --- February
.....
11 November
12 --- December

In wrox book an implementation is given but it seems
to be MS specific. The implementation is

-----------------
<xsl:variable name="monthnames.tf">
  <mnth name="January"/>
  <mnth name="February"/>
  <mnth name="March"/>
  <mnth name="April"/>
  <mnth name="May"/>
  <mnth name="June"/>
  <mnth name="July"/>
  <mnth name="August"/>
  <mnth name="September"/>
  <mnth name="October"/>
  <mnth name="November"/>
  <mnth name="December"/>
</xsl:variable>

<xsl:variable name="monthnames"
select="msxml:node-set($monthnames.tf)"/>
....
...
<xsl:value-of select="$monthnames/*[$month]/@name"/>


In this way monthnames variable works as an array.
Is there such kinda standard way to access the
variable ... do not mention xslt processor specific
stuff. Is node-set a standard function?

Any pointers may help.

Thanks
Deep

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

 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.