I\'m a noob with XSLT, so please excuse my ignorance... I\'m trying to sort a simple XML file by attribute value and tag name, but I struggle in accessing the value of the a
You can use multiple xsl:sort instructions, for example:
and since the default data-type is "text" and the default order is "ascending" this gives the desired output.
Edit
This is strange, because for the following XML:
and the XSL above, I get this result:
This includes the desired optional attribute but the order is different to the XML in the edited question ( is in a different position).