cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <>
Subject Re: Relative Stylesheet URIs not fixed?
Date Sun, 07 May 2000 10:49:24 GMT
Uli Mayring wrote:
> "X-Ncc-RegID: de.denic"
> MIME-Version: 1.0
> X-MIMETrack: Itemize by SMTP Server on notes/Denic(Version 5.0.2c (Intl)|08 Februar 2000)
>  07.05.2000 02:12:36,
>         Serialize by Router on notes/Denic(Version 5.0.2c (Intl)|08 Februar 2000) at
>  07.05.2000 02:13:01,
>         Serialize complete at 07.05.2000 02:13:01
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> X-Spam-Rating: 1.6.2 0/1000/N
> On Sat, 6 May 2000, Stefano Mazzocchi wrote:
> > It makes sense. Here's the plan:
> >
> >  - if the URI is fully specified, it's opened as it is
> >  - if the URI is only a fragment, it's treated like relative to the
> > requested resource.
> >
> > is this ok with everyone?
> This sounds clever, but I don't quite understand it :-)
> My suggestion:
> 1) URI fully specified ==> take it like it is


> 2) URI not fully specified and starts with a "/" ==> determine server name
> and port, append URI

hmmm, no, it would be slower and remove caching possibilities for
Servlet 2.2 containers. The code I just added takes care of the
functionality anyway. The result you wanted is the same.

> 3) URI not fully specified, but does not start with a "/" ==> append URI
> to the URI of the XML file minus the filename


> 4) Any of the above, plus a fragment identifier ==> do like above, but
> read from resulting URI resource only the part specified by the fragment
> identifier.

well, it's usefulness/complexity ratio is way too low for my taste.

> 5) URI just a fragment identifier ==> what the hell is this good for? A
> Stylesheet embedded in an XML file? Let's leave it out until we see the
> merits of this particular nonsense.

:) totally agreed.
> > NOTE: it could possibly break back compatibility!!!!
> Well, sorry for being a wise guy, but do we want to be compatible to
> something that is broken? ;-)  We are not Microsoft, are we? :)

Not at all, this was not a -1, but a "careful ahead".

Look, people complain because they install a jar over the other. I would
not imagine if their pages were not able to see all of their
stylesheets! I'll forward all the "I have a FileNotFoundException when
accessing a stylesheet" to you, ok? ;-)

> That being said I will tell you why this bug bugs me so much:
> Suppose our webserver is called and suppose my local
> development machine is called - all very hypothetical, but
> let's assume it would be like this :)
> Furthermore, let's assume our test webserver would be called
> So now I develop a web site with cocoon on my local machine. When the
> pages work right I copy them to the test webserver. When they work there I
> copy them to the production webserver.
> So, my XML file on my local machine will call for a stylesheet with
> "". Once I copy that over to
> the test webserver I have to change it to
> "" and when I copy it to the
> production webserver I have to change it again. So the clever alternative
> would be to specify the stylesheet like "/some/path/style.xsl" and it
> would work everywhere.

This works in 1.7.4-dev today, at least on JServ and on my machine.
Feedback welcome.
> With the current scheme of things when I say "/some/path/style.xsl" this
> is always taken to mean an absolute filesystem path and thus doesn't work,
> because the filesystem on my local machine is different than the
> filesystems of the two other webservers.

Right. This is why I agree to add this patch, it makes total sense.
> Also, it should not be possible to leave the document root. Everything on
> a publically accessible web page should refer to URIs, not files (which
> could theoretically be outside the document root of the webserver).
> Ok, now you know why this bugs me so much and why I'm eagerly awaiting
> cocoon 1.7.4 ;-)
> In my mind cocoon 1.7.5 should be right after that and have XMLForm
> integrated ;-)

Slow down, kid, if you really want that, switch list and come and help
us directly :)
> Sometimes working with OpenSource tools and a great developer team is like
> christmas - I can make many wishes and there's actually someone there, who
> is interested to hear them.

Just call me "Santa" :)

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

View raw message