cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: [c2] still having caching problems
Date Wed, 09 May 2001 17:25:45 GMT
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.

- donald


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


Mime
View raw message