I have an XML with a text node that is also an XML. I need to transform this XML (the outer XML) with XSLT 2.0 and change a couple of things in the inner XML (the one in the text node). The result XML should have the same structure as the input XML (including the text node with XML), but with the changes applied on the inner XML.
I'm using Saxon XSLT processor, so I have access to the parse() function. But I'm not sure how I can use it to process the inner XML and then convert it back to a text node.
This is a sample input XML:
<tag>
<innerXml>
<node1>
<node2>Value</node2>
</node1>
</innerXml>
</tag>
And the XSLT transform would output:
<tag>
<innerXml>
<node1>
<node2>Some other value</node2>
</node1>
</innerXml>
</tag>
Note that the inner XML is much more complex than this, so a simple string replace won't work.