Hi Ajay, It seems the attribute cdata-section-elements of xsl:output may serve your need. The XSLT (1.0) spec says, this specifies a list of the names of elements whose text node children should be output using CDATA sections.
Secondly I think, your legacy application expecting CDATA markers in XML documents, and using text in them as normal text nodes may be a design error (looks like an incorrect modeling of XML information -- this is a common understanding among people who model XML data) in the legacy application. If you see opportunity to fix your legacy application with this respect, you may pursue along this path. Having said this, its difficult for me to say really (since I have very little idea of your technical environment) if the way you're using CDATA in your legacy application is an incorrect design -- if you can't change (or can't get it changed) the legacy application with this respect, then you simply have to use some of the workarounds suggested in this thread or may have to use other approaches. On Thu, Nov 17, 2011 at 7:44 PM, ajay bhadauria <abhadau...@yahoo.com>wrote: > > Thanks a lot for reply, > > I agree with you. However, in our case, the other side of the legacy > application expects all element with CDATA section. > > So, If I need to get all the CDATA section in the output xml, what should > I do in the xslt where I do not know which elements have CDATA but I need > all the elements in the output. > > Regards > Ajay > -- Regards, Mukul Gandhi