cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "warrell harries" <warrell.harr...@googlemail.com>
Subject Re: URL translations/rewriting
Date Thu, 30 Aug 2007 14:59:13 GMT
Can you use the {request-param:lon1} input module?

e.g.
<redirect-touri="cocoon:/stops?lat1={request-param:lat1}&amp;lon1={request-param:lon1}&amp;lat2={request-param:lat2}&amp;lon2={request-param:lon2}"/>


On 30/08/2007, Ken Gerrard <ken.gerrard@gmail.com> wrote:
>
> Hello. I've been using Cocoon for a few years and I love it! I'm using
> 2.1.10 on Windows, MacOS X, and SuSE linux.
>
> A web services interface has been written at my work, a public transit
> provider. I find some of the URLs distasteful (queries when they
> should be resources) and would like to create aliases on top of them
> that translate invisibly to the underlying URLs.
>
> For instance:
>
> /stops/10064/schedule
> |
> -> /schedules?stopNumber=10064
>
> /stops/(49.856,-97.149),(49.870,-97.112)
> |
> -> /stops?lat1=49.856&lon1=-97.149&lat2=49.870&lon2=-97.112
>
> I have tried to solve this several ways. The first attempt, for the
> second URL, looked like this:
>                 <match pattern="stops/(*,*),(*,*)">
>                         <redirect-to
> uri="cocoon:/stops?lat1={1}&amp;lon1={2}&amp;lat2={3}&amp;lon2={4}"/>
>                 </match>
>
> That didn't work; the URL parameters don't seem to survive into the
> cocoon protocol.
>
> I've also tried CInclude, but since that uses the same cocoon
> protocol, it doesn't work either.
>
> It works with http://, of course, but that requires me to know the
> host I'm on and the directory I'm in.
>
> I've poked around in the CInclude transformer. Might I have to do
> something with the SourceResolver? It accepts parameters, but the
> SitemapSource that comes out never has them.
>
> I hope this question hasn't been asked. I searched various places, but
> the term "URL rewriting" has a different meaning than I expect.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Mime
View raw message