cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <ross.bur...@blueyonder.co.uk>
Subject RE: [C2] Sitemap pattern matching
Date Fri, 19 Jan 2001 14:00:36 GMT
> My match pattern should accept a parameter e.g.  "newsheaders.html?article=1000" 
> 
> The parameter should then be included in the generate source. 
> 
> So the generate src should expanded to 
> "http://somewhere.com/cgi-bin/test?article=1000" 
> 
> I tried it like this, but it didn't work. Any suggestions? 
> 
> <map:match pattern="newsheaders.html"> 
>  <map:generate src="http://somewhere.com/cgi-bin/test{1}> 
>  <map:transform src="stylesheets/teliamobile/mtv3/newsheaders.html.xsl"/> 
>  <map:serialize/> 
> </map:match>

Is the input URL hardcoded?  The problem with using request parameters is that no web cache
can accurately
cache the results, slowing down web sites.  The worst example of this is when people use CGI
scripts to
format pages, but the URLs turn into this: www.foo.bar/getpage.cgi?welcome.html.  This means
that _every_
time the page is requested the server has to generate the request again, even if you have
only just visited
the page.

A better form for the above URL would be "/newsheaders/1000".  Thus the following sitemap
can be used:

<map:match pattern="/newsheaders/*"> 
 <map:generate src="http://somewhere.com/cgi-bin/test?article{1}> 
 <map:transform src="stylesheets/teliamobile/mtv3/newsheaders.html.xsl"/> 
 <map:serialize/> 
</map:match>

If you can remove the dependencies on the archaic CGI script and can wrap that functionality
into a XSP
page, this pipeline will be much faster as well.

Ross Burton

Mime
View raw message