You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Lionel Crine <cr...@4dconcept.fr> on 2003/03/17 12:19:58 UTC

Get a sitemap parameter for an xsl page

Is it possible to get a sitemap parameter and using it into an xsl page.
Here is my pipeline:

<map:match pattern="search">
   <map:generate type="Request"/>
   <map:transform type="Query">
      <map:parameter name="interval" value="50"/>
   </map:transform>
   <map:transform type="xslt" src="proto/xsl/documents.xsl"/>
   <map:serialize/>
</map:match>

I want to use the parameter interval in the xslt transformation. But I 
don't want to declare it again into the xslt transformer.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Get a sitemap parameter for an xsl page

Posted by Yves Vindevogel <yv...@implements.be>.
You can't do that ... (In my humble opinion)

Unless ... you declare it in an XML file, and use the aggregation (or include) 
with that file in each pipeline.
Or, you can use the "document()" function in XSL to read the content of that 
single XML file, to avoid the aggregation.

> I think there is a confusion.
>
> I only want to use a parameter which have the same value in all the
> pipelines without declare it in each pipeline.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

-- 
Met vriendelijke groeten,
Kind regards,
Bien à vous,

Yves Vindevogel

Implements
Kempische Steenweg 206  --  3500 Hasselt  --  Belgium
Phone/Fax: +32 (11) 43.55.76  --  Mobile: +32 (478) 80.82.91
Mail: yves.vindevogel@implements.be  --  www.implements.be

Quote: The winner never says participating is more important than winning.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Get a sitemap parameter for an xsl page

Posted by Lionel Crine <cr...@4dconcept.fr>.
I think there is a confusion.

I only want to use a parameter which have the same value in all the 
pipelines without declare it in each pipeline.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Get a sitemap parameter for an xsl page

Posted by Yves Vindevogel <yv...@implements.be>.
You don't have to declare it again.

This is an extract of my sitemap.  Notice the parameter "relpath".
                        <map:match pattern="xsp/*/*.html">
				<map:generate src="xsp/{1}/{2}.xsp" type="xsp"/>
				<map:transform src="xsl/html.xmlpage.xsl">
                                	<map:parameter name="relpath" 
value="./../.."/>
                                </map:transform>
                                <map:serialize/>
                        </map:match>


This is the XSL (relevant part).  Notice the declaration of the parameter on 
top, and it's use in the code.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>

	<xsl:param name="relpath"/>

	<xsl:template match="/xml/layout">
		<html>
		        <head>
		                <link type="text/css" rel="stylesheet">
                                	<xsl:attribute name="href"><xsl:value-of 
select="$relpath"/>/css/general.css</xsl:attribute>
                                </link>

		        </head>

		        <body>
		        </body>
		</html>
	</xsl:template>

</xsl:stylesheet>


> I don't do that because I want my sitemap to choose the value of the
> parameter.
>
> I read some messages and it seems that's it's not possible to use global
> parameters in the sitemap with cocoon 2.0.4.
>
> At 13:48 17/03/2003 +0100, you wrote:
> >Why don't you want to declare it in the XSL ?
> >Otherwise, it's very simple: <xsl:param name="yourname"/>
> >and you can use it as <xsl:value-of select="$yourname"/>
> >
> > > Is it possible to get a sitemap parameter and using it into an xsl
> > > page. Here is my pipeline:
> > >
> > > <map:match pattern="search">
> > >    <map:generate type="Request"/>
> > >    <map:transform type="Query">
> > >       <map:parameter name="interval" value="50"/>
> > >    </map:transform>
> > >    <map:transform type="xslt" src="proto/xsl/documents.xsl"/>
> > >    <map:serialize/>
> > > </map:match>
> > >
> > > I want to use the parameter interval in the xslt transformation. But I
> > > don't want to declare it again into the xslt transformer.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
> >--
> >Met vriendelijke groeten,
> >Kind regards,
> >Bien à vous,
> >
> >Yves Vindevogel
> >
> >Implements
> >Kempische Steenweg 206  --  3500 Hasselt  --  Belgium
> >Phone/Fax: +32 (11) 43.55.76  --  Mobile: +32 (478) 80.82.91
> >Mail: yves.vindevogel@implements.be  --  www.implements.be
> >
> >Quote: The winner never says participating is more important than winning.

-- 
Met vriendelijke groeten,
Kind regards,
Bien à vous,

Yves Vindevogel

Implements
Kempische Steenweg 206  --  3500 Hasselt  --  Belgium
Phone/Fax: +32 (11) 43.55.76  --  Mobile: +32 (478) 80.82.91
Mail: yves.vindevogel@implements.be  --  www.implements.be

Quote: The winner never says participating is more important than winning.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org