xpath string concatenation function

Bug #571303 reported by edA-qa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TestPlan
Fix Committed
Medium
Unassigned

Bug Description

The string() function in xpath just considers the first node (and its children) in a node-set. There are many cases where a concatenated result is desired instead.

For example, say you wish to get all the nodes following a particular <br/> node. You can easily specify the nodes you want like:

//br/following-sibling::node()

but string() will just take the first once. What we want is a concat function which takes the string() conversion of all of the nodes. Since the TypeConvert class can already do string() conversion the implementation of such a concat should be trivial.

set %Result% as concat //br/following-sibling::node()

Related branches

Revision history for this message
edA-qa (eda-qa) wrote :

Thinking about it the function need not even be related to Xpath, it could simply concatenate any iterable list relying on string conversion for those items.

Changed in testplan:
importance: Undecided → Medium
milestone: none → testplan-1-0-r6
status: New → Confirmed
Revision history for this message
edA-qa (eda-qa) wrote :

See test
set_func/test_stringconcat.test

Changed in testplan:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.