Consider this example from w3schools:
Is this what you need?
xml sel -t -m "//@category" -v "." -o " " books.xml
or to separate the results on each line
xml sel -t -m "//@category" -v "." -n books.xml
Update
You're right, your XPath was good, you just need different parameters.
Regarding why the original doesn't work: XSLT 1.0 value-of is defined to work like XPath's string() function, and string(node-set) => string(first-node). See also Feature Request: value-of multiple nodes should concat values of all nodes