[Bug 4949] Suggested extension to fn:replace (first match only)

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4949

           Summary: Suggested extension to fn:replace (first match only)
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Functions and Operators
        AssignedTo: mike@saxonica.com
        ReportedBy: chamberl@almaden.ibm.com
         QAContact: public-qt-comments@w3.org


The EXSLT community (http://exslt.org/) has defined an XSLT function named 
regexp:replace() (http://exslt.org/regexp/functions/replace/index.html) 
which is similar in purpose to our function fn:replace(). The two 
functions have different signatures and slightly different semantics. 
EXSLT's regexp:replace() function supports a flag that sets its behavior 
to replace-all-matches vs. replace-first-match-only (fn:replace() 
currently supports only the first of these behaviors and has no 
corresponding flag.)

For users of the EXSLT function who wish to migrate to XQuery or XSLT 2.0, 
it would be helpful to add an additional flag to fn:replace() that 
provides similar functionality. I request that the joint working groups 
consider this additional parameter as a possible future extension to 
fn:replace().

Received on Tuesday, 14 August 2007 18:22:10 UTC