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 29767 - [QT3TS] fn-replace-55
Summary: [QT3TS] fn-replace-55
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-08 08:09 UTC by Tim Mills
Modified: 2016-08-10 15:31 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2016-08-08 08:09:03 UTC
I disagree with the expected result.

$1 refers to the string captured by (a).

In this case (a) will match 'a', (b) with match 'b' etc.
When matching (a), the captured string $1 will be 'a', ptherwise, it will be the empty string.

Therefore I expected 

       <assert-string-value>ak</assert-string-value>

to hold.


   <test-case name="fn-replace-55">
      <description>Test case with undefined captures. Saxon bug 2865.</description>
      <created by="Michael Kay after Gunther Rademacher" on="2016-07-31"/>
      <test>replace('abcdefghijk', '(a)|(b)|(c)|(d)|(e)|(f)|(g)|(h)|(i)|(j)', '$1')
      </test>
      <result>
         <assert-string-value>abcdefghijk</assert-string-value>
      </result>
   </test-case>
Comment 1 Tim Mills 2016-08-10 15:31:20 UTC
I have taken the liberty of fixing this.