This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24618 - xsl:analyze-string and fn:analyze-string
Summary: xsl:analyze-string and fn:analyze-string
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Last Call drafts
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-11 09:17 UTC by Innovimax
Modified: 2014-02-16 08:37 UTC (History)
1 user (show)

See Also:


Attachments

Description Innovimax 2014-02-11 09:17:17 UTC
It would be good to add a relation between

XSLT 3.0 xsl:analyze-string and F&O fn:analyze-string

[1] http://www.w3.org/TR/xslt-30/#analyze-string
[2] www.w3.org/TR/xpath-functions-30/#func-analyze-string
Comment 1 Innovimax 2014-02-11 09:21:26 UTC
here is the email from the archive https://lists.w3.org/Archives/Member/w3c-xsl-wg/2014Jan/0011.html
Comment 2 C. M. Sperberg-McQueen 2014-02-13 11:58:46 UTC
We discussed this issue in Prague.  By "adding a relation" between the two, the bug report means demonstrating their equivalence by showing that the one can be implemented in terms of the other.  Some expressed the view that either could be implemented in terms of the other (at least in the sense that a stylesheet using either could be rewritten to a stylesheet using the other).

Some WG members felt that the only really important relation here was that they are two approaches to providing similar functionality; for that, a hyperlink and some prose should suffice.  This has the advantage that it's unlikely to elicit bug reports about corner cases.  

Note also that xsl:analyze-string supports zero-width matches, while fn:analyze-string() doesn't.  FG has sent mail to the discussion list with an example which can be done in fn:analyze-string() but not (or not conveniently) in xsl:analyze-string:  fn:analyze-string returns information about position of captured substrings, which would be impossible in the general case to recreate with xsl:analyze-string.

MoZ suggested that capturing such lack of equivalence would also be interesting for the note.
Comment 3 Michael Kay 2014-02-16 08:37:45 UTC
I have rephrased the introductory material at the start of section 17 to describe the relationship of xsl:analye-string and fn:analyze-string in more detail, replacing the existing note.