Hi,

Does the following example help?

 <map:match pattern="myprint.pdf">
   <map:match type="host" pattern="*">
     <map:act type="request">
       <map:generate src="mydata.xml"/>
       <map:transform src="myxsl.xsl">
           <map:parameter name="filePath" value="http://{../1}{context}/img"/>
       </map:transform>
     </map:act>
   </map:match>
   <map:serialize type="fo2pdf"/>
 </map:match>

Here is the "host" matcher is used to get the "host:port" (here it is {../1}).
The "request" action is used to get a context "/app-name" (here it is {context} and 
for example for default cocoon installation it's value will be "/cocoon").

PS: Used cocoon version is 2.01.

Roman

Christian Haul wrote:

> Frank Borkowsky wrote:
>
> > Hi!
> >
> > My question is: Are there any other variables like {1}, {2} and {../1}
> > ... with can be accessed in the sitemap through the bracket syntax?
>
> Actually, there are none. Not even the ones you mention. They depend on
> the use of certain sitemap components. The above are set e.g. by a
> wildcard matcher. {1} contains the first match, {2} the second &c. If
> another component is nested, e.g. an action, access to the previous
> scope is required, hence the "../" in front of the number.
>
> > Has anyone a complete list of these variables?
>
>  From the above follows that such a list cannot exist. Look at the
> javadoc of the components used. BTW sitemap.log contains a list of all
> available variables at a given time i.e. whenever a new scope is entered
> or left.
>
> > What we need is the servlet path as a parameter for the
> > xsl-tranformer. Or Is XSP the solution?
>
> Currently, an action that sets this value is the only way to go. (You could add this 
>information on a XSP as a tag, though.) Sylvain is working on making InputModules 
>(o.a.c.components.modules.input) available inside the sitemap for HEAD. When that is 
>available, you could write such a module that returns this information and use it 
>like {mymodule:servlet-path}.
>
>         Chris.
>
> --
> C h r i s t i a n       H a u l
> [EMAIL PROTECTED]
>     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to