cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oscar Picasso <oscgoo...@yahoo.com>
Subject Global variable/parameter in sitemap
Date Thu, 08 Jan 2004 14:10:28 GMT
Hi,

I would like to use some kind of global variable in my pipelines but don't
figure out how to do that.

Let assume you have something like this:

<map:pipeline>

 <map:match pattern="rela/**">
  <map:act type="valid-path-action" 
	   src="docs/toc.xml">
   <map:select 
	type="parameter">
    <map:parameter 
	name="parameter-selector-test" 
	value="{best-matching-path}"/>
    <map:when test="{../0}">
     <map:aggregate element="site" >
      <map:part src="cocoon:/{../0}/internal/path-steps-factory"/>
      <map:part src="docs/toc.xml"/>
     </map:aggregate>
     <map:transform src="structure.xsl"/>
     <map:serialize type="xml"/>
    </map:when>
    <map:otherwise>
         <!-- this one should be global -->              
         <!--           |               -->
         <!--           V               -->
     <map:redirect-to   
	   uri="{absolute-base-url}/{best-matching-path}"/>
    </map:otherwise>
   </map:select>
  </map:act>
 </map:match>

</map:pipeline>


I have tried to declare 'absolute-base-url' like this:

 <map:pipelines>
 <map:component-configurations>
  <global-variables>
    <absolute-base-url>
     http://my-host/cocoon/company
    </absolute-base-url>
  </global-variables>
 </map:component-configurations>
 ....

or like this:

<map:sitemap 
	xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 <map:parameter 
	name="absolute-base-url" 
	value="http://my-host/cocoon/company"/>
 ...


But so far, nothing has worked.

Any idea?

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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


Mime
View raw message