I try to match multiple elements and all their occurences through concatenation.
I tried two expressions
concat(//h5,'###',//h5/following-sibling::p)
concat(//*/h5,'###',//*/h5/following-sibling::p)
but both work partly - they match only the first occurence.
What I'm doing wrong? What is the working way to match all occurences?
The
string([node-set])
function is - most probably - implicitly used when the argument is an expression like//*/h5
socontact(//*/h5, "some")
could translate to
concat(string(//*/h5), "some")
.From string() doc:
To answer OP's question
Nothing wrong per se, it's just many XPath 1.0 function operate only on the first element of a node set.
Those node sets should be iterated externally.