Re: [xsl] How do i use a substring

Subject: Re: [xsl] How do i use a substring
From: "Laura Jenkins" <xsl_list@xxxxxxxxxxx>
Date: Tue, 30 Apr 2002 09:50:12 +0000
is it very application critical that u use the namespace
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";>?????

if not then u are better off using
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>


u seem to have this problem even before, with the <xsl:variable> and <xsl:text>..
WD-xsl was based on a very early working draft of XSLT before
some of these elements were defined.
you are more restricted with the namespace u are using





From: Suman.Sathyanarayan@xxxxxxxxxxxx
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] How do i use a substring
Date: Tue, 30 Apr 2002 10:01:49 +0530


Hello everybody,


I have a telephone number

1234567890ABCD
which i recieve from an XML BatchResponse, i use an XML Schema

i want to seperate it in my XSL as

123-456-7890-ABCD

So any clues how to do it?
<xsl:for-each select="attr[@name='telephoneNumber']">
  <xsl:value-of select="substring(value, 1, 3)"></xsl:value-of>
</xsl:for-each>

The substring function does'nt work here
again the same

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";>
namespace problem i guess,

i have installed the MSXML3 in replace mode from netcrucible.com
but still it does'nt recognize the substring function.


Regards, Suman

-----------------------Disclaimer------------------------

The views of the author may not necessarily reflect those
of the Company. All liability is excluded to the extent
permitted by law for any claims arising as a result of the
use of this medium to transmit information by or to
IT Solutions (India) Pvt. Ltd.

We have taken precautions to minimize the risk of
transmitting software viruses, but we advise you to
carry out your own virus checks on any attachment to
this message.  We cannot accept liability for any loss or
damage caused by software viruses.

------------------------Disclaimer------------------------


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






_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx



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



Current Thread