You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jason Foster <ja...@uwaterloo.ca> on 2001/06/07 22:20:42 UTC
and <
Yet another output escaping question (but I have read a bunch of
documentation)...
I'm trying to figure out a way for an Action to pass information to an XSP
or XSLT page. My current plan is to use session attributes.
Action
session.setAttribute( "result", "<RESULT type="good">Saved!</RESULT>" );
XSP
<xsp:logic>
resultString = (String) <session:get-attribute name="results" />;
if ( resultString != null )
{
<RESULTS>
<session:get-attribute name="results" as="xml" />
</RESULTS>
<session:remove-attribute name="results" />
}
</xsp:logic>
This is working reasonably well, except for the one problem that what
comes out is (slightly edited):
<RESULTS>
<session:attribute>
<RESULT...RESULT>
</session:attribute>
</RESULTS>
Which of course isn't useful to me for later processing.
Does anyone know how to keep the output from being escaped?
Thanks!
Jason Foster
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: and <
Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Jason Foster a écrit :
>
> Yet another output escaping question (but I have read a bunch of
> documentation)...
>
> I'm trying to figure out a way for an Action to pass information to an XSP
> or XSLT page. My current plan is to use session attributes.
>
> Action
>
> session.setAttribute( "result", "<RESULT type="good">Saved!</RESULT>" );
>
> XSP
>
> <xsp:logic>
> resultString = (String) <session:get-attribute name="results" />;
> if ( resultString != null )
> {
> <RESULTS>
> <session:get-attribute name="results" as="xml" />
> </RESULTS>
> <session:remove-attribute name="results" />
> }
> </xsp:logic>
>
> This is working reasonably well, except for the one problem that what
> comes out is (slightly edited):
>
> <RESULTS>
> <session:attribute>
> <RESULT...RESULT>
> </session:attribute>
> </RESULTS>
>
> Which of course isn't useful to me for later processing.
>
> Does anyone know how to keep the output from being escaped?
>
> Thanks!
>
> Jason Foster
>
Just a thought : you could place a DOM element or an object implementing
XMLFragment in the request and insert it in the XSP with a <xsp:expr>
--
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>