Convert to SVG. Loss classes.

Hi all Help me please, In html added CLASSes. After converting to svg, i lost all classes. For some elements got: Warning: Illegal attribute class - ignored! I added ids for elements, but classes are needed too. These classes need for future use javascript. How i can transfer to svg classes for different objects of html DOM.

Re: Convert to SVG. Loss classes.

I assume you are saying that you tried something like this:

  nodea [label=<<TABLE CELLPADDING="10" BORDER="0">
    <TR >
        <TD  HEIGHT="30" WIDTH="90" CLASS="ZZZ1" >a</TD>
        <TD >b</TD>
    </TR>
    </TABLE>>];

But it did not work, because this is not really HTML - you can only use the arttributes listed on http://www.graphviz.org/content/node-shapes

Instead, use HREF instead of CLASS in the gv source:

  nodea [label=<<TABLE CELLPADDING="10" BORDER="0">
    <TR >
        <TD  HEIGHT="30" WIDTH="90" HREF="ZZZ1" >a</TD>
        <TD >b</TD>
    </TR>
    </TABLE>>];

and then postprocess the generated SVG to change

  <g id="a_node2_2"><a xlink:href="ZZZ5" xlink:title="&lt;TABLE&gt;">

to

  <g id="a_node2_2" CLASS="ZZZ5" >

 

A kludge, but it should work.

steve

Recent comments