|
Subject: RE: How to put a value-of select into a variable. From: John Dunn <johnd@xxxxxxxxxxxxx> Date: Thu, 20 May 1999 17:29:54 -0600 |
I was able to accomplish that with the following code:
<xsl:template match="/Item">
<xsl:eval>hextodec(attributes.getNamedItem( 'id' ).text)</xsl:eval>
</xsl:template>
<xsl:script>
<![CDATA[
function hextodec(item)
{
return parseInt( item, 16 );
}
]]>
</xsl:script>
when I have the following XML object
<Item id='0x23' />
I am pretty sure that <xsl:eval> is Microsoft Parser Specific, and probably
would choke any other parser. If anyone has a better method than this, let
me know - this was done using the time-honored 'guess and check' method of
programming.
--
John Dunn
Peak Audio, Inc.
johnd@xxxxxxxxxxxxx
http://www.peakaudio.com <http://www.peakaudio.com/>
303.449.9337x103
-----Original Message-----
From: Cote, Stephane [mailto:scote@xxxxxxxxxxxxxxxxxxx]
Sent: Thursday, May 20, 1999 3:50 PM
To: 'xsl-list@xxxxxxxxxxxxxxxx'
Subject: How to put a value-of select into a variable.
Hi.
I was hopping someone knows how to put a
<xsl:value-of select="@name"/> into a variable so that I can pass
the information to a JavaScript function defined in the XSL style sheet.
Thanks.
,, Stephane DeCoeli Cote
` > InterPro Expense System
||| ~ ||| w (925) 730-3717
-|||=oOOo====oOOo=|||-
||| \ / || \ / |||
\/ || \/
/ \
~ ~
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| How to put a value-of select into a, Cote, Stephane | Thread | RE: How to put a value-of select in, Cote, Stephane |
| XSL+XML -> Non-HTML, John Dunn | Date | Numerical sort, Cote, Stephane |
| Month |