List Info

Thread: Provide hook to override default publication pipelines?




Provide hook to override default publication pipelines?
country flaguser name
Switzerland
2007-11-20 05:52:32
Hi Lenya devs,

in a custom publication I'm facing the situation that I have
to override 
single pipelines from the default publication sitemap. Since
the 
pipelines are called using cocoon:/ (with a single slash), I
can't use 
the common pattern of mounting the default publication
sitemap at the 
end of my custom sitemap.

I think a quite convenient solution would be to mount a
custom sitemap 
at the beginning of the default publication sitemap:

     <map:pipeline>
       <map:select type="resource-exists">
         <map:when
test="{fallback:custom.xmap}">
           <map:mount
src="{fallback:custom.xmap}"
pass-through="true"/>
         </map:when>
       </map:select>
     </map:pipeline>

Maybe we can provide something like this in 2.0.1.

WDYT?

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


Re: Provide hook to override default publication pipelines?
user name
2007-11-20 10:41:39
Andreas Hartmann wrote:
> Hi Lenya devs,
> 
> in a custom publication I'm facing the situation that I
have to override 
> single pipelines from the default publication sitemap.
Since the 
> pipelines are called using cocoon:/ (with a single
slash), I can't use 
> the common pattern of mounting the default publication
sitemap at the 
> end of my custom sitemap.
> 
> I think a quite convenient solution would be to mount a
custom sitemap 
> at the beginning of the default publication sitemap:
> 
>     <map:pipeline>
>       <map:select
type="resource-exists">
>         <map:when
test="{fallback:custom.xmap}">
>           <map:mount
src="{fallback:custom.xmap}"
pass-through="true"/>
>         </map:when>
>       </map:select>
>     </map:pipeline>
> 
> Maybe we can provide something like this in 2.0.1.
> 
> WDYT?

i don't like that. cruft and bad modularization should be
cleaned up, 
not painted over with another hook or layer of indirection.
this is one 
more thing that will make lenya mysterious for newbies.

let's provide a real basic publication instead that doesn't
have so much 
cruft and can be used as a template for both the default and
any custom 
publication.

(in fact, i never use the default publication as a template
in my custom 
stuff, because i don't need all the DAV and BXE stuff that
clutters the 
default.)


-- 
Jörn Nettingsmeier

"One of my most productive days was throwing away 1000
lines of code."
   - Ken Thompson.


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


Re: Provide hook to override default publication pipelines?
user name
2007-11-21 10:41:31
Andreas Hartmann wrote:
> Jörn Nettingsmeier schrieb:
> OK, so how should this issue be addressed?
> 
>> let's provide a real basic publication instead that
doesn't have so 
>> much cruft and can be used as a template for both
the default and any 
>> custom publication.
> 
> Hmmm - how would that solve the problem that I want to
override single 
> pipelines? Or do you mean that the basic publication
should be so basic 
> that it contains virtually no pipelines which could be
worth overriding?

more or less, yes. i still think that no important
functionality should 
be embedded in the default publication sitemap. ideally, i'd
like to be 
able to create a publication directory with just a config
dir in it, and 
  all central lenya features should be there.

for now, you could just copy the default sitemap over, throw
out all 
matchers that you don't need and alter it as necessary.
eventually, a feature as you describe might be interesting,
but first we 
should clean up and get a feeling for a nice minimal set of
pipelines 
that needs to be in a publication sitemap. to me, neither
bxe nor dav 
nor rss stuff qualifies.

-- 
Jörn Nettingsmeier

"One of my most productive days was throwing away 1000
lines of code."
   - Ken Thompson.

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribelenya.apache.org
For additional commands, e-mail: dev-helplenya.apache.org


Re: Provide hook to override default publication pipelines?
country flaguser name
Spain
2007-11-21 10:44:52
ON WED, 2007-11-21 AT 17:41 +0100, JöRN NETTINGSMEIER
WROTE:
> ANDREAS HARTMANN WROTE:
> > JöRN NETTINGSMEIER SCHRIEB:
> > OK, SO HOW SHOULD THIS ISSUE BE ADDRESSED?
> > 
> >> LET'S PROVIDE A REAL BASIC PUBLICATION INSTEAD
THAT DOESN'T HAVE SO 
> >> MUCH CRUFT AND CAN BE USED AS A TEMPLATE FOR
BOTH THE DEFAULT AND ANY 
> >> CUSTOM PUBLICATION.
> > 
> > HMMM - HOW WOULD THAT SOLVE THE PROBLEM THAT I
WANT TO OVERRIDE SINGLE 
> > PIPELINES? OR DO YOU MEAN THAT THE BASIC
PUBLICATION SHOULD BE SO BASIC 
> > THAT IT CONTAINS VIRTUALLY NO PIPELINES WHICH
COULD BE WORTH OVERRIDING?
> 
> MORE OR LESS, YES. I STILL THINK THAT NO IMPORTANT
FUNCTIONALITY SHOULD 
> BE EMBEDDED IN THE DEFAULT PUBLICATION SITEMAP.
IDEALLY, I'D LIKE TO BE 
> ABLE TO CREATE A PUBLICATION DIRECTORY WITH JUST A
CONFIG DIR IN IT, AND 
>   ALL CENTRAL LENYA FEATURES SHOULD BE THERE.

WELL, I MUST DISAGREE. I HAD THE SAME PROBLEM AS ANDREAS
HAVE BACK IN
THE DAYS.

TO OVERRIDE JUST A PIPE IS MUCH MORE EFFICIENT THEN COPY ONE
THING TO
ANOTHER PLACE.

MORE IF WE TALKING ABOUT PARENT PUBLICATIONS. THE IDEA IS TO
IMPLEMENT
ALL PIPES THAT ARE NEEDED IN THE PARENT AND ALLOW CHILDREN
TO OVERRIDE
JUST A FEW OF THEM.

TO PUT IT IN JAVA TERMS THE DEFAULT PUB SHOULD BE AN
ABSTRACT CLASS AND
EVERY PUB THAT EXTENDS THE DEFAULT PUB SHOULD HAVE THE
POSSIBILITY TO
OVERRIDE SUPER.

SALU2

> 
> FOR NOW, YOU COULD JUST COPY THE DEFAULT SITEMAP OVER,
THROW OUT ALL 
> MATCHERS THAT YOU DON'T NEED AND ALTER IT AS
NECESSARY.
> EVENTUALLY, A FEATURE AS YOU DESCRIBE MIGHT BE
INTERESTING, BUT FIRST WE 
> SHOULD CLEAN UP AND GET A FEELING FOR A NICE MINIMAL
SET OF PIPELINES 
> THAT NEEDS TO BE IN A PUBLICATION SITEMAP. TO ME,
NEITHER BXE NOR DAV 
> NOR RSS STUFF QUALIFIES.
> 
-- 
THORSTEN SCHERLER                                
THORSTEN.AT.APACHE.ORG
OPEN SOURCE JAVA                      CONSULTING, TRAINING
AND SOLUTIONS


------------------------------------------------------------
---------
TO UNSUBSCRIBE, E-MAIL: DEV-UNSUBSCRIBELENYA.APACHE.ORG
FOR ADDITIONAL COMMANDS, E-MAIL: DEV-HELPLENYA.APACHE.ORG


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )