cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Hunsberger <>
Subject Re: [RT] composition vs. inheritance in blocks
Date Thu, 31 Mar 2005 17:04:13 GMT
On Thu, 31 Mar 2005 18:03:40 +0200, Reinhard Poetz <> wrote:
> Peter Hunsberger wrote:
> > On Thu, 31 Mar 2005 17:42:38 +0200, Reinhard Poetz <> wrote:
> >
> >>Peter Hunsberger wrote:
> >>
> >>
> >>>One comment: I'd hope that you don't literally copy the
> >>>"portal-page.xsl" and modify it?  Instead you should be creating a new
> >>>XSL, including "portal-page.xsl" in it and just modifying the
> >>>templates that you  wish to override...
> >>
> >>yes, <xsl:import href="blocks://portal-skin/portal-page.xsl"/> should do
> >
> >
> > Personally, I'd use <xsl:include href="..."/> most of the time, but
> > either way, it's interesting to note that the Cocoon resolver has to
> > get involved in resolving the reference, which means the resultant XSL
> > isn't portable....
> true, but what's the alternative?

You need to allow the referencing block to add an indication that the
the block resolver is to be used to resolve certain URL's. Eg:

<block ...

then any reference starting with the given path would use the block
resolver to resolve to the given block.  That could probably work with
relative URL's also, but the whole idea makes me a little nervous:
you'd get cases where people want to use regex or something to do the
matches or add filters to make exceptions and you'd end up reinventing
mod-redirect or some such thing.

Peter Hunsberger

View raw message