cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <leo.su...@inspireinfrastructure.com>
Subject RE: [C2] Make the map available to selectors
Date Wed, 02 May 2001 07:51:45 GMT
> -----Original Message-----
> From: giacomo [mailto:giacomo@apache.org]
> Sent: den 1 maj 2001 21:20
> To: Cocoon Developer's List
> Subject: Re: [C2] Make the map available to selectors
>
>
>
>
> On Tue, 1 May 2001, Leo Sutic wrote:
>
> > All,
> >
> > I'd like the "map" object in the sitemap to be available to
> selectors, thus
> > allowing a selector to select depending on sitemap parameters.
>
> Couldn't you use it like:
>
>   <map:select type="whateverSelector">
>     <parameter name="map1_value" value="{value1}"/>
>     <parameter name="map2_value" value="{value2}"/>
>     <parameter name="map3_value" value="{value3}"/>
>     <map:when test=".....">
>       ...
>     </map:when>
>   </map:select>

Yes, but I don't see how the selector can get access to the parameters
since:

 - Any <parameter/> tag that is a child of a <map:select/> tag in the
sitemap is ignored by the sitemap.xsl stylesheet.

 - The selector doesn't receieve the "map" object which contains the
parameters (only the objectModel and a selector pattern), thus the
parameters given in your example would never reach the selector. I don't see
how this can be solved either with a "factory" type selector or with a
non-factory type, without changing the interface to pass along the "map"
object.

/LS

>
> Giacomo
>
> >
> >  + The objectModel is just as transient as the sitemap
> parameters, and I see
> > no difference between selecting depending on one or the other.
> >
> >  + The sitemap parameters are available to all other sitemap components.
> > (Generator, transformer, ...)
> >
> > And the argument against:
> >
> >  - This breaks the current selector interface.
> >
> > Possible ways:
> >
> >  1) Include the sitemap parameters in the call to the selector.
> >  2) Include the sitemap parameters in the object model. (Makes
> little sense,
> > as the object model is really the HTTP request object model, and not the
> > sitemap object model).
> >
> > /LS
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>


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


Mime
View raw message