N
nikoromano
Can anyone think of a changing these XPath expressions to return comma
separated lists?
/Library/Branch/book/(if(author="John") then position() else "")
output: 1 3 5
desired output: 1, 3, 5
/Library/Branch/book/(if(author="Mary") then position() else "")
output: 2
desired output: 2
/Library/Branch/book/(if(author="Mark") then position() else "")
output: 4
desired output: 4
<Library>
<Branch>
<book>
<author>John</author>
</book>
<book>
<author>Mary</author>
</book>
</Branch>
<Branch>
<book>
<author>John</author>
</book>
<book>
<author>Mark</author>
</book>
<book>
<author>John</author>
</Branch>
</Library>
separated lists?
/Library/Branch/book/(if(author="John") then position() else "")
output: 1 3 5
desired output: 1, 3, 5
/Library/Branch/book/(if(author="Mary") then position() else "")
output: 2
desired output: 2
/Library/Branch/book/(if(author="Mark") then position() else "")
output: 4
desired output: 4
<Library>
<Branch>
<book>
<author>John</author>
</book>
<book>
<author>Mary</author>
</book>
</Branch>
<Branch>
<book>
<author>John</author>
</book>
<book>
<author>Mark</author>
</book>
<book>
<author>John</author>
</Branch>
</Library>