Skip Menu |

This queue is for tickets about the Data-DPath CPAN distribution.

Report information
The Basics
Id: 94211
Status: resolved
Priority: 0/
Queue: Data-DPath

People
Owner: schwigon [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: Documentation addition
In XPath it's quite common to use a filter with attributes like this: //AAA/BBB/*[@CCC="DDD"] A naive user could translate such a construct for Data::DPath like this: //AAA/BBB/*[CCC eq "DDD"] except that it does not work. What works is this: //AAA/BBB/*[key eq "CCC" && value eq "DDD"] As this is a quite common use case it should probably be mentioned in the Synopsis of "The DPath language". Regards, Slaven
Thanks. Applied in just released v0.51. Steffen On Wed Mar 26 09:45:31 2014, SREZIC wrote: Show quoted text
> In XPath it's quite common to use a filter with attributes like this: > > //AAA/BBB/*[@CCC="DDD"] > > A naive user could translate such a construct for Data::DPath like > this: > > //AAA/BBB/*[CCC eq "DDD"] > > except that it does not work. What works is this: > > //AAA/BBB/*[key eq "CCC" && value eq "DDD"] > > As this is a quite common use case it should probably be mentioned in > the Synopsis of "The DPath language". > > Regards, > Slaven
-- Steffen Schwigon <ss5@renormalist.net> Dresden Perl Mongers <http://dresden-pm.org/>