File: Data.xml
author 1
1912
Song
line 1
line 2
line 3
line 4
line 5
line 6
line 7
line 8
line 9
line 10
line 11
line 12
File: Transform.xslt
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
select="
for $w in tokenize(string(.), '\W+') return lower-case($w)">
order="descending" />
frequency="{count(current-group())}" />
Output: