-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
XPath last() function doesn't return the last item of a nodeset. When last() function is used in xpath expressions, the result is allways an empty nodeset.
See the test of the test suite:
xml file tests/xslt/borrowed/dh_20000530_01.xml
<nodes>
<node>a</node>
<node>b</node>
<node>c</node>
</nodes>
amara code
>>> doc = amara.parse('dh_20000530_01.xml')
>>> doc.xml_select(u'/nodes/node[last()]')
nodeset()
>>> doc.xml_select(u'/nodes/node')
nodeset([<amara.tree.element at 0x236c2d0: name u'node', 0 namespaces, 0 attributes, 1 children>,
<amara.tree.element at 0x236c4d0: name u'node', 0 namespaces, 0 attributes, 1 children>,
<amara.tree.element at 0x236c9d0: name u'node', 0 namespaces, 0 attributes, 1 children>])
Metadata
Metadata
Assignees
Labels
No labels