You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Carola Westerlund <ca...@opk.org> on 2000/10/06 00:03:40 UTC

SV: xsp:expr inside xsl:variable

could it be possible to use the <xsl:eval> tag and set the no entities flag to yes
in the problem mentioned instead of <xsp:expr> like:

<xsl:eval no-entities="yes">request.getParameter("user")</xsl:eval> 
The no entities flag keeps the XSL processor from escaping certain
characters like "> < &" using their corresponding character entity like
"&gt; &lt; &amp".Which it will automatically do in an eval statement unless you specifically
say "no entities".

It keeps things like "Inte Lite it" or "<-- cool name by the way" from
being improper XML when it gets exported out.

or am I out bicycling? ; ) 

// Carola
www.inteliteit.com

----- Original Message ----- 
From: Donald Ball <ba...@webslingerZ.com>
To: Cocoon List (E-mail) <co...@xml.apache.org>
Sent: Thursday, September 28, 2000 10:00 PM
Subject: Re: xsp:expr inside xsl:variable


> On Thu, 28 Sep 2000, Matthew Smith wrote:
> 
> > This is in a logic sheet:
> > <xsl:variable
> > name="user"><xsp:expr>request.getParameter("user")</xsp:expr></xsl:variable>
> > 
> > The value of $user then becomes 'request.getParameter("user")'.  How do I
> > assign an XSL variable the value of an XSP expression?  I realize I could
> > just use an xsl parameter in this case, but I'm aiming for something else.
> 
> you can't, it's impossible. you can't set a variable in a logicsheet with
> the value of a request-time expression, at least not in the fashion in
> which you're trying it here. remember, logicsheets are applied and
> resolved before any request-time information is available. look, i just
> wrote a huge message detailing the subtleties of writing logicsheets a few
> days ago - do a search for get-nested-content subject line in the
> archives. i'm not about to retype it all. those of you who've expressed an
> interest in helping write docs, i think that message would be a good place
> to start.
> 
> - donald
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 
>