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/01/03 11:41:58 UTC

Is Cocoon customizable ??

Hello,

I have got a simple question.. sorry for asking it.. but it would
decuplate my interest for coccon if the answer is positive.

I have seen that cocoon can transform xml document depending on
browser... I'm creating an extranet and I would like the transformation
to be depending on the user.
Will I be able to do that or not ?

Acutally, I intercept all requests to tomcat in a common servlet and
then I call my "loopback" server in which there would be cocoon to get
the transformed XML/XSP-document into HTML and then I mix the result
with navigable. components.


Re: Is Cocoon customizable ??

Posted by Paul Russell <pa...@luminas.co.uk>.
* Samuel Arnod-Prin (sarnodprin@smile.ch) wrote :
> I have seen that cocoon can transform xml document depending on
> browser... I'm creating an extranet and I would like the transformation
> to be depending on the user.
> Will I be able to do that or not ?

You certainly will in Cocoon2, and you should be able to do it using XSP
in Cocoon1.


Paul.

-- 
Paul Russell                                 Email:   paul@luminas.co.uk
Technical Director                             Tel:  +44 (0)20 8553 6622
Luminas Internet Applications                  Fax:  +44 (0)870 28 47489
This is not an official statement or order.    Web:    www.luminas.co.uk

Re: Is Cocoon customizable ??

Posted by Michael Bierenfeld <mi...@atmiralis.de>.
> I'm creating an extranet and I would like the transformation
> to be depending on the user.

Hi,

<ironical>
Extraterristical Network. Sounds great. Pls give the klingons some nice
greetings.
</ironical> :-)) (I love those hypes)

I think it is possible. But of course you have to provide different
stylesheets for the users (Groups) and use it together with

  <xsl:template match="page">

    <xsl:processing-instruction name="cocoon-process">
	type="xsp"
    </xsl:processing-instruction>

    <xsl:processing-instruction name="cocoon-process">
	type="xslt"
    </xsl:processing-instruction>

    <xsl:processing-instruction name="xml-stylesheet">
	href=<xsl:text>"</xsl:text><xsl:value-of
select="@stylesheet"/><xsl:text>"</xsl:text>
	type="text/xsl"
    </xsl:processing-instruction>


    <xsp:page>

		and so on and so on.

where @stylesheet that is a parameter to page has to be somewhat
dynamically ;-). But this is somewhat tricky.

Regards

Michael