cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject Re: Changing XSP taglib namespace configuration behavior
Date Mon, 07 Feb 2000 03:17:25 GMT
On Sat, 5 Feb 2000, Stefano Mazzocchi wrote:

> > hmm. i'm not 100% sure i understand the desired constraints here. I think
> > what you're saying is that you want me to come up with a solution that
> > lets you map namespace URIs to .xsp files without using the resource://
> > URL? No wait, that doesn't make sense. What exactly do is the problem
> > we're trying to solve?
> Avoid the need for special URLHandlers since they limit both portability
> and operation.

So why not have an internal URLResolver class or something like that that
checks the protocol of URLs; if they're in the standard batch supported by
the lowest common denominator of JVMs (that is to say, http, ftp, and
file), just use URLHandler, otherwise use a CocoonURLHandler.

> > Hmm. that's much nicer. The rest of the the configuration file can be
> > rewritten as XML similarly. Anyone have any significant objections and/or
> > suggestions for rewriting cocoon's properties file in XML? 
> I had this in plan for 2.0 but if you want to do it sooner, I'm ok for
> it.

I altered the cocoon Configurations object to not subclass Properties and
wrote a subclass of Configurations called XMLConfigurations that should
construct a Configurations object from an XML document. Untested so far,
but it compiles. I'll try to test it shortly.

> Ok, what about (having XML-based configs)
>  <processor name="xsp">
>   <library>
>    <language name="java"
>     <namespace uri="">
>      <resource location="classpath"
>       path="org/apache/cocoon/processor/xsp/library/java/request.xsl"
>      />
>     </namespace>
>     <namespace uri="http://myownstuff">
>      <resource location="file"
>       path="/home/mystuff/lib/mystuff.xsl"
>      </resource>
>     </namespace>
>    </language>
>   </library>
>  </processor>
> Hmmm, maybe too verbose... any comment?

Naw, looks pretty good to me. Maybe:

<resource protocol="classpath" path="org.apache.cocoon..."/>
<resource uri="file:///home/myseuff/lib/mystuff.xsl"/>

So you either have (uri) or (protocol,path,???). URIs get passed to
URLFactory, others get passed to CocoonURLHandlers.

Sure, it's verbose, but XML is pretty verbose.

- donald

View raw message