0

I am using bpel composite, in the composite I use mediator component and in that I use xsl to transform incoming payload data to outbound payload. I have a requirement where I need to append to one of the xml element in the outbound schema. I tried using in .xsl file the follwing code:

<ns1:request>
        <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
        <xsl:value-of disable-output-escaping="yes" select="/imp1:error-event-payload/imp1:error-payload"/>
        <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
      </ns1:request>

but this is not generating output as <request><![CDATA somedata ]]> </request> . Is there any way where i can transform the xml elment with CDATA section.

1 Answer 1

1

Well CDATA sections are a serialization option you can specify with

<xsl:output cdata-section-elements="ns1:request"/>

That will only work if your XSLT processor or tool chain serializes the result tree to a file, not if a result tree (e.g. DOM tree or XPath/XSLT tree implementation) is passed on.

Sign up to request clarification or add additional context in comments.

3 Comments

when i use xsl:output in my .xsl file, it says xsl:output is currently not supported
I am afraid I can't help with that problem then as I am not familiar with bpel, only with XSLT, maybe someone else will come along and tell you which options your environment offers.
is there any other alternative way where i can append CDATA to xml element content or any inbuild function like ora:toCDATA which will append CDATA section to content?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.