cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Duddleston" <>
Subject RE: [C2] Sitemap and Request parameters
Date Thu, 15 Jun 2000 17:48:22 GMT

I would love to see sitemap do this. Currently, my own implementation of
sitemap (no relation to C2 sitemap) does this. It finds a match, dissects
the URL and then calls the appropriate component with the parameters. It is
nothing special and to be honest, I just hacked it together, but it would be
very nice to replace this function with sitemap when I move my sites to use


> -----Original Message-----
> From: Ross Burton []
> Sent: Thursday, June 15, 2000 1:18 AM
> To: Cocoon Development
> Subject: [C2] Sitemap and Request parameters
> Hi,
> I really should get some sleeping pills - I cannot sleep at the moment and
> end up laying in bed thinking about everything...
> Suppose I am running a news web site on Cocoon 2.  Being sensible it is
> possible to access any days news by entering the correct URL, for example
> will show the news for today.
> Obviously XSP is going to be used here to retreive the data.
> At the moment, I can see this working by the XSP code breaking
> the URL down
> into components, validating it and using the individual values to build a
> query.  But why should the XSP know the URL structure?  I think it should
> just work from parameters in the request, something like this:
> (in a mix of
> sitemap languages)
> <process match="/\([0-9]\{4\}\)/\([0-9]\{2\}\)/\([0-9]\{2\}\)/">
>     <set-parameter name="year" value="$1"/>
>     <set-parameter name="month" value="$2"/>
>     <set-parameter name="day" value="$3"/>
>     <generator name="serverpages" src="/dailynews.xsp">
>     <!-- filters -->
>     <serializer type="html"/>
> </process>
> (anybody know a syntax-highlighted regexp editor!?)
> The XSP code build queries based on the values of year, month and
> day; which
> are in the Request object.  These variables are also available in the XSLT
> phase.  The regexp also handles validation of the URL - it must be
> /xxxx/xx/xx where x is 0-9.
> Is this a good idea? Or just FS?
> Ross Burton

View raw message