You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Per Kreipke <pe...@onclave.com> on 2000/10/19 20:39:01 UTC

RE: Accesing environment variables from a XSL in Cocoon/Tomcat

The 'request' taglib is in (replace $COCOON_DIR with the proper path):

$COCOON_DIR/src/org/apache/cocoon/processor/xsp/library/java/request.xsl

and the corresponding Java class is in:

$COCOON_DIR/src/org/apache/cocoon/processor/xsp/library/XSPRequestLibrary.ja
va

Per

> -----Original Message-----
> From: Juan J. Merelo [mailto:jj.merelo@civista.com]
> Sent: Friday, October 20, 2000 4:50 AM
> To: cocoon-users@xml.apache.org
> Subject: Accesing environment variables from a XSL in Cocoon/Tomcat
>
>
> Hi,
>     I would like to access stuff from the environment from a XSL, which is
> being called from a XML file and processed using Cocoon from
> within Tomcat.
> Is it possible to access environment variables such as
> QUERY_STRING, or the
> URL from which the XML is being requested? I know that, from an XSL, I can
> access variables in the QUERY_STRING declaring params at the beginning of
> the XSL file.
>
>     Maybe I need an XSP to do this, but, if so, where's the complete
> reference for the request object?
>
>     Thanks!
>
> J
>
> Name: Juan J. Merelo
> Title: Consultant
> Civista
> Telephone:   +44 (0) 20 84086.....
> Mobile:        +34 627 397239
> Facsimile:    +44 (0) 20 84086399
> Email:jj.merelo@civista.com
> http://www.civista.com
>
> Services and Applications for a Wireless World
> This e-mail and the information that it contains may be confidential and
> protected by law and is for access by the intended recipient only. Any
> liability (in negligence or otherwise) arising from any third
> party acting,
> or refraining from acting, on any information contained in this e-mail is
> hereby excluded. If you are not the intended recipient, please notify the
> sender immediately and do not disclose the contents to any other
> person, use
> it for any purpose, or store or copy the information in any medium.
> Copyright in this e-mail and any attachments belongs to Civista Limited
> and/or its subsidiary companies.
> While this message is virus checked, Civista can not be held
> responsible for
> its integrity.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>


RE: Accesing environment variables from a XSL in Cocoon/Tomcat

Posted by Per Kreipke <pe...@onclave.com>.
Juan,

See below.

> > The 'request' taglib is in (replace $COCOON_DIR with the proper path):
> >
> > $COCOON_DIR/src/org/apache/cocoon/processor/xsp/library/java/request.xsl
> >
> > and the corresponding Java class is in:
> >
> >
> $COCOON_DIR/src/org/apache/cocoon/processor/xsp/library/XSPRequest
> Library.ja
> > va
>
> Great. Now the question is: what's the URL for that namespace?
> That is, what
> should I include in
>
> <xsl:stylesheet version="1.0"
>         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>         xmlns:request=????>

It should be:
	xmlns:request="http://www.apache.org/1999/XSP/Request"

[Note: search the cocoon samples for examples if you need other URIs]

> I have seen other taglibs use http://www.apache.org/ whatever, but what's
> the URL for this? Or it's not important?

It is important. It's not a URL (e.g. there's nothing there if you try to
open it in a browser), it's a URI (e.g. a symbolic, unique name for the
thing). And the URI is used as an internal key for Cocoon to find the
resource.

As I understand it,
Per.


Re: Accesing environment variables from a XSL in Cocoon/Tomcat

Posted by ma...@home.se.
> > The 'request' taglib is in (replace $COCOON_DIR with the proper path):
> >
> > $COCOON_DIR/src/org/apache/cocoon/processor/xsp/library/java/request.xsl
> >
> > and the corresponding Java class is in:
> >
> >
> $COCOON_DIR/src/org/apache/cocoon/processor/xsp/library/XSPRequestLibrary.ja
> > va
> 
> Great. Now the question is: what's the URL for that namespace? That is, what
> should I include in
> 
> <xsl:stylesheet version="1.0"
>         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>         xmlns:request=????>
> 
> ???
> 
> I have seen other taglibs use http://www.apache.org/ whatever, but what's
> the URL for this? Or it's not important?

I'm using the following value as found in the samples that comes with
cocoon. As you see I also use the esql and session taglibs.

<xsp:page
  language="java"
  xmlns:esql="http://apache.org/cocoon/SQL/v2"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:request="http://www.apache.org/1999/XSP/Request"
  xmlns:session="http://www.apache.org/1999/XSP/Session"
>

-Magnus




Re: Accesing environment variables from a XSL in Cocoon/Tomcat

Posted by "Juan J. Merelo" <jj...@civista.com>.
----- Original Message -----
From: "Per Kreipke" <pe...@onclave.com>
To: <co...@xml.apache.org>
Sent: Thursday, October 19, 2000 6:39 AM
Subject: RE: Accesing environment variables from a XSL in Cocoon/Tomcat


> The 'request' taglib is in (replace $COCOON_DIR with the proper path):
>
> $COCOON_DIR/src/org/apache/cocoon/processor/xsp/library/java/request.xsl
>
> and the corresponding Java class is in:
>
>
$COCOON_DIR/src/org/apache/cocoon/processor/xsp/library/XSPRequestLibrary.ja
> va

Great. Now the question is: what's the URL for that namespace? That is, what
should I include in

<xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:request=????>

???

I have seen other taglibs use http://www.apache.org/ whatever, but what's
the URL for this? Or it's not important?

J