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

Re: Pattern Substring

Subject: Re: Pattern Substring
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 03 Mar 2010 15:21:25 -0500
Re:  Pattern Substring
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:

Text1 055-0001 Text1
Text2 X055-0002 Text2
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

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.