(1) XSLT (2) Regular programming language e.g. Java / .NET and use the XML libraries to build the document.
Also with the navigation e.g. UP; it looks hard to maintain.
I can imagine production code ending up with:
UP; UP; UP; UP; UP;
A simple change to the XML structure and this will break so easily.
so you could easily PUSH the current node
dive deep deep deep deep (and even have no problem adding more later)
then POP the original location back.
But if you are only doing very simple stuff that you could do quite simply in XSLT anyway then it is probably fine.
Although XSLT may be preferable anyway due to tooling support.
(1) XSLT (2) Regular programming language e.g. Java / .NET and use the XML libraries to build the document.
Also with the navigation e.g. UP; it looks hard to maintain.
I can imagine production code ending up with:
UP; UP; UP; UP; UP;
A simple change to the XML structure and this will break so easily.