In article <aa**************************@posting.google.com >,
DZ <al*************@hotmail.com> wrote:
% How can i put all tag contents into <![CDATA[...]]> (i mean using XSL)
%
% For example. I have
%
% ...
% <name>
% <firstname>John</firstname>
% <lastname>Malkovich</lastname>
% <name>
% ....
%
% And i want to get:
% <name><![CDATA[
% <firstname>Alexey</firstname>
% <lastname>Alexeev</lastname>
% ]]></name>
You can't do this with XSL. What you've written is exactly the same as
<name>
<firstname>Alexey</firstname>
<lastname>Alexeev</lastname>
</name>
and the XSLT processor is free to pick its quoting method, which will
always be to use < because apart from me nobody seems to like CDATA
sections much.
Actually, I suppose you could do it by building it (including the <!CDATA[[
and ]]>) in an xsl:text element and disabling output escaping, then
serialising the result tree. I'll leave that as an exercise.
--
Patrick TJ McPhee
East York Canada
pt**@interlog.com