This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
cdata output and different xslt processors
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] cdata output and different xslt processors
- From: "Robert Koberg" <rob at koberg dot com>
- Date: Sun, 28 Oct 2001 14:28:05 -0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
I have been porting my presentation layer to use different backend
processors. So far using saxon-java has been the easiest except for it's
handling of cdata. I was wondering if the was a standard way of handling
it, specifically "<" and ">"?
To me, it would seem that the xslt processor should supply the markup
without escaping it. I have seen a response on this from Mike Kay in a post
on Oct 2000 saying:
"Because the angle brackets are in a CDATA section, they are ordinary
characters, not markup, so they have to be output as ordinary characters."
My understanding is that whatever is between cdata brackets should be passed
"as-is". Wouldn't this be easiest for people to understand? I realize there
must be some reason for Saxon not doing this. What is it? WHy do the other
processors I have used not do this?
In a situation I have the workaround (xsl:text
disable-out-put-escaping="yes") is ugly and does not produce the same
results as cdata (that does not escape "<" or ">"). I have to (???) use
cdata because i am trying to output some non-standard browser stuff, here is
a snippet using xsl:text:
<xsl:text disable-output-escaping="yes">
<DIV STYLE="position:absolute; padding:5px; background:menu;
border:2px outset #cccccc;">
<myMenu:menu id="Site" onsubmenu_click="doFunction()" >Site
<myMenu:menu id="mnItem_GenSite">Generate
Site</myMenu:menu>
<myMenu:menu id="mnItem_PromoteSite">Promote
Site</myMenu:menu>
<myMenu:menu
id="mnItem_EditProps_Site">Properties</myMenu:menu>
<myMenu:menu id="mnItem_SiteMap">View
Sitemap</myMenu:menu>
<myMenu:menu id="mnItem_New_Site">Edit Another
Site</myMenu:menu>
</myMenu:menu>
....snip.....
Is there another way I can handle this? I don't want to declare the
namespace for the transformation on the server. I want it to be used only on
the client.
thanks for any help/insight,
-Rob
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list