I am working with some XML inside of XSLT. I want to save a section of it in a content node. I left the CDATA node out of this example.
When I grab the xml like this it's escaped ie. <
= <
<content name="test”>
<xsl:copy-of select="//content[@name='something']/node()" />
</content>
But I need to do some processing on the data before I store it in a content node. I have an xsl:for-each call and it loops saving sections. However, when I call a similar command I can't get the XML to escape.
<xsl:for-each select="exsl:node-set($xml)//data">
<content name="test">
<xsl:copy-of select="./node()" />
</content>
I've put CDATA nodes around it and outputted the content, but then I have issues in the system with double escaping. I really need this copy-of call to output escaped XML.
I really want something like:
<content name="test">
<data>Some data<\data>
</content>
Input would be something like this:
<root>
<data>Some data</data>
<data>more data</data>
</root>
This a simplification of the data. There would be additional xml nodes in the data node.