You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Samuel Arnod-Prin <sa...@smile.ch> on 2001/10/02 15:14:11 UTC

[C2] How to give intelligence to XSL ???

Hello,

I would like someone to help me to resolve a simple problem :

I've got a few xml files...   page_X.xml
all page_X.xml are transformed using pages.xsl


In pages.xsl, I would like to add <a href="edit.xsp">EDIT ME!</a> only
if request.getSession().getAttribute("editable") equals "1" ..

how can I do ?? I don't want to add java code into my xml files... I
want them in xml not xsp...
what is the solution ??

There seems to be a session logicsheets in cocoon doc, but only for
c1... I've tried for c2, but it always return blank (for example
<session:get-creation-time/>)

---------------------------------------------------------------------
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: [C2] How to give intelligence to XSL ???

Posted by Samuel Arnod-Prin <sa...@dxd2.com>.
Max Larsson a écrit :

> Hi,
>
> i am using the session logic sheet with C2b1. The only thing
> i can think why it does not work with you is that the namespace
> for the session logicsheet is not correct. i use the following:
> ...
>  xmlns:session="http://apache.org/xsp/session/2.0"
> ...

this is what I am using...
it works perfectly in a xsp file, but in the xsl file, It's impossible ;o(

can you send me an example that works perfectly on your config ?


---------------------------------------------------------------------
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: [C2] How to give intelligence to XSL ???

Posted by Max Larsson <ma...@gmservice.de>.
HI,

no i'am not using it in xsl. I read your mail to fast.
I thought you wrote xsp, blame me. But anyway have you tried
to pass the the value from the session to the xalan through
the sitemap. To da that you would need an action, which reads
the session attribute and sotores it accessibel to the sitemap.
Something like that


<map:match pattern="anything">
	<map:act type="sessiontoresultaction">
		<map:generate type="serverpages" src="anything"/>
		<map:transform src="anything.xsl">
			<map:parameter name="session_attribure" value="{session_attribute}"/>
		</map:transform>
		<map:serialize/>
	</map:act>
</map:match>

How exactly that works, you have to figure out by scanning docs, posted
mail here.

Max


-----Original Message-----
From: smile@gmservice.de [mailto:smile@gmservice.de]On Behalf Of Samuel
Arnod-Prin
Sent: Dienstag, 2. Oktober 2001 15:56
To: cocoon-users@xml.apache.org
Subject: Re: [C2] How to give intelligence to XSL ???


Max Larsson a écrit :
>
> Hi,
>
> i am using the session logic sheet with C2b1. The only thing
> i can think why it does not work with you is that the namespace
> for the session logicsheet is not correct. i use the following:
> ...
>  xmlns:session="http://apache.org/xsp/session/2.0"
> ...

do you really use it into the xsl file ?

---------------------------------------------------------------------
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>



---------------------------------------------------------------------
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: [C2] How to give intelligence to XSL ???

Posted by Samuel Arnod-Prin <sa...@smile.ch>.
Max Larsson a écrit :
> 
> Hi,
> 
> i am using the session logic sheet with C2b1. The only thing
> i can think why it does not work with you is that the namespace
> for the session logicsheet is not correct. i use the following:
> ...
>  xmlns:session="http://apache.org/xsp/session/2.0"
> ...

do you really use it into the xsl file ?

---------------------------------------------------------------------
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: [C2] How to give intelligence to XSL ???

Posted by Max Larsson <ma...@gmservice.de>.
Hi,

i am using the session logic sheet with C2b1. The only thing
i can think why it does not work with you is that the namespace
for the session logicsheet is not correct. i use the following:
...
 xmlns:session="http://apache.org/xsp/session/2.0"
...


Max

-----Original Message-----
From: smile@gmservice.de [mailto:smile@gmservice.de]On Behalf Of Samuel
Arnod-Prin
Sent: Dienstag, 2. Oktober 2001 15:14
To: cocoon-users@xml.apache.org
Subject: [C2] How to give intelligence to XSL ???


Hello,

I would like someone to help me to resolve a simple problem :

I've got a few xml files...   page_X.xml
all page_X.xml are transformed using pages.xsl


In pages.xsl, I would like to add <a href="edit.xsp">EDIT ME!</a> only
if request.getSession().getAttribute("editable") equals "1" ..

how can I do ?? I don't want to add java code into my xml files... I
want them in xml not xsp...
what is the solution ??

There seems to be a session logicsheets in cocoon doc, but only for
c1... I've tried for c2, but it always return blank (for example
<session:get-creation-time/>)

---------------------------------------------------------------------
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>



---------------------------------------------------------------------
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>