I'm trying to place the results of an <esql:get-ascii column="foo"/> tag
into a cdata
block. I've been able to get close, with the <> ending up in the text node
as <
and > but I can't get them inserted as an actual CDATA block. Is there
some simple
solution I've missed or baring that, a hard one...?
I've tried variations of the following:
1.
<body_text>
<![CDATA[<esql:get-ascii column="foo"/>]]>
</body_text>
// results in the text of the tag in the CDATA node
2.
<xsp:logic>
<![CDATA[String cdOpen = "<![CDATA["; ]]>
String cdClose = "]]>";
</xsp:logic>
<body_text>
<xsp:expr>cdOpen</xsp:expr><esql:get-ascii
column="foo"/><xsp:expr>cdClose</xsp:expr>
</body_text>
//with various combinations of CDATA blocks and escaped characters in the
//<xsp:logic/> block
and finally:
3.
<xsp:logic>
<![CDATA[
StringBuffer bodyText= new StringBuffer("");
bodyText.append("<body_text><![CDATA[");
]]>
bodyText.append(<esql:get-ascii column="foo"/>);
<![CDATA[
bodyText.append("]]");
bodyText.append("></body_text>");
]]>
</xsp:logic>
<xsp:expr disable-output-escaping="yes"
>bodyText.toString()</xsp:expr>
// Same results except that the surrounding <body_text> node is now also
escaped and
// appears as part of the text node
Any input will be greatly appreciated.
Steve Sedlmeyer
Crosswalk.com, Inc.
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>