cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Roebuck <stuart.roeb...@adolos.co.uk>
Subject Re: [C2][PATCH] Allow {1} terminology in pipeline parameters
Date Wed, 06 Dec 2000 10:53:29 GMT
Ross,

On Tuesday, December 5, 2000, at 09:06 PM, Ross Burton wrote:

> Stuart Roebuck wrote: 
>  
> > At the same time it may be worth removing "map:param" from this sheet as 
> > it fails to construct the param variable and results in a compile time error. 
>  
> I'm against removing map:param for two reasons: 
> 1) I first proposed it :-) 
> 2) It could prove very usefull 
>  

Sorry.

I'm not sure I fully understood your explanation, but I had presumed that the new "parameter"
tag had simply been an update to the "map:param" tag.

I was looking for the functionality to be able to pass a parameter containing the matched
URL to my XSLT sheet.  I tried "map:param" and it appeared to be producing a compile error
in the generated code.  The param object was declared but never constructed.

So I tried the "parameter" tag which goes inside the "transform" tag, like this:

    <map:match pattern="news-*.html">
        <map:generate src="data/news/news.xml" />
        <map:transform src="look/general/news_look.xslt">
            <parameter name="newsid" value="{1}" />
        </map:transform>
        <map:serialize />
    </map:match>

This successfully passed the parameter to the XSLT sheet, but the parameter it received had
the value "{1}" and not "story" as I expected for the URL "news-story.html".

Hence my patch yesterday which added that functionality.

Stuart.

** We are currently experiencing prolonged difficulties with our email **
** provider DIGIWEB and INTERLIANT.  To guarantee that your response   **
** is received, please replace "adolos.com" with "adolos.co.uk".       **

-------------------------------------------------------------------------
Stuart Roebuck                                  stuart.roebuck@adolos.com
Lead Developer                                  Mac OS X, Java, XML, etc.
ADOLOS                                             http://www.adolos.com/
Mime
View raw message