XPath (was String vs Symbol use cases)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

XPath (was String vs Symbol use cases)

Peter Uhnak
Hi monty,

thanks for your answers. The original question wasn't really aimed at
XPath, it was just an example, however you raise some important points
which I should keep in mind.

Now for the XPath itself, I seem to have run into a bug

Imagine xml
~~~~~~~~~
<?xml version="1.0" encoding="UTF-8"?>
<root>
    <node id="a">
        <node id="a.1" />
        <node id="a.2" />
    </node>
    <node id="b">
       <node id="b.1" />
        <node id="b.2" />
    </node>
</root>
~~~~~~~~~~~~~~~~

and an xpath '//node[position()=2]'

This should return collection containing nodes "b","a.2","b.2",
however in Pharo it returns collection with "a.1"

Is this something that can be easily fixed? If not I would prefer to
work around it than wait for fix.

Thanks,
Peter

Reply | Threaded
Open this post in threaded view
|

Re: XPath (was String vs Symbol use cases)

monty-3
I understand the problem and I'm studying possible fixes while reviewing the specs, but I need more time. if you could work around it for now, that would be good. I will update you by mail.