Hi,

I can tell you what in my opinion should work, but at least in the 
version of Cocoon that I have on my system it doesn't. It would be great 
if one of the developers commented on this approach, why it doesn't work 
and how to possibly make it work.

Here's the XSP snippet that I think should work:

    <xsp:logic>
        String test = resultSet.getString("data"); // Or however else 
you would get at your data
        this.lexicalHandler.startCDATA();
        this.contentHandler.characters(test.toCharArray(), 0, 
test.length());
        this.lexicalHandler.endCDATA();
    </xsp:logic>

The reason it doesn't work, I suspect, is because the LexicalHandler 
part of the XMLConsumer is implemented by the AbstractXMLConsumer as 
empty methods, and the real entity that consumes the SAX events and 
output the text to be sent to the client is not overriding those methods.

So, the quiestion is: is it possible to communicate the lexical 
structure of the XML all the way thtough to the entity that serializes 
XML as text? And if it already is communicated, then can we make it 
reflect the lexical structure in its output?

Thank you for doing such a great job, and thank you in advance for your 
insight on this issue.
--
Ilya

gv wrote:

>Hi,
>
>Is there any way to put an ESQL result string into a
>CDATA section in the XSP output?
>
>I want to do something like the following, but
>(predictably) the ESQL tag itself is put into CDATA:
>
><mycol><![CDATA[<esql:get-string column="my_col"
>/>]]></mycol>
>
>Also tried &lt; and &gt; entities for the braces
>surrounding the CDATA; didn't work (&lt; and &gt; stay
>as entities in the XSP output).
>
>Desired XSP output:
>
><mycol><[CDATA[ result ]]></mycol>
>
>Is there any way to do this?
>
>Thanks,
>John
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Finance - Get real-time stock quotes
>http://finance.yahoo.com
>
>---------------------------------------------------------------------
>Please check that your question  has not already been answered in the
>FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
>To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
>For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
>  
>




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to