Re: [this one] Dia as XML: differences between two "identical" diagrams [with attachments]



At 03.09.2009 15:10, Stephen McGregor wrote:
[...]

My question is :
- What, or where, in the XML are the actual connections ? and, as a
   corollary,
I thought this was quite obvious from the diff, e.g.:

  <dia:connections>
    <dia:connection handle="0" to="5" connection="7"/>
    <dia:connection handle="3" to="2" connection="0"/>
  </dia:connections>

- What can/should I do to the corrupt-ing Dia XML to make it into non-
   corrupting, that is, connected, Dia XML ?

Make the value in to="<id>" point to the right object id and the correct the value in connection to point to the intended connection point in the target object. For me your so called "corruption" just looks a mismatch between the bezier lines endpoint (handle) positions and the given connection points id. When moving the group the connections get updated, the real connection points position is transfered to the beziers endpoints.

The corrupt Dia XML was generated by graphviz/dot, though this is not
The graphviz output is known to be flawed, unfortunately I didn't find a working way to have patches to it accetped (for reference some attempt from earlier this year attached).

In this special case dot is trying to calculate the connection points with a questionable formula. See TODO in the patch.

a graphviz question: I wan't to process/correct the XML myself. Also,
this is a demonstration example of the same problem observed in a
large diagram.

Last time I wanted to use dot output in Dia I first patched dot, but later wrote an importer for dot's native format. See:
http://mail.gnome.org/archives/dia-list/2009-March/msg00101.html

[...]

I want to process the Dia XML (created by graphviz) to make the
(correct) connections.
If the output would produces Dia objects with "mainpoints" e.g. "Standard - Box" than a simple connection="8" would address the center point of the object and automatically adjust the connecting line to the objects borders.

Regards,
        Hans

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert

Attachment: dot-dia-2009-03-27-hb.diff
Description: Text document



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]