You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by gv <jg...@yahoo.com> on 2002/09/09 19:51:09 UTC

XSP output: disable-output-escaping?

Hi,

>From an XSP page, I am trying to output a Java
variable that contains the XML result of an external
script as XML, but my angle brackets are escaping to
character entities.

I have a Java String variable called 'scriptOutput'.
It's filled with a string of XML that comes from an
external script. My goal is have my XSP page output
this String as XML.

The results of my XSP looks something like this:

<page xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-request="http://apache.org/xsp/request/2.0">

&lt;car&gt;
  &lt;door&gt;
    &lt;handle/&gt;
  &lt;/door&gt;
&lt;car&gt;

</page>

This is the result I want:

<page xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-request="http://apache.org/xsp/request/2.0">

<car>
  <door>
    <handle/>
  </door>
</car>

</page>

I tried fooling around with <xsp:element>,
<xsp:content>, and <xsp:expr> with no luck. I guess
I'm looking to do something similar to XSLT's
'disable-output-escaping'. Any ideas on if/how this
can be done?

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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: XSP output: disable-output-escaping?

Posted by Vadim Gritsenko <va...@verizon.net>.
gv wrote:

>Hi,
>
>>>From an XSP page, I am trying to output a Java
>variable that contains the XML result of an external
>script as XML, but my angle brackets are escaping to
>character entities.
>
>I have a Java String variable called 'scriptOutput'.
>It's filled with a string of XML that comes from an
>external script. My goal is have my XSP page output
>this String as XML.
>

You will have to convert your Java String into SAX XML events. This is 
done by parsing this text by XML parser.

Util logicsheet has a tag (IIRC, include-expr) which does exactly like 
this. Search archives for details, it was explained miriad of times.

Vadim



>The results of my XSP looks something like this:
>
><page xmlns:xsp="http://apache.org/xsp"
>xmlns:xsp-request="http://apache.org/xsp/request/2.0">
>
>&lt;car&gt;
>  &lt;door&gt;
>    &lt;handle/&gt;
>  &lt;/door&gt;
>&lt;car&gt;
>
></page>
>
>This is the result I want:
>
><page xmlns:xsp="http://apache.org/xsp"
>xmlns:xsp-request="http://apache.org/xsp/request/2.0">
>
><car>
>  <door>
>    <handle/>
>  </door>
></car>
>
></page>
>
>I tried fooling around with <xsp:element>,
><xsp:content>, and <xsp:expr> with no luck. I guess
>I'm looking to do something similar to XSLT's
>'disable-output-escaping'. Any ideas on if/how this
>can be done?
>
>Thanks,
>John
>  
>



---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>