cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Alin" <>
Subject Using dynamic SVG with FOP
Date Tue, 10 Jun 2003 13:52:34 GMT
Hi All!!

We are currently building a reporting application featuring PDF
generation with FOP. Within the FOP we call a url generating a jpeg
image by transforming a XML into a SVG and by serializing this into a
jpeg. This works perfectly for static jpegs but by the start of the jpeg
matcher the application does not seem to have a session and therefore no
XML can be generated (we user readDOMSession transformers). This
ofcourse works perfectly when calling the jpeg pipeline stand alone but
it does not work when calling it from inside the XSLT stylesheet
generating the FOP.

Any ideas how to solve this???

The calling code and the jpeg matcher is attached below!! 

Best regards, Markus

<!-- Calling code -->
<!-- SVG Products JPG -->
<xsl:variable name="hostname" select="//serverinfo/hostname"/>
<xsl:variable name="port" select="//serverinfo/port"/>
<xsl:variable name="rootmount" select="//serverinfo/rootmount"/>
<xsl:variable name="base_url"
<fo:block text-align="start" line-height="11px" font-size="9px"
font-family="Arial, sans-serif" color="#000000" font-weight="bold">
src="{$base_url}advisory/allocation/alloc_products.jpg" width="80mm"

	<!-- Sitemap matcher -->
      <map:match pattern="**/allocation/*.jpg">
        <map:act type="set-header">
          <map:parameter name="Pragma" value="no-cache"/>
          <map:parameter name="Cache-Control" value="no-cache"/>
          <map:parameter name="Expires" value="-1"/>
          <map:parameter name="Last-Modified" value="Thu, 25 Apr 1997
18:40:00 GMT"/>
        <!--<map:generate src="resources/xml/empty.xml"/>-->
        <map:generate src="cocoon://datasources/viewsession2.xsp"/>
        <map:transform type="readDOMsession" label="debug1">
          <map:parameter name="dom-name" value="allocRecord"/>
          <map:parameter name="trigger-element"
          <map:parameter name="position" value="in"/>
        <map:transform type="readDOMsession" label="debug2">
          <map:parameter name="dom-name" value="Result"/>
          <map:parameter name="trigger-element" value="page"/>
          <map:parameter name="position" value="in"/>
        <map:transform type="readDOMsession" label="debug3">
          <map:parameter name="dom-name" value="rdata"/>
          <map:parameter name="trigger-element" value="page"/>
          <map:parameter name="position" value="in"/>
        <map:transform type="CSSSVGTransformer" label="debug5">
            <map:parameter name="css-url"
        <map:serialize type="svg2jpeg"/>

Markus Alin         tel: +41 1 455 70 03
Swissrisk AG        fax: +41 1 455 70 01
Räffelstrasse 32
8045 Zürich

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message