I have an XSL transformation where I used to query a string that way:
<xsl:value-of select="/input/as/a[@id=$id]/CaMeL[@id2=$id2]/@interest"/>
Now, it happened that CaMeL (in the XML) shall be renamed to cAmEl. Fine. Simply chaning the case in my transform would immediately work but I would lose backward compatibilty.
Searching at SO, I found this: XSLT Stylesheet: Changing text to upper case
The accepted answer looks promising but I’m currently stuck at how to fill the doc parameter used in the answer.
How could I add a translation step in my existing <xsl:template match="/"> that translates the whole doc to lower case before any other templates are going to be applied?
Maybe this can help. But I didn’t test it. Could you provide some sample XML?
EDIT
If you want to change your whole XML file to lower case (without elements and attributes values of course) you can use this following template:
Having done the conversion to lower-case, you can try to create multi-pass XSLT traformation – the next pass would be your conversion. However, I’m not sure how to do it using XSLT 1.0.
EDIT 2
OK, so here comes the whole example. I didn’t have your examples so I worked on my own ones.
Sample input file:
XSLT with multi-pass sorting:
I works under Altova XMLSpy debugger. Output: