forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ullric Oger <o...@mapsys.fr>
Subject Re: Serving stylable SVG
Date Thu, 03 Jun 2004 11:48:03 GMT
Hi,

To avoid the 'xmlns="%SVGNamespace;"' you can add the namespace to the 
svg element :

...
<svg xmlns="http://www.w3.org/2000/svg" width="8in" height="8in" 
viewBox="0 0 1 1" preserveAspectRatio="none">
...

But you may have another problem with the doctype, if the viewer doesn't 
recognize it.
In this case try to remove it.

Alessandro Evangelista wrote :

> Hi all,
>
> I have a problem serving "statically" stylable SVG images "-//W3C//DTD 
> SVG 20000303 Stylable//EN".
>
> The sitemap configuration is:
>
> <map:serializer name="svg" mime-type="image/svg+xml" 
> src="org.apache.cocoon.serialization.XMLSerializer"/>
> ....
> <map:match pattern="**.svg">
>    <map:generate src="content/xdocs/{1}.svg" />
>    <map:serialize type="svg"/>
> </map:match>
>
> This is the source SVG file:
>
> <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN"
> "http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd"> 
>
> <svg width="8in" height="8in" viewBox="0 0 1 1" 
> preserveAspectRatio="none">
> <title>SVG drawing</title>
> ...
>
> This is the resulting SVG. Please note the ** xmlns="%SVGNamespace;" 
> ** in the <svg> tag.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN" 
> "http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd"> 
>
> <svg xmlns="%SVGNamespace;" width="8in" height="8in" viewBox="0 0 1 1" 
> preserveAspectRatio="none" enableZoomAndPanControls="true" 
> contentScriptType="text/ecmascript" contentStyleType="text/css">
> <title content="structured text">SVG drawing</title>
> ....
>
> What's wrong with the configuration?
>
> Thanks a lot for your help.
>
> Alessandro
>
>
>



Mime
View raw message