First question: is there any way to get the name of a node\'s attributes?
It depends a little bit on the context, I believe. In most cases, I expect you'd have to query "@*
", enumerate over the items, and call "name()
" - but it may work in some tests.
Re the edit - you can do:
@*[number(.)>0]
to find attributes matching your criteria, and:
concat(name(),'=',.)
to display the output. I don't think you can do both at once, though. What is the context here? xslt? what?