7.4.12. GXL File Format¶
GXL is an acronym for “Graph eXchange Language”. GXL is an XML-based format for storing graph information.
The Axivion Suite implements the non-hierarchical elements of the GXL.
Example of a GXL file:
<?xml version="1.0" encoding="utf-8"?>
<gxl>
<graph id="BASE" edgeids="true">
<node id="N1">
<type xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="Routine" />
<attr name="Source.Name"><string>MyRoutine</string></attr>
<attr name="Linkage.Name"><string>R MyRoutine</string></attr>
<attr name="Source.File"><string>myfile.c</string></attr>
<attr name="Source.Path"><string>mypath/</string></attr>
<attr name="Source.Line"><int>200</int></attr>
<attr name="Source.Column"><int>5</int></attr>
</node>
<node id="N2">
<type xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="Routine" />
<attr name="Source.Name"><string>OtherRoutine</string></attr>
<attr name="Linkage.Name"><string>R OtherRoutine</string></attr>
<attr name="Source.File"><string>myfile.c</string></attr>
<attr name="Source.Path"><string>mypath/</string></attr>
<attr name="Source.Line"><int>240</int></attr>
<attr name="Source.Column"><int>5</int></attr>
</node>
<edge id="E1" from="N1" to="N2">
<type xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="Static Call" />
<attr name="Source.File"><string>myfile.c</string></attr>
<attr name="Source.Path"><string>mypath/</string></attr>
<attr name="Source.Line"><int>220</int></attr>
<attr name="Source.Column"><int>20</int></attr>
</edge>
</graph>
</gxl>
DTD used within the Axivion Suite :
<!-- subset of GXL 1.0 zsed in the Axivion Suite
Document Type Definition
(based on GXL DTD 1.0 of April 25, 2002)
copyright of original GXL DTD 1.0 by
Andy Schuerr
Real-Time Systems Lab
Darmstadt University of Technology
Merckstr. 25, D-64283 Darmstadt, Germany
andy.schuerr@es.tu-darmstadt.de
Susan Elliott Sim
School of Information and Computer Science
444 Computer Science Bldg.
University of California, Irvine
ses@ics.uci.edu
Ric Holt
Department of Computer Science
University of Waterloo
Waterloo N2L 3G1, Canada
holt@plg.uwaterloo.ca
Andreas Winter
Institute for Software Technology
University of Koblenz-Landau
Universitaetsstrasse 1, D-56070 Koblenz, Germany
winter@uni-koblenz.de
-->
<!-- Attribute values -->
<!ENTITY % val "
bool |
int |
float |
string |
toogle
">
<!-- gxl -->
<!ELEMENT gxl (graph) >
<!ATTLIST gxl
xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"
>
<!-- type -->
<!ELEMENT type EMPTY>
<!ATTLIST type
xlink:type (simple) #FIXED "simple"
xlink:href CDATA #REQUIRED
>
<!-- graph -->
<!ELEMENT graph (type? , attr* , ( node | edge )*) >
<!ATTLIST graph
id ID #REQUIRED
role NMTOKEN #IMPLIED
edgeids (true | false) "false"
>
<!-- node -->
<!ELEMENT node (type? , attr*) >
<!ATTLIST node
id ID #REQUIRED
>
<!-- edge -->
<!ELEMENT edge (type?, attr*) >
<!ATTLIST edge
id ID #IMPLIED
from IDREF #REQUIRED
to IDREF #REQUIRED
>
<!-- attr -->
<!ELEMENT attr>
<!ATTLIST attr
id ID #IMPLIED
name NMTOKEN #REQUIRED
kind NMTOKEN #IMPLIED
>
<!-- atomic values -->
<!ELEMENT bool (#PCDATA)>
<!ELEMENT int (#PCDATA)>
<!ELEMENT float (#PCDATA)>
<!ELEMENT string (#PCDATA)>
<!ELEMENT toggle (#PCDATA)>