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