cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Hall" <>
Subject SVG to JPEG
Date Sat, 09 Feb 2002 02:00:40 GMT
Hi all,
I am trying to generate a JPEG image from SVG.  I can get this to work if I
generate the source SVG, save it to disk and then put the source file
through the svgtojpeg serializer.  In other words, it appears that the
svgtojpeg serialzer will work in this instance.

The problem is that in real life, the source for the SVG is being
dynamically generated, so reading the source from disk can't happen.  The
pipeline I use to do this looks something like this:
 <map:match pattern="test/jpeg/*.svg">
  <map:act type="graphing">
     <map:parameter name="descriptor"

       <map:generate type="serverpages"
     <map:serialize type="svg2jpeg"/>

In the above scenario, the graphing action gets the data from the database
and puts it into an object.  The information in that object is then
translated into XML by an xsp.  That XML is then converted into SVG by an
XSL sheet which is fed through the svgtojpeg serializer.

The error seems to occur during the streaming from generator to transformer
to serializer.
The snippet below is the result of my debugging to System.out from the XSP
page and the Exception's output.

<openGraphSet2> org.w3c.dom.DOMException: The current node (type: 9, name:
#document) do not allow children of the given type (type: 3, name: #text)

The interesting thing is that the Exception is nested in my debugging code.
It seems like something is expecting a complete event stream and gagging as
a result of not getting it...which would explain why the static SVG source
works but not the dynamic.

Any suggestions?

Thanks in advance.

Colin Hall
The Level

Please check that your question has not already been answered in the
FAQ before posting. <>

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

View raw message