cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel P W Pitt <jp...@student.canterbury.ac.nz>
Subject Transformation not working
Date Mon, 22 Sep 2003 01:17:49 GMT
Hi all,

I'm having some frustrating problems in my web application.

I have a pipeline to create a geographical map, with a match as shown:

<map:match pattern="map.xsp">
        <map:generate src="documents/map.xsp" type="serverpages"/>
        <map:transform type="JPath"/>
        <map:transform type="WFSmap">
            <map:parameter name="wfs-server" 
value="http://linux1:8080/geoserver"/>
            <map:parameter name="colour-index" value="true"/>
        </map:transform>
        <!-- change transform to cocoon:/gmltosvg.xsl for dynamic xsl 
creation-->
        <map:transform type="xalan" src="cocoon:/gmltosvg.xsl"/>

        <map:serialize type="svg2png"/>
        <!--<map:serialize type="xml"/>-->

</map:match>

It is called from a flowscript method, and should display a png map of 
points.
WFSmap is a custom transformer of mine that retrieves an XML file of map
locations. cocoon:/gmltosvg.xsl is a xsl that is created by another 
transformer
in the following match:

<!-- Dynamic gmltosvg xsl creator -->
<map:match pattern="gmltosvg.xsl">
        <map:generate 
src="http://linux1:8080/geoserver/DescribeFeatureType?"/>
        <map:transform type="xalan" src="transforms/schematoxsl.xsl"/>
        <map:transform type="xinclude"/>
        <map:serialize type="xml"/>
</map:match>

Now, the problem is, that the image is always blank when called using the
first match. Now, you might question that it is a problem somewhere in 
my xsl
or transformer, and I certainly did at first. However, when I skip the 
svg part and
just display the xml, as shown:

<map:match pattern="map.xsp">
        <map:generate src="documents/map.xsp" type="serverpages"/>
        <map:transform type="JPath"/>
        <map:transform type="WFSmap">
            <map:parameter name="wfs-server" 
value="http://linux1:8080/geoserver"/>
            <map:parameter name="colour-index" value="true"/>
        </map:transform>

       <map:serialize type="xml"/>

</map:match>

... then the produced xml is exactly what I expect. I then saved this as 
an xml file
(map.png.xml) and tried applying the removed transformations:

<map:match pattern="map2.png">
    <map:generate src="map.png.xml"/>
    <map:transform type="xalan" src="cocoon:/gmltosvg.xsl"/>
    <map:serialize  type="svg2png"/>
</map:match>

Now, this gives me the png of the map exactly as I want it. But why 
doesn't it
work in the very first match I tried above?

Am I doing something wrong or is this a cocoon bug?
I've tried making the pipeline noncaching in case that was the problem 
(since
the initially displayed map is meant to be blank, and the user selects what
features to display). Maybe it is something to do with having an XSLT 
produced
by another XSLT?

Any insights appreciated, because I truly am stuck otherwise.

Thanks,
Joel



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


Mime
View raw message