You can also select attributes by adding the step: @name
For example, given the content:
<contents> <para><a href="one.html">One</a></para> <para><a href="two.html">Two</a></para> <para><a href="three.html">Three</a></para> </contents>
the expression:
/content/para/a/@href
would return the attribute 'href' of each of the three paragraphs as set.