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

Re: description of the XML format of Dia



Welcome Alexia,

Le Thu, Feb 19, 2004, à 16:05:38 +0100, NAUDIN Alexia a écrit:

>    My name is Alexia and I'm new in the mailing list. I'm doing a work
>    placement and my task is to developp a tool that would generate network
>    diagrams automatically, using snmp requests.

This sounds like a very cool project... Are you able to tell us whether your 
client is primarily interested in the tool, or in the tool's output?

>    I'm going to use DIA to draw the diagrams, therefore I need to know the
>    description of the XML format of Dia.
>    I had a look on the official web site but couldn't find it. Maybe can you
>    help me ? Unless someone already wrote something that would generates XML
>    Dia format files ?... :)

Several tools exist that generate Dia diagrams; they are mentioned in
the Links section of dia's web site. I was about to tell you to stay
clear of tools that focus on UML diagram generation, as the UML Class
object is a fascinating object, but it looks like most of them focus
precisely on UML output...

I guess that in your case, you're going to be outputting mostly shapes
from the Networking and Cisco sheets. Shapes are all implemented using
the same underlying object, and follow the same basic schema: I suggest
you print and annotate a simple diagram with a few sample shapes (and
lines to connect them). Another shred of information is the diagram.dtd
file from the source's doc/ directory
(http://cvs.gnome.org/bonsai/cvsblame.cgi?file=dia%2Fdoc/diagram.dtd&rev=&root=/cvs/gnome). You'll quickly find that the information you are really after 
should be described in a meta-DTD document, as each <dia:object> element can 
have an arbitrary number of <dia:attribute> elements. 
The catch is that this meta-DTD does not exist beyond what's in the source code.
(look for instance at 

http://cvs.gnome.org/bonsai/cvsblame.cgi?file=dia%2Fobjects%2Fcustom/custom_object.c&rev=&root=/cvs/gnome#170

the function object_save_using_properties() is used to populate the
<dia:object> element with a list of <dia:attribute> children, based on
the contents of the custom_props array of PropDescription records).

Don't hesitate to ask more questions if you need to; if you are ever
allowed to give us new about your progress, that would also be nice.

	-- Cyrille (living in F-68360)

-- 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK