You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Franz Ruebe <fr...@hotmail.com> on 2005/06/18 12:46:53 UTC

Getting parameter in mypub/lenya/util/page2xhtml.xsl

Hi,

Me: Newbie, lenya 1.2.3, cocoon 2.1.7, tomcat 5.0.28

I'm trying to modify the look and feel of the login, logout-pages in my pub. 
So I copied page2xhtml in my pub and edited it. But I failed to pass a 
parameter to that xsl. It's impossible for me to find out, in which sitemap 
which transformer is used to create that page.

Any hint appreciated.

Thanks in advance


Franz

_________________________________________________________________
MSN Hotmail. Anmelden und gewinnen! http://www.msn.de/email/webbased/ Ihre 
Chance, eines von 10 T-Mobile MDA II zu gewinnen!


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Getting parameter in mypub/lenya/util/page2xhtml.xsl

Posted by so...@gmail.com.
On 6/18/05, Franz Ruebe <fr...@hotmail.com> wrote:
> Even if I'm not yet fully understanding the fallback-mechanism, I've added
> in these transformers my parameter, but it didn't work.
>       <!-- Lenya GUI screen -->
>       <map:match pattern="lenya-screen.xsl">
>         <map:generate src="{fallback:xslt/util/page2xhtml.xsl}"/>
>         <map:transform src="lenya/xslt/util/page2xslt.xsl">
>           <map:parameter name="contextprefix"
> value="{request:contextPath}"/>
> 
>           <map:parameter name="niceToHave" value="'But how to get'"/>
> 
>         </map:transform>
>         <map:serialize type="xml"/>
>       </map:match>
> Shouldn't that work?

To pass a variable from an XMAP to XSL, you need to specify it in the
XMAP and the XSL.
See the example at the end of:
http://solprovider.com/lenya/variables

solprovider

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Getting parameter in mypub/lenya/util/page2xhtml.xsl

Posted by Franz Ruebe <fr...@hotmail.com>.
Hi Renaud,

thanks for your answer.

>You might want to copy  lenya-1.2.x/src/webapp/lenya/xslt/ac/login.xsl
>to $yourPub/lenya/xslt/ac/
>and modify this file to your needs.

I did already, and "my-pub-login"-site works like I want. But I had to put 
in some pathes hardcoded, because I wasn't able to pass a parameter to the 
$myPub/lenya/xslt/util/page2xhtml.xsl

>That's how the fallback-mechanism works (see
>lenya-1.2.x/src/webapp/sitemap.xmap line 474 for more).

Even if I'm not yet fully understanding the fallback-mechanism, I've added 
in these transformers my parameter, but it didn't work.

      <!-- Lenya GUI screen -->
      <map:match pattern="lenya-screen.xsl">
        <map:generate src="{fallback:xslt/util/page2xhtml.xsl}"/>
        <map:transform src="lenya/xslt/util/page2xslt.xsl">
          <map:parameter name="contextprefix" 
value="{request:contextPath}"/>

          <map:parameter name="niceToHave" value="'But how to get'"/>

        </map:transform>
        <map:serialize type="xml"/>
      </map:match>

Shouldn't that work?

Thanks in advance...

Franz

_________________________________________________________________
So einfach geht das. MSN Toolbar mit Pop-up-Blocker. http://toolbar.msn.de/ 
Jetzt kostenlos downloaden und gut ist!


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org


Re: Getting parameter in mypub/lenya/util/page2xhtml.xsl

Posted by Renaud Richardet <re...@gmail.com>.
Hi Frank

> I'm trying to modify the look and feel of the login, logout-pages in my pub.
> So I copied page2xhtml in my pub and edited it. But I failed to pass a
> parameter to that xsl. It's impossible for me to find out, in which sitemap
> which transformer is used to create that page.

You might want to copy  lenya-1.2.x/src/webapp/lenya/xslt/ac/login.xsl
to $yourPub/lenya/xslt/ac/ 
and modify this file to your needs.

That's how the fallback-mechanism works (see
lenya-1.2.x/src/webapp/sitemap.xmap line 474 for more).

HTH,
Renaud

-- 
Renaud Richardet
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
renaud.richardet@wyona.com                   http://www.wyona.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org