cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: C2: Relative URLs in output vs. <sitemap>
Date Tue, 18 Jul 2000 07:55:08 GMT
Stuart Roebuck wrote:
> 
> I've been looking at the <sitemap> and considering issues relating to
> Cocoon 2 based websites.  One big issue that I can't see an obvious
> solution to (but that doesn't mean there isn't one :-) ) relates to the
> <transformer> based generation of relative links to web based resources
> from pages which can be mapped into different spaces in resulting site
> hierarchy.

hmmmm...
 
> e.g. {
> 
> You create a site using Cocoon 2.

Ok, I already like this :)
 
> You put your standard image files in a subdirectory called "images".

Fair enough.
 
> You start with an index page "index.html" at the root of your site.

why? do people enter your side by typing

 http://www.yoursite.com

or they do directly

 http://www.yoursite.com/index.html

Do not underestimate the impact of such decision: using a "default file
for indexes" is a hack that Apache turned into a design patter. But it's
still a hack. A pretty big one as well!

To me, something like

 http://www.yoursite.com/index

is a much better entry point. And

 http://www.yoursite.com/index.html

will be called if the user wants to "force" you to return HTML (and only
that!) to him/her.
 
> You auto-generate standard parts of each page using a transform which,
> amongst other things, creates relative links to a background image used on
> every page.  The relative link to this image is "images/background.gif".
> 
> As the site expands, you add extra pages, including some news pages,
> generated by some files called "news/*.xml" and mapped to and called,
> "somenews.html" and "someothernews.html" (at the root directory).
> Everything works fine.

[I know this was not your point and I'm being annoyinly picky, but URI
space design is really important] 

Same as above: you should not use extentions in your URI space unless
you "really" mean it.
 
> Then you decide you need to organise things better because you've got all
> your pages mapped onto the root directory and run into potential name
> conflicts, so you change the <sitemap> and map your news pages onto
> "news/*.html".
> 
> Suddenly, all your backgrounds disappear, because the links to the
> background are added by a single XSLT transformer that doesn't know that
> the absolute address of the pages it is transforming are different.
>
> As far as I am aware, you can't do the checking you would need to fix this
> because it would use XSP which is a generator not a transformer.

Have you thought about using sitemap internal redirection capabilities?

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message