Priya Bindra wrote:The irony is that i can use only single XSL.
Who says so? If the best solution is to transform twice, then
you should certainly do that.
My first task is to sort a set of child nodes per parent node in ascending order based on an attribute of the child node. And then sort the parent nodes in ascending order based on another attribute of the parent node.
However in this case you don't need to sort twice. You just have your requirements written down in the wrong order. Starting from the top node, you need to sort the parent nodes in whatever order. And for each of those parents, you need to sort its children in whatever order. Only one transformation required.