consider this....
<xsl:output method="xml" cdata-section-elements="urn:data"/>
that works nicely BUT, what if I have some urn:data elements that I do want CDATA, and some I dont.
the obvious thing to do is specify a path!
<xsl:output method="xml" cdata-section-elements="urn:OperatorSpecificData/urn:data"/>
that would work (in theory)...but it doesnt, because paths arent allowed.
hmmmm.
any ideas?
(ok, maybe I could create my own custom element and then "copy" the document with the custom element out, replacing the custom element with the actual requirement element....though i have suspicion the 'cdata' nature of the data would be lost and it would become standard escaped string data)
One option might be to use
serialize()in a template specific to the element you want to have CDATA.Not sure if there's a way to do it without resorting to xsl:value-of w/DOE (disable-output-escaping) though.
Example...
XML Input
XSLT 3.0
XML Output