xsl-list
[Top] [All Lists]

Re: [xsl] problem with processing CDATA tags in xml

2010-04-08 08:06:05
Robby Pelssers wrote:

Actually I generate 2 kinds....
- xhtml (web rendition)
- DITA map/topics (which they import into framemaker to produce nice PDF's 
showing their product information.

But even DITA recognizes these <sub> and <sup> tags just as AdobeFramemaker 
does, so we use them for all publications actually.

The XSLT/XPath data model does not know any CDATA sections, the XSLT processor only sees text nodes where the original XML might have contained a CDATA section. If you want a CDATA section in the serializezd XML output of a stylesheet then using the 'cdata-section-elements' attribute is the way to achieve that. If you have a different stylesheet producing XHTML served as text/html on the web then CDATA sections don't make sense but in such a stylesheet you can certainly use xsl:value-of with disable-output-escaping="yes" to have the escaped markup result in elements.





--

        Martin Honnen
        http://msmvps.com/blogs/martin_honnen/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--