Reputation: 115
xml
<books> <book> <author>Gambardella, Tim</author> </book> <book> <author>Knorr, Stefan</author> </book> <book> <author>O'Brien, Tim</author> </book> </books>
How get authors with same name?
I tried searching but didn't find even working examples for finding the same strings
Upvotes: 0
Views: 94
Reputation: 167516
Usually this is a grouping problem e.g.
for $author in books/book/author
group by $prename := $author => substring-after(',') => normalize-space()
return
<group prename="{$prename}">{$author}</group>
Upvotes: 1