cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject Re: [c2] still having caching problems
Date Wed, 09 May 2001 18:34:54 GMT


On Wed, 9 May 2001, Donald Ball wrote:

> On Wed, 9 May 2001, Jeremy Quinn wrote:
>
> > At 3:30 PM -0400 8/5/01, Donald Ball wrote:
> > >    <map:act type="resource-exists">
> > >     <parameter name="url" value="context://style/{1}.xsl"/>
> > >     <map:transform src="style/{../1}.xsl"/>
> > >    </map:act>
> >
> > Sorry if this is off-topic and I'm being real dumb .... but could someone
> > explain what this bit does?
> >
> > OK, so it applies a stylesheet if it exists, but I do not understand the
> > contents of these two attributes:
> >
> > 	value="context://style/{1}.xsl"
> > 	src="style/{../1}.xsl"
> >
> > Why is there "{1}" in one and "{../1}" in the other?
>
> the parameter element exists in the variable context of its parent, while
> the map:transform element has its own unique variable context. the ../
> prefix shifts the context up a level. i admit, it looks pretty silly, but
> it gets the job done. although i'm tossing around the idea of adding an
> attribute to the trax transformer:
>
> <map:transform src="style/{1}.xsl" optional="true"/>
>
> it's a thought.

And whats the semantic of the "optional" attribute?

Giacomo


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


Mime
View raw message