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: Static Params?
Date Tue, 15 Jan 2002 15:17:28 GMT
> From: Berin Loritsch [mailto:bloritsch@apache.org]
> 
> In the sitemap, is it possible to create a series of parameters that
> could be used globally?
> 
> Basically, I am thinking something like this:
> 
> <map:pipeline>
>    <map:parameter name="host-uri" value="http://www.d-haven.org"/>
> 
>    <map:match uri="paper-*/*.html">
>      <map:generate src="docs/papers/{1}/{2}.html">
>        <map:parameter name="static-uri" value="{host-uri}/paper-
> {1}/{2}.html"/>
>      </map:generate>
>      <map:serialize/>
>    </map:match>
> </map:pipeline>
> 
> Perhaps the {host-uri} might have to be like this: {../host-uri}.

Yes, perhaps. What are you asking reminds me of something there was
discussion about
(http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=100739814405987&w=2).
That's the syntax to define sitemap variables, something like (how I
imagine this):

<map:pipeline>
  <map:match uri="paper-*/*.html">
    <map:variables>
        <map:parameter name="host-uri" value="http://www.d-haven.org"/>

        <map:generate src="docs/papers/{../1}/{../2}.html">
          <map:parameter name="static-uri" value="{host-uri}/paper-
 {1}/{2}.html"/>
        </map:generate>
        <map:serialize/>
    </map: variables>
  </map:match>
</map:pipeline>

(I moved declaration of variables inside matcher to show that it's
possible to define map variables at any level)

Unfortunately, this thread was ended with decision to add
<map:parameter>s to <map:call>. So, there are two options now: resurrect
this thread or to choose one of the matchers/actions to do this for you.

Vadim



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


Mime
View raw message