Paul Clapham wrote:Well, you don't really need that, you know. The CDATA section is really just a convenience for people whose serializers can't handle escaping properly and for people typing XML into a text editor. You can just as well output this:
and all compliant XML parsers will treat that exactly the same as they would treat
However it's possible to have your XSLT output as CDATA every text child of elements with specific names. Look up the "cdata-section-elements" attribute of the xsl:output element.
Thanks Paul.
I have added cdata-section-elements="namelist" in my xsl:output tag but it doesn't make any difference.
Do I need to change something in xsl:value-of tag?
Thanks.