cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: Context:// issue
Date Wed, 30 May 2001 03:42:32 GMT


Giacomo Pati wrote:
> 
> Quoting Donald Ball <balld@webslingerZ.com>:
> 
> > On Tue, 29 May 2001, giacomo wrote:
> >
> > > > > The context and resource protocols should match the semantics for
> > > > > file and jar:
> > > > >
> > > > > context://relative/path/from/context/root
> > > > > resource://path/to/packaged/resource
> > > >
> > > > why don't we go ahead and enumerate all of the extra protocols
> > recognized
> > > > by c2 and their semantics, and stick them in a document for
> > reference.
> > > > i'll take a stab:
> > > >
> > > > context urls point to xml resource pipelines relative to the root of
> > the
> > > > current sitemap. the same context url in two seperate sitemaps can
> > resolve
> > > > to two seperate pipelines. format: context://{path}
> > >
> > > The context protocol point into the file system and not to resource
> > > pipeline. But yes, the same context url in two seperate sitemaps can
> > > resolve to two seperate files. format: context://{path}
> >
> > and it's always relative to the location of the current sitemap's map
> > file?
> 
> Sorry, yes, it's how it should be but am not sure if the implementation respects
> this (IIRC it always resolves to the root of the servlet context). The early
> design decision was that the EntityResolver represented by the Environment
> object should take care of this but recent changes has deluted that approach.
> That's why the Environment interface has methods like setPrefix etc. to make it
> able to resolve correctly in case of sub sitemap mounts. I'm unsettle if
> I should fighting for old design decision because I don't remember exactly why
> this or that decision has been taken and it can truly be that I'm wrong today,
> so, do what you think is correct here.

If it doesn't resolve to to the root of the servlet context, then the
protocol
shouldn't be called "context".  By making things sitemap relative, you
are
diluting the concepts of the Servlet spec.  You are also increasing (IMO
unnecessarily) the learning time required to understand Cocoon.

The "context" protocol _should_ be relative to the servlet _Context_. 
Any other
approach requires a different protocol name.  I am not saying that
sitemap relative
is not a valid approach--I am saying that "context" is not a valid name
for that
approach.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message