Subject: Re: [xsl] Pattern Substring From: Senthilukvelaan <skumaravelan@xxxxxxxxxxxxxx> Date: Wed, 3 Mar 2010 19:57:02 -0800 |
Hi Wendell, Yes, I admit that the code I have written is not completely correct. My data format is that it would only contains "055" and the option number is always prefixed and suffixed with one space char. Possible Values are Text1 055-0001 Text1 Text2 X055-0002 Text2 Text1 J055-0003 Text1 Text1 K055-0004 Text1 I want to get only the options numbers from the above value. Thanks, Senthil On Wed, Mar 3, 2010 at 12:21 PM, Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> wrote: > Senthil, > > At 02:37 PM 3/3/2010, you wrote: >> >> Hi, >> Yes, the Option Number might not start with 55 in some cases, I would >> like to handle them as well. > > But this amounts to saying "I know that the code I wrote is wrong, and I > would like it to be correct". > > What would be correct? Telling us what would be wrong is not, by itself, a > specification. > > We can't possibly guess, given what you have told us, what option numbers > there might be in the following examples: > >1 > Text3 055-0003 Text3 055-0003 Text3 > Text4 045-0004 > 055-0005 Text5 > 055-0006 > 0007 > 8 > Text9 9 Text9 > Text10 XYZ-0010 Text10 > Text11055-0011Text11 > 12-055 Text12 > > etc. > >> I do not have option of moving to XSLT 2.0 at this time. > > That's a pity. > >> Please suggest me ,how this can be done in XSLT 1.0. > > It could perhaps be done by a creative use of string functions (similar to > what you have tried), or possibly a recursive string processing algorithm. > Or maybe not. Maybe you need a brute force test against a set of known > values. > > Cheers, > Wendell > > > > ====================================================================== > 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 > ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Pattern Substring, Wendell Piez | Thread | Re: [xsl] Pattern Substring, Wendell Piez |
Re: [xsl] Math "functions" for XSLT, Dimitre Novatchev | Date | Re: [xsl] Math "functions" for XSLT, Liam R E Quin |
Month |