You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Sebastian Hagen <Se...@in-gmbh.de> on 2003/05/20 11:27:11 UTC

How to order the attributes in generated SVG textbased Files

Hello,

is there a way to order the attributes of the single elements when
generating a SVG-File:

I have generated a SVGDocument from the following SVG-Data:

<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
        "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";>
<svg width="500" height="500">
        <rect x="71" y="98" width="94" height="62"
        
style="fill:rgb(0,0,255);stroke:rgb(0,0,0);stroke-width:1"/>
</svg>




When I now use PrettyPrinter to generate a file, the result is:



<svg contentScriptType="text/ecmascript" width="500"
     xmlns:xlink="http://www.w3.org/1999/xlink"; zoomAndPan="magnify"
     contentStyleType="text/css" height="500"
     preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg";
     version="1.0">
    <rect width="94" x="71" height="62" y="98"
          style="fill: rgb(0, 0, 255); stroke: rgb(0, 0, 0); stroke-width:
1; "/>
</svg>




1.) The order of the attributes is a mess. The rect first specifies the
width-attribute, then x-attribute, etc.
I want the attributes ordered as to be expected: first x, then y, width and
height (just as in the example above)

2.) Where do all those new attributes come from, like
preserveAspectRatio="XMidYMid meet"  etc.?  Is it possible to make Pretty
Printer not to print attributes that were never set, explicitly?



Thank you,

Sebastian Hagen

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