You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Nick Entin <en...@togethersoft.com> on 2002/01/02 13:34:08 UTC

SVG Transformation

Hi! Happy New Year to everybody!

I've got a bit strange problem when attempted to process SVG with C2:
In my pipeline I have two quite simple matches:

This works fine:
         <map:match pattern="**/*.svg">
	         <map:read src="{2}.svg" mime-type="image/svg-xml"/>
	   </map:match>

This does not work at all:
	   <map:match pattern="**/*.svg.html">
	         <map:generate src="{2}.svg"/>
		   <!-- here my transformer will go -->
      	   <map:serialize type="svgxml" />
         </map:match>
Second match generates invalid XML, if to apply html serializer I could
see the following beginning of xml:
=============
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
"http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd"<!--
Common attributes to check for system capabilities. --><!-- For most
uses of URI referencing:
        standard XLink attributes other than xlink:href. --><!-- This
entity allows for at most one of desc, title and metadata,...
=============

Note that there is no closing '>' after DOCTYPE and therefore Explorer
could not visualize the XML.
I believe it's a root of problem why svgxml serializer generates
nothing...

BTW, the comments "<!-- Common attributes to check..." and others have
not been defined in SVG, they come from the DTD. Why?
When my computer is out of network, the second match does not work with
exception DTD Not Found... The first match works fine in any condition.

Any ideas how to resolve the problem?

Thanks in advance!

Best wishes,
Nick


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>