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

Re: Sorting substitution instructions by max. length o

Subject: Re: Sorting substitution instructions by max. length of matches
From: "Yves Forkl (SRZ)" <Y.Forkl@xxxxxx>
Date: Fri, 05 Oct 2007 17:41:20 +0200
Re:  Sorting substitution instructions by max. length o
David Carlisle wrote:
I'd probably use analyze-string rather than using an explicit recursion to do the lookup.

Thank you for this solution which is really elegant. Once I have seen this, I come to think that I've exposed a rather trivial problem... :-)


(I think in both cases they may fail to find the longest match possible, as earlier matches may obscure a possible later longer match)

You are definitely right that I have to face this issue which I admittedly failed to notice, and that this problem is common to both approaches.


Can you think of an example of an input text and a regex with matches that would overlap in this way? (Each regex's matches will be checked in a pass of its own, so it must be matches of the same regex.) I tried but could not find an example within some time.

Yves

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.