Skip Menu |

This queue is for tickets about the XML-XPath CPAN distribution.

Report information
The Basics
Id: 82114
Status: new
Priority: 0/
Queue: XML-XPath

People
Owner: Nobody in particular
Requestors: eric [...] w3.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: newline in contains arg2 matches anything
Date: Wed, 19 Dec 2012 15:26:51 -0500
To: bug-XML-XPath [...] rt.cpan.org
From: Eric Prud'hommeaux <eric [...] w3.org>
XML::XPath->new(xml => "<a>x</a>")->find("/a[contains(text(), '\ny')]") matches the emebdded <a/> element even though y does not appear in the text. This occurs regardless of position: XML::XPath->new(xml => "<a>x</a>")->find("/a[contains(text(), 'y\n')]") I'm hoping looking for a pattern which will find newlines in text, à la: XML::XPath->new(xml => "<a>bc\nde</a>")->find("/a[contains(text(), '\n')]") Nothing in http://www.w3.org/TR/xpath-functions/#func-contains implies such a behavior (that I've noticed). -- -ericP