At 2006-04-08 12:26 +0530, Mygrp wrote:
havent tried cdata.
im using something like this:
<xsl:copy-of
select="document('/home/khel/scoresphp/iscore/html/topnav.html')"/>
can i enclose the above in the cdata section?
The XSLT 1.0 document() function will not accept HTML as an input ...
only XML, but it looks from your next post that you've solved that issue.
At 2006-04-09 09:15 +0530, Mygrp wrote:
I tried embedding the html in cdata section, but the result is the
html is html is not interpreted and is displayed as text!!
Yes, because you are just emitting angle brackets, you aren't emitting markup.
This is the use case for disable-output-escaping ... when you have
XML wrapping HTML (whether or not the HTML is in a CDATA, however it
is in there must be well formed or you wouldn't have XML) you need to
have the result serialized as markup, not as text:
If your input were:
<doc>
<![CDATA[<html><body><p>Hello</p></body></html>]]>
</doc>
You would use:
<xsl:value-of select="doc" disable-output-escaping="yes"/>
I hope this helps.
. . . . . . . . . . Ken
--
Registration open for XSLT/XSL-FO training: Wash.,DC 2006-06-12/16
Also for XML/XSLT/XSL-FO training: Birmingham, UK 2006-05-22/25
World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers: http://www.CraneSoftwrights.com/legal
--~------------------------------------------------------------------
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>
--~--