You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Matthias Brunner <mb...@gmx.net> on 2003/05/03 16:01:38 UTC
Readable URLs
Hello,
is there a way to make URLs more readable?
For example, instead of
"http://server/cocoon/db/speeches?id=32&release_id=232" I would like
to have something like
"http://server/cocoon/db/speeches_2003-04-07.pdf". This has the
advantage that the user is presented with a reasonable filename when
he tries to save the file locally.
I could imagine that there are some sitemap directives to convert
portions of the filename to request parameters. Is this possible?
Best regards,
Matthias Brunner
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: Readable URLs
Posted by Luca Morandini <lu...@tin.it>.
Matthias Brunner wrote:
> Hello,
>
> is there a way to make URLs more readable?
> For example, instead of
> "http://server/cocoon/db/speeches?id=32&release_id=232" I would like
> to have something like
> "http://server/cocoon/db/speeches_2003-04-07.pdf". This has the
> advantage that the user is presented with a reasonable filename when
> he tries to save the file locally.
>
> I could imagine that there are some sitemap directives to convert
> portions of the filename to request parameters. Is this possible?
>
not in my knowledge.
The good news is that, IMHO, you don't need them: converting URI
portions to sitemap variables and passing them along your pipeline
should be enough, something like:
<map:match name="wildcard" pattern="sp-*.xml">
<map:generate src="documents/sp/{1}.xml"/>
<map:transform src="stylesheets/general/gp.xsl"/>
<map:serialize type="xml"/>
</map:match>
Regards,
------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
http://space.virgilio.it/kumora/index.html
------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org