Skip Menu |
 

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

Report information
The Basics
Id: 30813
Status: resolved
Priority: 0/
Queue: XML-XPath

People
Owner: MANWAR [...] cpan.org
Requestors: tokuhirom [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.16
Fixed in: 1.17



Subject: cannot select /.. and /.
Download (untitled) / with headers
text/plain 858b
XML::XPath cannot select '/.' and '/..'. === t/31dots.t ================================================================== --- t/31dots.t (revision 7246) +++ t/31dots.t (revision 7247) @@ -0,0 +1,14 @@ +use strict; +use warnings; +use Test::More tests => 3; +use XML::XPath; + +my $xp = XML::XPath->new(ioref => *DATA); +ok($xp); + +my ($root, ) = $xp->findnodes('/.'); +is $root->toString(), '<page />'; +ok not $xp->findnodes('/..'); + +__END__ +<page></page> === XPath/Parser.pm ================================================================== --- XPath/Parser.pm (revision 7246) +++ XPath/Parser.pm (revision 7247) @@ -796,6 +796,9 @@ elsif ($token =~ /^$AXIS_NAME($NCWild|$QName|$QNWild|$NODE_TYPE)$/o) { return 1; } + elsif ($token =~ /^\.\.?$/) { + return 1; + } debug("SUB: '$token' not a step\n");
Resolved.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.