cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Omar Adobati" <omar.adob...@gmail.com>
Subject Re: PDF: external-graphic & absolute pat
Date Fri, 21 Jul 2006 10:03:05 GMT
> > I worked around that by passing in the host/port/context (read from the
> > request object) as a parameter to the XSL transformation.  You could do
> much
> > the same with Cocoon using something like
> > <map:transform type="xsl" src="whatever.xsl">
> >    <map:parameter name="baseUrl"
> >
> value="http://{request:serverName}:{request:serverPort}{request:contextPath}"/>
> > in your sitemap and
> > <xsl:param name="baseUrl"/>
> > ...
> > <fo:external-graphic
> src="{$baseUrl}/images/my_logo.png"/>
> > in the XSLT stylesheet.  This avoids having to hard code the server in
> your
> > XSL.

I tried to do this into my sitemap.xmap

    <map:match pattern="*.jpg">
      <map:parameter name="baseUrl"
value="http://{request:serverName}:{request:serverPort}{request:contextPath}"/>
      <map:read mime-type="image/jpg" src="img/{1}.jpg"/>
    </map:match>

and I tried to put it also here:

<map:match pattern="*.html">	  	
   	  <map:generate src="xml/{1}.xml"/>
	  <map:transform src="xsl/xml2html.xsl"/>
	  <map:serialize type="html"/>		
	</map:match>

but seems that baseUrl is a blank string... so it doesn't work for me...
could you suggest me why?
IT could depends by the fact that I'm actually running cocoon in Tomcat?

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


Mime
View raw message