xsl-list
[Top] [All Lists]

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

2010-04-08 07:07:49
Robby Pelssers wrote:

Their product schema does not allow a <Value> to have subtags... That's why 
they use CDATA.  And in my opinion that's not so bad since from a data point of view 
these html tags are pure a rendition thing.

But basically I see 2 options from the responses:

(1): Use cdata-sections attribute on <xsl:output> (2): make changes to the schema for all elements which may have html tags as children


I still see a problem with (1)... in the end when serializing to html I still want to disable-output-escaping so the browser will recognize <sub> and <sup> as tags instead of plain text... but then the greater then '>' will result in invalid xml.

You will need to explain in more detail what you want to achieve.
Do you have different stylesheets, some outputting XML, some HTML? Or in what case do you want a CDATA section and in what case do you want to output HTML elements like 'sub'?



--

        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>
--~--