[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

cdata output and different xslt processors

Subject: cdata output and different xslt processors
From: "Robert Koberg" <rob@xxxxxxxxxx>
Date: Sun, 28 Oct 2001 14:28:05 -0800
cdata output
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">

   &lt;DIV STYLE="position:absolute; padding:5px; background:menu;
border:2px outset #cccccc;"&gt;

      &lt;myMenu:menu id="Site" onsubmenu_click="doFunction()" &gt;Site
      	&lt;myMenu:menu id="mnItem_GenSite"&gt;Generate
Site&lt;/myMenu:menu&gt;
         &lt;myMenu:menu id="mnItem_PromoteSite"&gt;Promote
Site&lt;/myMenu:menu&gt;
      	&lt;myMenu:menu
id="mnItem_EditProps_Site"&gt;Properties&lt;/myMenu:menu&gt;
         &lt;myMenu:menu id="mnItem_SiteMap"&gt;View
Sitemap&lt;/myMenu:menu&gt;
         &lt;myMenu:menu id="mnItem_New_Site"&gt;Edit Another
Site&lt;/myMenu:menu&gt;
      &lt;/myMenu:menu&gt;

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.