cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: Sitemap Transformations
Date Tue, 04 Jun 2002 18:18:57 GMT
> From: Jason Foster [mailto:jafoster@uwaterloo.ca]
> 
> What is the feeling on the list regarding having a special pipeline
that is
> use to transform the sitemap before it is interpreted?
> 
> My goal is to allow for customizations to the sitemap without having
to
> create new components.  Here's my use case:
> 
> Consider a situation where an image file could exist in one or more
of:
>    - /site/images/
>    - /site/user/images/
>    - /site/user/subsite/images/
> 
> I'd like to be able to set up a single pipeline that will check these
3
> locations in turn, looking for the file.  Assuming that a new action
called
> "FileNotExistsAction" exists, the appropriate way would be:
> 
>    <map:act type="file-not-exists">
>      <map:parameter name="filename" value="{0}"/>
>      <map:parameter name="prefix" value="/site/images/"/>
>      <map:act type="file-not-exists">
>        <map:parameter name="filename" value="{../0}"/>
>        <map:parameter name="prefix" value="/site/user/images/"/>
>        <map:act type="file-not-exists">
>          <map:parameter name="filename" value="{../0}"/>
>          <map:parameter name="prefix"
value="/site/user/subsite/images/"/>
>          <map:read src="missing-image.png"/>
>        </map:act>
>        <map:read src="/site/user/subsite/images/{0}"/>
>      </map:act>
>      <map:read src="/site/user/images/{0}"/>
>    </map:act>
>    <map:read src="/site/images/{0}"/>
> 
> Actually, this won't even work.  But you get the idea.  Anyways, it
would
> be nice if I could say:
> 
>    <extension:fallback-reader>
>      <map:parameter name="filename" value="{0}"/>
>      <map:parameter name="1" value="/site/user/subsite/images/"/>
>      <map:parameter name="2" value="/site/user/images/"/>
>      <map:parameter name="999" value="/site/images/"/>
>    </extension:fallback-reader>
> 
> And then create a stylesheet that would transform my extension into
the
> nested set of actions, parameters, and readers.
> 
> Comments?  I could be completely off the mark here, and instead should
get
> off my duff and write a new reader, but that strikes me as being a
> developer-oriented solution where it isn't necessarily appropriate.

I won't comment on how it should be done... But here is good or bad news
for you: sitemap-sheets (like logicsheet for XSP) are possible in 2.0.3;
and won't be supported in 2.1 anymore.

Vadim


> Jason Foster


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


Mime
View raw message