xsl-list
[Top] [All Lists]

RE: returning a value with no preceding zeros

2004-03-15 09:07:27
What about number(001) and so forth?

Using XSelerator, the following XML

<root>
<num1>001</num1>
</root>

combined with this XSL

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:template match="/root">
        <xsl:value-of select="number(num1)" />
</xsl:template>

</xsl:stylesheet>

returns

<?xml version="1.0" encoding="UTF-16"?>1

Regards, Pieter 

-----Original Message-----
From: Norma Yeazell [mailto:Nyeazell(_at_)oneil(_dot_)com] 
Sent: Monday, March 15, 2004 9:31 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] returning a value with no preceding zeros

I want to test and attribute value and return only whole numbers For
instance if the attribute is 001 I want the returned value to be just 1 if
it is 002 value should be 2 and so on.
 
Can any one give me a clue here? 

Thanks for any help!


Confidentiality Notice
The information contained in this e-mail is confidential and intended for
use only by the person(s) or organization listed in the address. If you have
received this communication in error, please contact the sender at O'Neil &
Associates, Inc., immediately. Any copying, dissemination, or distribution
of this communication, other than by the intended recipient, is strictly
prohibited.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>