Skip to main content
I am an SVG file from FME 2015.1. I have some minor issues.

 

 

The <!ATTLIST array causes chome and other programs I have that read SVG to have fits. I have to manually delete that. Any way around this?

 

 

Also it would be nice to be alble to set the stroke color and width from FME. Any suggestions:

 

 

See below:

 

  
 <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-flat.dtd" f <!ATTLIST g xmlns:fme CDATA #FIXED "http://www.safe.com/fme" > <!ATTLIST path fme:access CDATA #IMPLIED fme:visible CDATA #IMPLIED fme:type CDATA #IMPLIED fme:nd{}.ref CDATA #IMPLIED fme:tag{}.v CDATA #IMPLIED fme:timestamp CDATA #IMPLIED fme:user CDATA #IMPLIED fme:id CDATA #IMPLIED fme:version CDATA #IMPLIED fme:tag{}.k CDATA #IMPLIED fme:created_by CDATA #IMPLIED fme:lane_boundary_type CDATA #IMPLIED fme:changeset CDATA #IMPLIED fme:area CDATA #IMPLIED fme:layer CDATA #IMPLIED fme:uid CDATA #IMPLIED > <!ATTLIST ellipse fme:access CDATA #IMPLIED fme:visible CDATA #IMPLIED fme:type CDATA #IMPLIED fme:nd{}.ref CDATA #IMPLIED fme:tag{}.v CDATA #IMPLIED fme:timestamp CDATA #IMPLIED fme:user CDATA #IMPLIED fme:id CDATA #IMPLIED fme:version CDATA #IMPLIED fme:tag{}.k CDATA #IMPLIED fme:created_by CDATA #IMPLIED fme:lane_boundary_type CDATA #IMPLIED fme:changeset CDATA #IMPLIED fme:area CDATA #IMPLIED fme:layer CDATA #IMPLIED fme:uid CDATA #IMPLIED > <!ATTLIST text fme:access CDATA #IMPLIED fme:visible CDATA #IMPLIED fme:type CDATA #IMPLIED fme:nd{}.ref CDATA #IMPLIED fme:tag{}.v CDATA #IMPLIED fme:timestamp CDATA #IMPLIED fme:user CDATA #IMPLIED fme:id CDATA #IMPLIED fme:version CDATA #IMPLIED fme:tag{}.k CDATA #IMPLIED fme:created_by CDATA #IMPLIED fme:lane_boundary_type CDATA #IMPLIED fme:changeset CDATA #IMPLIED fme:area CDATA #IMPLIED fme:layer CDATA #IMPLIED fme:uid CDATA #IMPLIED > <!ATTLIST use fme:access CDATA #IMPLIED fme:visible CDATA #IMPLIED fme:type CDATA #IMPLIED fme:nd{}.ref CDATA #IMPLIED fme:tag{}.v CDATA #IMPLIED fme:timestamp CDATA #IMPLIED fme:user CDATA #IMPLIED fme:id CDATA #IMPLIED fme:version CDATA #IMPLIED fme:tag{}.k CDATA #IMPLIED fme:created_by CDATA #IMPLIED fme:lane_boundary_type CDATA #IMPLIED fme:changeset CDATA #IMPLIED fme:area CDATA #IMPLIED fme:layer CDATA #IMPLIED fme:uid CDATA #IMPLIED > ]> <svg xmlns="http://www.w3.org/2000/svg"  viewBox="-3.59534e-005 -3.59534e-005 0.00294818 0.00381678"><g xmlns:fme="http://www.safe.com/fme" fill="none" stroke="black" stroke-width="0.000000359533915" transform="translate(0,0.00374488) scale(1, -1)"> <g id="way" >
 

 

 
the attributes reside in the fromatattribute "style".

 

You can use a attributecreator/concatenator etc.  to create this formatparameter  or so to create it and its values.

 

svg_style = like fill:@Value(fill);fill-opacity:@Value(fill_op);stroke:@Value(stroke);stroke-width:0.02498948000000000;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.96744187000000004;stroke-dasharray:none

 

 

 

You can target objects trough the svg_id

 

the featuretype becomes svg:id  and it will add a counter for each subsequent object.

 

colours are 8 position hex values.

 

You can also use the featurecoloursetter of course.

 

 

It works using Inkscape. Inkscape can read the output.

 

Inkscape dalso sees any attribute written in the svg though. these are in the innnermost childs in the xml.

 

It has a searchenigin eot search truogh attributes.

 

Inkscape also has an xml-editor built in.

 

 

Works like a charm!

 

 

 

 

 
realy messy typing there...srry bout that.
the attributes reside in the fromatattribute "style".

 

You can use a attributecreator/concatenator etc.  to create this formatparameter  or so to create it and its values.

 

svg_style = like fill:@Value(fill);fill-opacity:@Value(fill_op);stroke:@Value(stroke);stroke-width:0.02498948000000000;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.96744187000000004;stroke-dasharray:none

 

 

 

You can target objects trough the svg_id

 

the featuretype becomes svg:id  and it will add a counter for each subsequent object.

 

colours are 8 position hex values.

 

You can also use the featurecoloursetter of course.

 

 

It works using Inkscape. Inkscape can read the output.

 

Inkscape dalso sees any attribute written in the svg though. these are in the innnermost childs in the xml.

 

It has a searchenigin eot search truogh attributes.

 

Inkscape also has an xml-editor built in.

 

 

Works like a charm!

 

 

 

 

 

Thanks @gio,

I used the following settings and it worked fine.


Reply