XGMML (eXtensible Graph Markup and Modeling Language)

XGMML 1.0 Draft Specification.

This version:
    http://www.cs.rpi.edu/~puninj/XGMML/draft-xgmml-20001006.html
    (provision of the schema and DTD for XGMML)

Newest version:
    http://www.cs.rpi.edu/~puninj/XGMML/draft-xgmml.html

Previous version:
    http://www.cs.rpi.edu/~puninj/XGMML/draft-xgmml-20000315.html

Editors:
    John Punin <puninj@cs.rpi.edu>, (RPI)
    Mukkai Krishnamoorthy <moorthy@cs.rpi.edu>, (RPI)


Abstract

This draft specification defines the syntax of the Extensible Graph Markup and Modeling Language (XGMML). XGMML is an XML application for describing Graphs.

Table of Contents

1. Introduction
2. XGMML Documents
    2.1 Well-Formed XGMML Documents
    2.2 Valid XGMML Documents
3. XGMML and GML
4. Structure of XGMML Documents
5. XGMML Data Types
    5.1 Boolean Type
    5.2 Number Type
    5.3 String Type
    5.4 URI Type
    5.5 Anchor Type
    5.6 Type of Graphic objects.
    5.7 Line Types
    5.8 Text Types
    5.9 Color Type
    5.10 Angle Type
    5.11 Object Type
6. Graph Element
    6.1 Global Attributes
    6.2 XML Attributes
    6.3 XLink Attributes
    6.4 Graph Attributes
    6.5 Graph Mixed Content
7. Node Element
    7.1 Node Attributes
    7.2 Node Mixed Content
8. Edge Element
    8.1 Edge Attributes
    8.2 Edge Mixed Content
9. Att Element
    9.1 Att  Attributes
    9.2 Att Mixed Content
10. Graphics, Line, Center and Point elements
    10.1 Graphics Attributes
    10.2 Line, Point and Center Attributes
11. XGMML and RDF

Appendices

A. Characters
B. XGMML 1.0 DTD
C. XGMML 1.0 Schema
D. XGMML Examples
E. XGMML Internet Media Type
F. References

1. Introduction

Extensible Graph Markup and Modeling Language (XGMML) is an XML 1.0 application based on Graph Modeling Language (GML) to describe Graphs [GML]. A Graph, G= (V,E), is a set of nodes V and a set of edges E. Each edge is either an ordered (directed graph) or unordered (undirected) pair of nodes. Since graphs can be described  as a data object whose elements are nodes and edges which are data objects, XML is an ideal way to represent graphs. Structure of the World Wide Web is a typical example of a graph where the web pages are "nodes," and the hyperlinks are "edges." The best way to describe a web site structure is using a graph structure so XGMML documents are a good choice for containing the structural information of a web site.

2. XGMML Documents

Since XGMML is an application of XML, XGMML documents can be well-formed documents or valid documents.

2.1 XGMML Well-formed Documents

An XGMML well-formed document is an XML well-formed document that described a graph using the graph, node and edge elements of XGMML. A graph element may be the root element of the XGMML well-formed document. Two cases of XGMML well-formed document can be found.  The first case is XGMML documents with additional proprietary elements from a vendor. The second case is  XGMML documents that are contained  on other XML documents.

2.2 XGMML Valid Documents

An XGMML valid document can be validated against an XGMML DTD or XGMML Schema [XML-SCHEMA]. The XGMML DTD and XGMML Schema are provided in the Appendices section. A valid XML document can have multiple schemas. The namespace for XGMML is: http://www.cs.rpi.edu/XGMML and the suffix for the XGMML elements is xgmml:.

3. XGMML and GML

XGMML is based on GML [GML]. GML is a powerful language used on many software applications to describe graph structures. XGMML uses all tags of GML and a few additional tags. Conversion of a GML description to an XGMML description is easy. A GML description is a collection of key-value pairs. The keys are string identifiers such as graph, node and edge and the values can be numbers, strings or a list of key-value pairs. The following rule is used to map GML to XGMML:
A GML key is a name of an XGMML element if its value is a list of key-value pairs. A GML key is a name of an XGMML attribute if its value is a number or string.
Two exceptions are considered: the comment GML tag and the GML lines starting with "#" character must be ignored or translated to XML comments <!-- comment -->

GML consider key names as safe or unsafe. Unsafe key names are the ones that the application program discards when a change to the graph occurred. They can be recognized if the key name starts with a capital letter. This rule is included in XGMML. The XGMML attributes are classified as safe and unsafe attributes.

4. Structure of XGMML Documents

An XGMML document describes a graph structure. The root element is graph and it can contain node, edge and att elements. The node element describes a node of a graph and the edge element describes an edge of a graph. Additional information for graphs, nodes and edges can be attached using the att element. A graph element can be contained in an att element and this graph will be considered as subgraph of the main graph. The graphics element can be included in a node or edge element, and it describes the graphic representation either of a node or an edge. The following example is a graph with just one node.
<?xml version="1.0"?>
<!DOCTYPE graph PUBLIC "-//John Punin//DTD graph description//EN" "http://www.cs.rpi.edu/~puninj/XGMML/xgmml.dtd">
<graph directed="1" id="2">
<node id="1" label="Node 1"/>
</graph>
The following XGMML document describes a graph with two nodes and one edge.
<?xml version="1.0"?>
<!DOCTYPE graph PUBLIC "-//John Punin//DTD graph description//EN" "http://www.cs.rpi.edu/~puninj/XGMML/xgmml.dtd">
<graph directed="1" id="5">
<node id="1" label="Node 1"/>
<node id="2" label="Node 2"/>
<edge source="1" target="2" label="Edge 1"/>
</graph>
XGMML documents can be validated against the DTD "xgmml.dtd" whose URL is: http://www.cs.rpi.edu/~puninj/XGMML/xgmml.dtd

XGMML well formed documents can be part of other XML documents.  The following example is a graph inside of an XHTML document [XHTML 1.0]:

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance"
      xmlns:xgmml="http://www.cs.rpi.edu/XGMML"
      xsi:schemaLocation="http://www.w3.org/1999/Style/Transform
                          http://www.w3.org/1999/Style/Transform/xslt.xsd
                          http://www.w3.org/1999/xhtml
                          http://www.w3.org/1999/xhtml/xhtml.xsd
                          http://www.cs.rpi.edu/XGMML
                          http://www.cs.rpi.edu/~puninj/XGMML/xgmml.xsd"
      xml:lang="en">
      
<head>
<title>Graph Information</title>
</head>
<body>

<!-- XHTML Document here -->

     <xgmml:graph directed="1" graphic="1" Layout="points">
       <xgmml:node id="1" label="1" weight="0">
         <xgmml:graphics type="circle" x="250" y="90" />
       </xgmml:node>
       <xgmml:node id="2" label="2"weight="0">
         <xgmml:graphics type="circle" x="190" y="150" />
       </xgmml:node>
       <xgmml:edge source="1" target="2" weight="0" />
     </xgmml:graph>

<!-- XHTML Document here -->

</body>
</html>
Other examples of XGMML Documents can be found in Apendix D of this draft.

5. XGMML Data Types

XGMML data types are defined based on the following XML data types:

5.1 Boolean Type

<!ENTITY % boolean.type "(0|1)" >
Boolean values are 0 for false and 1 for True.

5.2 Number Type

<!ENTITY % number.type "NMTOKEN">
Numbers can be integers or reals.

5.3 String Type

<!ENTITY % string.type "CDATA">
Strings are XML Literal data that can not contain a quoted character.

5.4 URI Type

<!ENTITY % uri.type "%string.type;">
URI are strings that are Uniform Resource Identifiers as defined in [RFC1630]. URIs include relative and absolute Uniform Resource Locators as defined in [RFC1738] and [RFC1808].

5.5 Anchor Type

<!ENTITY % anchor.type "(c|n|ne|e|se|s|sw|w|nw)">
Anchor type is defined in GML as the relative position of an object. Anchor type is an enumerated type whose possible values are c (center), n (north), ne (northeast), e (east), se (southeast), s (south), sw (southweast), w (west) and nw (northwest).

5.6 Type of Graphic Objects

<!ENTITY % type-graphics-gml.type "arc|bitmap|image|line|oval|polygon|
                                   rectangle|text">
<!ENTITY % type-graphics-app.type "box|circle|ver_ellipsis|hor_ellipsis|
                                    rhombus|triangle|pentagon|hexagon|
                                    octagon">
The type of graphic objects is an enumerated type whose values depend mainly on the application that reads XGMML documents. XGMML extends the possible values of the GML type of graphic objects.

5.7 Line Types

<!ENTITY % arrow.type "(none | first | last | both)">
<!ENTITY % capstyle.type "(butt | projecting | round)">
<!ENTITY % joinstyle.type "(bevel | miter | round)">
<!ENTITY % arcstyle.type "(pieslice | chord | arc)">
Line Types are enumerated types and they are: Arrow, Capstyle, Joinstyle and Arcstyle. Arrow type defines the position of the arrow. Capstyle type defines the end of the line. Joinstyle type defines the Line joints. Arcstyle defines the style of an arc.

5.8 Text Types

<!ENTITY % justify.type "(left | right | center)">
<!ENTITY % font.type "%string.type;">
Justify type is an enumerated type that defines the text justification. Font type is a string that represents the name of the font to be used for the text.

5.9 Color Type

<!ENTITY % color.type "%string.type;">
Color type is a string that represents the color to be used by the Graphic object. The format is the same as the color type in CSS2 [CSS2]. The color can be either a keyword or a numerical RGB specification. Examples are the strings : "white", "#FFFFF", "rgb(100,150,30)".

5.10 Angle Type

<!ENTITY % angle.type "%string.type;">
Angle type is a string that represents the angle to be used by an arc. The format is the same as the angles type in CSS2 [CSS2]. It starts with a number (number.type) followed by an angle unit identifier: deg (degrees), grad (grads), rad (radians). If no angle unit identifier is given, deg (degrees) is the default.

5.11 Object Type

<!ENTITY % object.type "(list | string | real | integer)">
Object type is an enumerated type that consist of the GML possible values of an object. A GML file is composed of key-value pairs. The type of the possible values of the keys are list, string, real or integer.

6. Graph Element

<!ELEMENT graph (att*,(node | edge)*,att*)>
<!ATTLIST graph
          %global-atts;
          %xml-atts;
          %xlink-atts;
          %graph-atts-safe;
          %graph-atts-gml-unsafe;
          %graph-atts-app-unsafe;>
The graph element is the root element of an XGMML valid document. This graph element contains the rest of the XGMML elements. The graph element  may not be unique in the XGMML document. Other graphs can be included as subgraphs of the main graph. Please refer to the att element.

6.1 Global Attributes

<!ENTITY % global-atts "id %number.type; #IMPLIED
                        name %string.type; #IMPLIED
                        label %string.type; #IMPLIED
                        labelanchor %string.type; #IMPLIED">
The following attributes are attributes of all XGMML elements :

6.2 XML Attributes

<!ENTITY % xml-atts "xmlns CDATA #FIXED 'http://www.cs.rpi.edu/XGMML'
                        xml:lang NMTOKEN #IMPLIED
                        xml:space (default | preserve) #IMPLIED">
These attributes are standard XML attributes:

6.3 XLink Attributes

<!ENTITY % xlink-atts "xmlns:xlink CDATA #FIXED 'http://www.w3.org/1999/xlink'
               xlink:type (simple|extended|locator|arc) #IMPLIED
               xlink:role CDATA #IMPLIED
               xlink:title CDATA #IMPLIED
               xlink:show (new|embed|replace) #IMPLIED
               xlink:actuate (onLoad|onRequest) #IMPLIED
               xlink:href CDATA #IMPLIED">
Nodes and Edges can reference XGMML documents.  For example, a node can represent a graph that can be shown when the user points  in the node. This behavior is similar to hyperlinks in HTML documents. XGMML uses XLink framework [XLINK]  to create hyperlinks either in nodes or edges. All these attributes are taking directly from the XLink Working Draft.

6.4 Graph Attributes

<!ENTITY % graph-atts-safe "directed %boolean.type; '0' ">              
<!ENTITY % graph-atts-gml-unsafe "Vendor %string.type;  #IMPLIED">
<!ENTITY % graph-atts-app-unsafe "Scale %number.type; #IMPLIED
                                  Rootnode %number.type; #IMPLIED
                                  Layout %string.type; #IMPLIED
                                  Graphic %boolean.type; #IMPLIED">
The graph attributes can be safe or unsafe and they are:

6.5 Graph Mixed Content

The only elements allowed in a graph element are: node, edge and att. The graph element can be an empty graph. For valid XGMML documents, atts may be placed first or last, and nodes and edges may be freely intermingled. Nodes must have different ids and names attributes. Edges can not reference to nodes that are not included in the XGMML definition.

7. Node Element

<!ELEMENT node (graphics?,att*)>
<!ATTLIST node
          %global-atts;
          %xlink-atts;
          %node-atts-gml-safe;
          %node-atts-app-safe;>
A node element must be included in a graph element. Each node element describes the properties of a node object. The node can be rendered as a graphic object and also can have additional meta information to be used for the application program. The only elements allowed inside the node are graphics and att. The graphic representation of the node is reported on the graphics element. The additional meta information is reported on the att element.

7.1 Node Attributes

<!ENTITY % node-atts-gml-safe "edgeanchor %anchor.type; #IMPLIED">
<!ENTITY % node-atts-app-safe "weight %string.type;  #IMPLIED">
The node attributes are:

7.2 Node Mixed Content

The graphics and att are the only elements allowed in the node element. The graphics element shows the graphical representation of the node. For example, a graphical representation of a node can be a rectangle, a circle or a bitmap.  An att element is used to attach additional meta information related to the node. For example, if a node is a representation of a web page, useful metadata is the title, date of creation and  size of the web page. A node of a graph can be a subgraph so the att element can be used to include the subgraph. Please see att element for more details.

8. Edge Element

<!ELEMENT edge (graphics?,att*)>
<!ATTLIST edge
          %global-atts;
          %xlink-atts;
          %edge-atts-gml-safe;
          %edge-atts-app-safe;>
An edge element must be included in a graph element. For each edge element at least two node elements have to be included in the graph element. An edge is between a source node and a target node. The application program must verify if the source node and target node are included in the XGMML document. The edge element as the node element can have a graphical representation and additional metadata information. The graphics and att elements are the only elements allowed inside of the edge element. The graphic representation of the edge is reported on the graphics element. The additional meta information is reported on the att element.

8.1 Edge Attributes

<!ENTITY % edge-atts-gml-safe "source %number.type; #REQUIRED
                               target %number.type; #REQUIRED">
<!ENTITY % edge-atts-app-safe "weight %string.type; #IMPLIED">
The edge attributes are:

8.2 Edge Mixed Content

The graphics and att are the only elements allowed in an edge element. The graphics element shows the graphical representation of an edge. For example, a graphical representation of an edge can be a  line or an arc.  An att element is used to attach additional meta information related to an edge. For example, if an edge is a representation of a  hyperlink, useful metadata is anchor string and type of the hyperlink.

9. Att Element

<!ELEMENT att (#PCDATA | att | graph)*>
<!ATTLIST att
          %global-atts;
          %attribute-value;
          %attribute-type;>
An att element is used to hold meta information about the element that contains the att element. An att element can contain other att elements, for example to represent structured metadata such as records, lists, etc. A graph element can be contained in an att element. This graph is considered as a subgraph of the main graph.

9.1 Att Attributes

<!ENTITY % attribute-value "value %string.type; #IMPLIED">
<!ENTITY % attribute-type "type %object.type;  #IMPLIED">
The att attributes are: For example to attach the information [integer rad = 30] to a node the following line is included in the node element :
<att type="integer" name="rad" value="30"/>

9.2 Att Mixed Content

All of att, graph and PCDATA can be inside of att element. An att is an empty element for object types such as integers, reals and integers. When the object type is a list, other att element must be inside of the att element to hold the list information. When a graph element is contained in the att element, that graph is a subgraph of the main graph.

For example, the metadata of an object  person A is name:John, ssn: 123456789 and e-mail:john@rpi.edu. To attach this metadata to a node of a graph using the att element, the following lines must be included in the node element:

<att type="list" name="person_description">
<att name="name" value="John"/>
<att name="ssn" value="123456789"/>
<att name="e-mail" value="john@rpi.edu"/>
</att>

10. Graphics, Line, Center and Point elements

<!ELEMENT graphics ((Line? | center?),att*)>
<!ATTLIST graphics
          %graphics-type-att;
          %point-atts;
          %dimension-atts;
          %external-atts;
          %line-atts;
          %text-atts;
          %bitmap-atts;
          %arc-atts;
          %object-atts;>
<!ELEMENT center EMPTY>
<!ATTLIST center 
          %point-atts;>
<!ELEMENT Line (point,point+)>
<!ELEMENT point EMPTY>
<!ATTLIST point 
          %point-atts;>
The graphics element defines the graphical representation a graph, a node or an edge. A graphics element must be  included in a graph, node or edge element. Line, center and att elements are the only elements that can be contained in a graphics element. Line element is defined between two point elements and it is used to represent edges. center element is a special point element to represent the central point of the graphical representation of a node. The att element permits to add information to the graphical representation. All these elements are inherited from GML.

10.1 Graphics Attributes

<!ENTITY % graphics-type-att "type (%type-graphics-gml.type;|
                                    %type-graphics-app.type;) #IMPLIED">
<!ENTITY % point-atts "x %number.type; #IMPLIED
                       y %number.type; #IMPLIED
                       z %number.type; #IMPLIED">
<!ENTITY % dimension-atts "w %number.type; #IMPLIED
                           h %number.type; #IMPLIED
                           d %number.type; #IMPLIED">
<!ENTITY % external-atts "image %uri.type; #IMPLIED
                          bitmap %uri.type; #IMPLIED">
<!ENTITY % line-atts "width %number.type; #IMPLIED
                      arrow %arrow.type; #IMPLIED
                      capstyle %capstyle.type; #IMPLIED
                      joinstyle %joinstyle.type; #IMPLIED
                      smooth %boolean.type; #IMPLIED
                      splinesteps %number.type; #IMPLIED">
<!ENTITY % text-atts "justify %justify.type; #IMPLIED
                      font  %font.type; #IMPLIED">
<!ENTITY % bitmap-atts "background %color.type; #IMPLIED
                        foreground %color.type; #IMPLIED">
<!ENTITY % arc-atts "extent %angle.type; #IMPLIED
                     start %angle.type; #IMPLIED
                     style %arcstyle.type;  #IMPLIED">
<!ENTITY % object-atts "stipple %string.type; #IMPLIED
                        visible %boolean.type; #IMPLIED
                        fill %color.type; #IMPLIED
                        outline %color.type; #IMPLIED
                        anchor %anchor.type; #IMPLIED">
The graphics attributes are divided in the following groups:

10.2 Line, Point and Center Attributes

Line element does not have attributes. Line element contains two or more point elements to define a polyline. Line is used to represent an edge.

A point element is an empty element that has x, y and z numeric values as attributes. A center point has the x, y and z also as attributes.

11. XGMML and RDF

XGMML well formed documents can include other XML vocabularies. In the near future, several vocabularies can be combined in one document and validate it using XML Schemas and Namespaces. RDF (Resource Description Framework) [RDF] is one way to describe metadata about resources. XGMML allows the inclusion of metadata information for a Graph, Node and/or Edge using the att tag.

These two examples show how to combine XGMML and RDF. The first example is a graph describing a simple website. The nodes represent webpages and the edges represent hyperlinks. The metadata of the webpages is included as attribute of a node. RDF and DC (Dublin Core) [DC] vocabularies have been used to describe the metadata of the nodes.

<?xml version="1.0"?>
<graph xmlns = "http://www.cs.rpi.edu/XGMML"
       directed="1" >
<node id="3" label="http://www.cs.rpi.edu/courses/" weight="5427">
<att>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.0/">
  <rdf:Description about="http://www.cs.rpi.edu/courses/"
    dc:title="Courses at Rensselaer Computer Science
    Department"
    dc:subject="www@cs.rpi.edu; M.S. requirements; CSCI-1190
    Beginning C Programming for Engineers; Courses; People;
    Graduate Program; CSCI-4020 Computer  Algorithms; CSCI-
    2220-01  Programming in Java; Research; Course Selection
    Guide; CSCI-4961-01,  CSCI-6961-01 Advanced Robotics; 
    Programming in Java; CSCI-2400 Models  of Computation"
    dc:date="2000-01-31"
    dc:type="Text"
    >
    <dc:format>
      <rdf:Bag
        rdf:_1="text/html"
        rdf:_2="5427 bytes"
      />
    </dc:format>
  </rdf:Description>
</rdf:RDF>
</att>
</node>
<node id="7" label="http://www.cs.rpi.edu/research/" weight="5508">
<att>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.0/">
  <rdf:Description about="http://www.cs.rpi.edu/research/"
    dc:title="Research at Rensselaer Computer Science
    Department"
    dc:subject="www@cs.rpi.edu; Computing  Twin Primes and
    Brun's Constant; Generic Programming; ASHE; Current
    Events; TEMPEST; Courses; People; Graduate Program; High-
    Performance  Object-Oriented Programming in Fortran 90;
    High Performance  Problem-Solving Environment for
    Optimization and Control of  Chemical and Biological
    Processes; Computer Vision; Theory and Algorithms;
    technical report library; RPInfo; Undergraduate  Program;
    Research; Research; Design Conference Room; Rensselaer;
    Bryan Rudge; Engineering Databases; anonymous ftp; I.SEE;
    info@cs.rpi.edu; Scientific Computing; OpenMath; Proactive
    Network Problem Avoidance; Computing   Facilities; Computer
    Science Department"
    dc:date="1999-11-19"
    dc:type="Text"
    >
    <dc:format>
      <rdf:Bag
        rdf:_1="text/html"
        rdf:_2="5508 bytes"
      />
    </dc:format>
  </rdf:Description>
</rdf:RDF>
</att>
</node>
<node id="8" label="http://www.cs.rpi.edu/undergrad/" weight="7511">
<att>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.0/">
  <rdf:Description about="http://www.cs.rpi.edu/undergrad/"
    dc:title="Undergraduate Program at Rensselaer Computer
    Science Department"
    dc:subject="www@cs.rpi.edu; Association for Computing
    Machinery; People; Graduate Program; Minor; Prospective
    Students FAQ; Admissions Office; Research; BS-MS Degree;
    Rensselaer Catalog; Dual Majors; Admissions; ; Computing
    Facilities; Undergraduate  Program; Rensselaer; Course  
    Descriptions;Computer Science Department"
    dc:date="2000-01-26"
    dc:type="Text"
    >
    <dc:format>
      <rdf:Bag
        rdf:_1="text/html"
        rdf:_2="7511 bytes"
      />
    </dc:format>
  </rdf:Description>
</rdf:RDF>
</att>
</node>
<node id="1" label="http://www.cs.rpi.edu/" weight="3352">
<att>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:dc="http://purl.org/dc/elements/1.0/">
  <rdf:Description about="http://www.cs.rpi.edu/"
    dc:title="Rensselaer Computer Science Department"
    dc:subject="www@cs.rpi.edu; faculty positions; Rensselaer;
    Bryan Rudge; Computing Facilities; Courses; People;
    Graduate Program; info@cs.rpi.edu; Current Events; ;
    RPInfo; Research; Undergraduate  Program"
    dc:date="2000-01-26"
    dc:type="Text"
    >
    <dc:format>
      <rdf:Bag
        rdf:_1="text/html"
        rdf:_2="3352 bytes"
      />
    </dc:format>
  </rdf:Description>
</rdf:RDF>
</att>
</node>
<edge source="1" target="3" weight="0" label="SRC IMG gfx/courses2.jpg" />
<edge source="7" target="3" weight="0" label="SRC IMG ../gfx/courses2.jpg" />
<edge source="8" target="3" weight="0" label="SRC IMG ../gfx/courses2.jpg" />
<edge source="3" target="7" weight="0" label="SRC IMG ../../gfx/research2.jpg" />
<edge source="1" target="7" weight="0" label="SRC IMG gfx/research2.jpg" />
<edge source="8" target="7" weight="0" label="SRC IMG ../gfx/research2.jpg" />
<edge source="3" target="8" weight="0" label="SRC IMG ../../gfx/ugrad2.jpg" />
<edge source="7" target="8" weight="0" label="SRC IMG ../gfx/ugrad2.jpg" />
<edge source="1" target="8" weight="0" label="SRC IMG gfx/ugrad2.jpg" />
<edge source="3" target="1" weight="0" label="SRC IMG ../../gfx/corner2.jpg" />
<edge source="7" target="1" weight="0" label="SRC IMG ../gfx/corner2.jpg" />
<edge source="8" target="1" weight="0" label="SRC IMG ../gfx/corner2.jpg" />
</graph>
The second example is a simple graph showing a relationship between two people. The metadata information about a person can be included as an attribute of the node. RDF and VCard (The Electronic Business Card) [VCARD] vocabularies have been used to describe the metadata of the nodes
 
<?xml version="1.0"?>
<graph xmlns = "http://www.cs.rpi.edu/XGMML"  directed="1" >
<node id="1" label="Mukkai Krishnamoorthy">
<att>
    <rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:vCard = "http://imc.org/vCard/3.0#" >
      <rdf:Description about = "http://www.cs.rpi.edu/~moorthy" >
        <vCard:FN> Mukkai Krishnamoorthy </vCard:FN>
        <vCard:N rdf:parseType="Resource">
          <vCard:Family> Krishnamoorthy </vCard:Family>
          <vCard:Given> Mukkai </vCard:Given>
        </vCard:N>
        <vCard:EMAIL>
          <rdf:value> moorthy@cs.rpi.edu </rdf:value>
          <rdf:type resource ="http://imc.org/vCard/3.0#internet" />
        </vCard:EMAIL>
        <vCard:ORG rdf:parseType="Resource">
          <vCard:Orgname> RPI </vCard:Orgname>          
          <vCard:Orgunit>
            <rdf:seq>
              <rdf:li> Computer Science </rdf:li>                
              <rdf:li> Professor </rdf:li>                   
            </rdf:seq>
         </vCard:Orgunit>
        </vCard:ORG>
      </rdf:Description>
    </rdf:RDF>
</att>
</node>
<node id="2" label="John Punin">
<att>
    <rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:vCard = "http://imc.org/vCard/3.0#" >
      <rdf:Description about = "http://www.cs.rpi.edu/~puninj" >
        <vCard:FN> John Punin </vCard:FN>
        <vCard:N rdf:parseType="Resource">
          <vCard:Family> Punin </vCard:Family>
          <vCard:Given>  John </vCard:Given>
        </vCard:N>
        <vCard:EMAIL>
          <rdf:value> puninj@cs.rpi.edu </rdf:value>
          <rdf:type resource ="http://imc.org/vCard/3.0#internet" />
        </vCard:EMAIL>
        <vCard:ORG rdf:parseType="Resource">
          <vCard:Orgname> RPI </vCard:Orgname>          
          <vCard:Orgunit>
            <rdf:seq>
              <rdf:li> Computer Science </rdf:li>                
              <rdf:li> PhD student </rdf:li>                   
            </rdf:seq>
         </vCard:Orgunit>
        </vCard:ORG>
      </rdf:Description>
    </rdf:RDF>
</att>
</node>
<edge source="1" target="2" weight="0" label="advisor"/>
<edge source="2" target="1" weight="0" label="advisee"/>
</graph>

Appendices

A. Characters

Since XGMML is an application of XML, XGMML supports Unicode [UTR20]. Unicode is a 16 bit encoding for characters. The latest version Unicode 3.0 contains 49,194 distinct coded characters. The default character set for XGMML is ISO-8859-1 (Latin 1). Appendix B of XML 1.0 document explains in more detail what Unicode characters can be used for tag names.

B. XGMML 1.0 DTD

<!-- DTD for XGMML 1.0 -->
<!-- Authors: John Punin and Mukkai Krishnamoorthy -->
<!-- Computer Science Department -->
<!-- Rensselaer Polytechnic Institute -->
<!-- xgmml.dtd,v 1.0 03/02/2000 -->

<!-- Boolean type -->
<!ENTITY % boolean.type "(0|1)" >

<!-- Positive number type -->
<!ENTITY % number.type "NMTOKEN">

<!-- String type -->
<!ENTITY % string.type "CDATA">


<!-- Standard XML Namespace attribute -->
<!ENTITY % nds 'xmlns'>

<!-- URI type -->
<!ENTITY % uri.type "%string.type;">

<!-- Anchor type -->
<!ENTITY % anchor.type "(c|n|ne|e|se|s|sw|w|nw)">

<!-- Type of Graphics (GML types) -->
<!ENTITY % type-graphics-gml.type "arc|bitmap|image|line|oval|polygon|
                                   rectangle|text">

<!-- Type of Graphics (New types) -->
<!ENTITY % type-graphics-app.type "box|circle|ver_ellipsis|hor_ellipsis|
                                    rhombus|triangle|pentagon|hexagon|
                                    octagon">

<!-- Line types -->
<!-- Arrow type -->
<!ENTITY % arrow.type "(none | first | last | both)">
<!-- Capstyle type -->
<!ENTITY % capstyle.type "(butt | projecting | round)">
<!-- Joinstyle type -->
<!ENTITY % joinstyle.type "(bevel | miter | round)">
<!-- Arc style  type -->
<!ENTITY % arcstyle.type "(pieslice | chord | arc)">

<!-- Text types -->
<!-- Text justification type -->
<!ENTITY % justify.type "(left | right | center)">
<!-- Font type -->
<!ENTITY % font.type "%string.type;">
<!-- Color type -->
<!ENTITY % color.type "%string.type;">

<!-- Angle type -->
<!ENTITY % angle.type "%string.type;">

<!-- Object type -->
<!ENTITY % object.type "(list | string | real | integer)">

<!-- Global Attributes -->
<!ENTITY % global-atts "id %number.type; #IMPLIED
                        name %string.type; #IMPLIED
                        label %string.type; #IMPLIED
                        labelanchor %string.type; #IMPLIED">

<!-- Standard XML Attributes -->
<!ENTITY % xml-atts "%nds; %uri.type; #FIXED 'http://www.cs.rpi.edu/XGMML' 
                        xml:lang NMTOKEN #IMPLIED
                        xml:space (default | preserve) #IMPLIED">

<!-- Standard XLink Attributes -->
<!ENTITY % xlink-atts 
              "xmlns:xlink CDATA #FIXED 'http://www.w3.org/1999/xlink'
               xlink:type (simple|extended|locator|arc) #FIXED 'simple' 
               xlink:role CDATA #IMPLIED
               xlink:title CDATA #IMPLIED
               xlink:show (new|embed|replace) #FIXED 'replace'
               xlink:actuate (onLoad|onRequest) #FIXED 'onRequest'
               xlink:href CDATA #IMPLIED">

<!-- Safe Graph Attributes -->
<!ENTITY % graph-atts-safe "directed %boolean.type; '0' ">              
<!-- Unsafe Graph Attributes (GML) -->
<!ENTITY % graph-atts-gml-unsafe "Vendor %string.type;  #IMPLIED">

<!-- Unsafe Graph Attributes (new attributes) -->
<!ENTITY % graph-atts-app-unsafe "Scale %number.type; #IMPLIED
                                  Rootnode %number.type; #IMPLIED
                                  Layout %string.type; #IMPLIED
                                  Graphic %boolean.type; #IMPLIED">

<!-- Graph Element -->
<!ELEMENT graph (att*,(node | edge)*, att*)>
<!-- Graph Attributes -->
<!ATTLIST graph
          %global-atts;
          %xml-atts;
          %xlink-atts;
          %graph-atts-safe;
          %graph-atts-gml-unsafe;
          %graph-atts-app-unsafe;>

<!-- Safe Node Attributes (GML) -->
<!ENTITY % node-atts-gml-safe "edgeanchor %string.type; #IMPLIED">
<!-- Safe Node Attributes (new attributes) -->
<!ENTITY % node-atts-app-safe "weight %string.type;  #IMPLIED">

<!-- Node Element -->
<!ELEMENT node (graphics?,att*)>
<!-- Node Attributes -->
<!ATTLIST node
          %global-atts;
          %xlink-atts;
          %node-atts-gml-safe;
          %node-atts-app-safe;>

<!-- Safe Edge Attributes (GML) -->
<!ENTITY % edge-atts-gml-safe "source %number.type; #REQUIRED
                               target %number.type; #REQUIRED">
<!-- Safe Edge Attributes (new attributes) -->
<!ENTITY % edge-atts-app-safe "weight %string.type; #IMPLIED">

<!-- Edge Element -->
<!ELEMENT edge (graphics?,att*)>
<!-- Edge Attributes -->
<!ATTLIST edge
          %global-atts;
          %xlink-atts;
          %edge-atts-gml-safe;
          %edge-atts-app-safe;>

<!-- Graphics Type  -->
<!ENTITY % graphics-type-att "type (%type-graphics-gml.type;|
                                    %type-graphics-app.type;) #IMPLIED">

<!-- Point Attributes (x,y,z)  -->
<!ENTITY % point-atts "x %number.type; #IMPLIED
                       y %number.type; #IMPLIED
                       z %number.type; #IMPLIED">

<!-- Dimension Attributes (width,height,depth)  -->
<!ENTITY % dimension-atts "w %number.type; #IMPLIED
                           h %number.type; #IMPLIED
                           d %number.type; #IMPLIED">

<!-- External Attributes (Image and Bitmap)  -->
<!ENTITY % external-atts "image %uri.type; #IMPLIED
                          bitmap %uri.type; #IMPLIED">

<!-- Line Attributes -->
<!ENTITY % line-atts "width %number.type; #IMPLIED
                      arrow %arrow.type; #IMPLIED
                      capstyle %capstyle.type; #IMPLIED
                      joinstyle %joinstyle.type; #IMPLIED
                      smooth %boolean.type; #IMPLIED
                      splinesteps %number.type; #IMPLIED">

<!-- Text Attributes -->
<!ENTITY % text-atts "justify %justify.type; #IMPLIED
                      font  %font.type; #IMPLIED">

<!-- Bitmap Attributes -->
<!ENTITY % bitmap-atts "background %color.type; #IMPLIED
                        foreground %color.type; #IMPLIED">

<!-- Arc Attributes -->
<!ENTITY % arc-atts "extent %angle.type; #IMPLIED
                     start %angle.type; #IMPLIED
                     style %arcstyle.type;  #IMPLIED">

<!-- Graphical Object Attributes -->
<!ENTITY % object-atts "stipple %string.type; #IMPLIED
                        visible %boolean.type; #IMPLIED
                        fill %color.type; #IMPLIED
                        outline %color.type; #IMPLIED
                        anchor %anchor.type; #IMPLIED">

<!-- Graphics Element -->
<!ELEMENT graphics ((Line? | center?),att*)>
<!-- Graphics Attributes -->
<!ATTLIST graphics
          %graphics-type-att;
          %point-atts;
          %dimension-atts;
          %external-atts;
          %line-atts;
          %text-atts;
          %bitmap-atts;
          %arc-atts;
          %object-atts;>

<!-- Center Point Element -->
<!ELEMENT center EMPTY>
<!ATTLIST center 
          %point-atts;>

<!-- Line Element -->
<!ELEMENT Line (point,point+)>

<!-- Point Element -->
<!ELEMENT point EMPTY>
<!ATTLIST point 
          %point-atts;>

<!-- Value Attribute -->
<!ENTITY % attribute-value "value %string.type; #IMPLIED">
<!-- Type Attribute -->
<!ENTITY % attribute-type "type %object.type;  #IMPLIED">

<!-- Att Element -->
<!ELEMENT att (#PCDATA | att | graph)*>
<!-- Att Attributes -->
<!ATTLIST att
          %global-atts;
          %attribute-value;
          %attribute-type;>

C. XGMML 1.0 Schema

<?xml version='1.0'?>

<!-- XML schema for XGMML 1.0 -->
<!-- Authors: John Punin and Mukkai Krishnamoorthy -->
<!-- Computer Science Department -->
<!-- Rensselaer Polytechnic Institute -->
<!-- xgmml.xsd,v 1.0 10/06/2000 -->

<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200010//EN" "http://www.w3.org/2000/10/XMLSchema.dtd" [
<!ATTLIST schema xmlns:xml CDATA #IMPLIED
                 xmlns:xlink CDATA #IMPLIED
                 xmlns:xgmml CDATA #IMPLIED> 
                 <!-- keep this schema XML1.0 valid -->
]>

<schema xmlns="http://www.w3.org/2000/10/XMLSchema" 
        targetNamespace="http://www.cs.rpi.edu/XGMML" 
        xmlns:xml="http://www.w3.org/XML/1998/namespace"
        xmlns:xlink="http://www.w3.org/1999/xlink"
        xmlns:xgmml="http://www.cs.rpi.edu/XGMML" 
        elementFormDefault="unqualified"
        attributeFormDefault="unqualified"
        version="xgmml 1.0">

<!-- get access to the xml: attribute groups for xml:lang -->
<import namespace="http://www.w3.org/XML/1998/namespace" 
        schemaLocation="http://www.w3.org/2000/10/xml.xsd"/>

<!-- Boolean type -->
<simpleType name="xgmml:boolean.type">
 <restriction base="nonNegativeInteger">
          <enumeration value="0"/>
          <enumeration value="1"/>
 </restriction>
</simpleType>

<!-- Positive number type -->
<simpleType name="xgmml:number.type">
  <restriction base="nonNegativeInteger"/>
</simpleType>

<!-- String type -->
<simpleType name="xgmml:string.type">
  <restriction base="string"/>
</simpleType>

<!-- URI type -->
<simpleType name="xgmml:uri.type">
  <restriction base="uriReference"/>
</simpleType>

<!-- Anchor type -->
<simpleType name="xgmml:anchor.type">
  <restriction base="NMTOKEN">
          <enumeration value="c"/>
          <enumeration value="n"/>
          <enumeration value="ne"/>
          <enumeration value="e"/>
          <enumeration value="se"/>
          <enumeration value="s"/>
          <enumeration value="sw"/>
          <enumeration value="w"/>
          <enumeration value="nw"/>
  </restriction>
</simpleType>

<!-- Graphics Type  -->
<simpleType name="xgmml:type-graphics.type">
  <restriction base="NMTOKEN">

<!-- Type of Graphics (GML types) type-graphics-gml.type -->
          <enumeration value="arc"/>
          <enumeration value="bitmap"/>
          <enumeration value="image"/>
          <enumeration value="line"/>
          <enumeration value="oval"/>
          <enumeration value="polygon"/>
          <enumeration value="rectangle"/>
          <enumeration value="text"/>

<!-- Type of Graphics (New types) type-graphics-app.type -->
          <enumeration value="box"/>
          <enumeration value="circle"/>
          <enumeration value="ver_ellipsis"/>
          <enumeration value="hor_ellipsis"/>
          <enumeration value="rhombus"/>
          <enumeration value="triangle"/>
          <enumeration value="pentagon"/>
          <enumeration value="hexagon"/>
          <enumeration value="octagon"/>
   </restriction>
</simpleType>

<!-- Line types -->
<!-- Arrow type -->
<simpleType name="xgmml:arrow.type">
  <restriction base="NMTOKEN">
          <enumeration value="none"/>
          <enumeration value="first"/>
          <enumeration value="last"/>
          <enumeration value="both"/>
  </restriction>
</simpleType>

<!-- Capstyle type -->
<simpleType name="xgmml:capstyle.type">
   <restriction base="NMTOKEN">
          <enumeration value="butt"/>
          <enumeration value="projecting"/>
          <enumeration value="round"/>
   </restriction>
</simpleType>

<!-- Joinstyle type -->
<simpleType name="xgmml:joinstyle.type"> 
   <restriction base="NMTOKEN">
          <enumeration value="bevel"/>
          <enumeration value="miter"/>
          <enumeration value="round"/>
   </restriction>
</simpleType>

<!-- Arc style  type -->
<simpleType name="xgmml:arcstyle.type"> 
   <restriction base="NMTOKEN">
          <enumeration value="pieslice"/>
          <enumeration value="chord"/>
          <enumeration value="arc"/>
   </restriction>
</simpleType>

<!-- Text types -->
<!-- Text justification type -->
<simpleType name="xgmml:justify.type">
   <restriction base="NMTOKEN">
          <enumeration value="left"/>
          <enumeration value="right"/>
          <enumeration value="center"/>
   </restriction>
</simpleType>

<!-- Font type -->
<simpleType name="xgmml:font.type">
  <restriction base="string"/>
</simpleType>

<!-- Color type -->
<simpleType name="xgmml:color.type"> 
   <restriction base="string"/>
</simpleType>

<!-- Angle type -->
<!-- Number followed by unit identifier (deg, grad or rad)  -->
<simpleType name="xgmml:angle.type">
   <restriction base="string">
          <pattern value="(\+|-)?\d*(deg|grad|rad)?"/>
   </restriction>
</simpleType>

<!-- Object type -->
<simpleType name="xgmml:object.type"> 
   <restriction base="NMTOKEN">
          <enumeration value="list"/>
          <enumeration value="string"/>
          <enumeration value="real"/>
          <enumeration value="integer"/>
   </restriction>
</simpleType>

<!-- Global Attributes -->
<attributeGroup name="xgmml:global-atts">
                <attribute name="xgmml:id" type="xgmml:number.type"/>
                <attribute name="xgmml:name" type="xgmml:string.type"/>
                <attribute name="xgmml:label" type="xgmml:string.type"/>
                <attribute name="xgmml:labelanchor" type="xgmml:string.type"/>
</attributeGroup>

<!-- Standard XML Attributes -->
<attributeGroup name="xgmml:xml-atts">
                <attribute name="xmlns" type="string" use="fixed"
                           value="http://www.cs.rpi.edu/XGMML"/>
                <attributeGroup ref="xml:lang"/>
                <attributeGroup ref="xml:space"/>
</attributeGroup>

<!-- Standard XLink Attributes -->
<!-- XLink type values -->
<simpleType name="xgmml:xlink.type">
   <restriction base="NMTOKEN">
          <enumeration value="simple"/>
          <enumeration value="extended"/>
          <enumeration value="locator"/>
          <enumeration value="arc"/>
   </restriction>
</simpleType>

<!-- XLink show values -->
<simpleType name="xgmml:xlink.show"> 
   <restriction base="NMTOKEN">
          <enumeration value="new"/>
          <enumeration value="embed"/>
          <enumeration value="replace"/>
   </restriction>
</simpleType>

<!-- XLink actuate values -->
<simpleType name="xgmml:xlink.actuate"> 
   <restriction base="NMTOKEN">
          <enumeration value="onLoad"/>
          <enumeration value="onRequest"/>
   </restriction>
</simpleType>

<!-- Attributes of XLink -->
<attributeGroup name="xgmml:xlink-atts">
                <attribute name="xmlns:xlink" type="string" use="fixed"
                           value="http://www.w3.org/1999/xlink"/>
                <attribute name="xlink:type" type="xgmml:xlink.type"
                           use="default" value="simple"/>
                <attribute name="xlink:role" type="string"/>
                <attribute name="xlink:title" type="string"/>
                <attribute name="xlink:show" type="xgmml:xlink.show" 
                           use="default" value="replace"/>
                <attribute name="xlink:actuate" type="xgmml:xlink.actuate" 
                           use="default" value="onRequest"/>
                <attribute name="xlink:href" type="xgmml:uri.type"/>
</attributeGroup>

<!-- Safe Graph Attributes -->
<attributeGroup name="xgmml:graph-atts-safe">
                <attribute name="xgmml:directed" type="xgmml:boolean.type" 
                           use="default" value="0"/>
</attributeGroup>

<!-- Unsafe Graph Attributes (GML) -->
<attributeGroup name="xgmml:graph-atts-gml-unsafe">
                <attribute name="xgmml:Vendor" type="xgmml:string.type"/>
</attributeGroup>

<!-- Unsafe Graph Attributes (new attributes) (Graphics attributes) -->
<attributeGroup name="xgmml:graph-atts-app-unsafe-gr">
                <attribute name="xgmml:Scale" type="integer"/>
                <attribute name="xgmml:Layout" type="xgmml:string.type"/>
                <attribute name="xgmml:Graphic" type="xgmml:boolean.type"/>
</attributeGroup>

<!-- Unsafe Graph Attributes (new attributes) (Structural attributes) -->
<attributeGroup name="xgmml:graph-atts-app-unsafe-ngr">
                <attribute name="xgmml:Rootnode" type="xgmml:number.type"/>
</attributeGroup>

<!-- Simple Graph (Structural graph) -->
<complexType name="xgmml:simpleGraph">
   <sequence>
      <element ref="xgmml:att" minOccurs="0" maxOccurs="unbounded"/>
      <choice minOccurs="0" maxOccurs="unbounded"> 
            <element ref="xgmml:node"/>
            <element ref="xgmml:edge"/>
      </choice>
      <element ref="xgmml:att" minOccurs="0" maxOccurs="unbounded"/>
   </sequence>
      <attributeGroup ref="xgmml:global-atts"/>
      <attributeGroup ref="xgmml:graph-atts-safe"/>
      <attributeGroup ref="xgmml:graph-atts-gml-unsafe"/>
      <attributeGroup ref="xgmml:graph-atts-app-unsafe-ngr"/>
</complexType>

<!-- Graphical Graph "is a" Simple Graph -->
<complexType name="xgmml:graphicGraph">
   <complexContent>
     <extension base="xgmml:simpleGraph"> 
       <attributeGroup ref="xgmml:graph-atts-app-unsafe-gr"/>
     </extension>
   </complexContent>
</complexType>

<!-- Graph Element -->
<element name="xgmml:graph" type="xgmml:graphicGraph"/>

<!-- Safe Node Attributes (GML) -->
<attributeGroup name="xgmml:node-atts-gml-safe">
                <attribute name="xgmml:edgeanchor" type="xgmml:string.type"/>
</attributeGroup>

<!-- Safe Node Attributes (new attributes) -->
<attributeGroup name="xgmml:node-atts-app-safe">
                <attribute name="xgmml:weight" type="xgmml:string.type"/>
</attributeGroup>

<!-- Simple Node (Structural Node) -->
<complexType name="xgmml:simpleNode">
   <sequence>
      <element ref="xgmml:att" minOccurs="0" maxOccurs="unbounded"/>
   </sequence>
      <attributeGroup ref="xgmml:global-atts"/>
      <attributeGroup ref="xgmml:node-atts-app-safe"/>
</complexType>

<!-- Graphical Node "is a" Simple Node -->
<complexType name="xgmml:graphicNode"> 
  <complexContent>
    <extension base="xgmml:simpleNode">
       <sequence>
          <element ref="xgmml:graphics" minOccurs="0"/>
       </sequence>
      <attributeGroup ref="xgmml:node-atts-gml-safe"/>
    </extension>
  </complexContent>
</complexType>

<!-- Node Element -->
<element name="xgmml:node" type="xgmml:graphicNode"/>

<!-- Safe Edge Attributes (GML) -->
<attributeGroup name="xgmml:edge-atts-gml-safe">
    <attribute name="xgmml:source" type="xgmml:number.type" use="required"/>
    <attribute name="xgmml:target" type="xgmml:number.type" use="required"/>
</attributeGroup>

<!-- Safe Edge Attributes (new attributes) -->
<attributeGroup name="xgmml:edge-atts-app-safe">
                <attribute name="xgmml:weight" type="xgmml:string.type"/>
</attributeGroup>

<!-- Simple Edge (Structural Edge) -->
<complexType name="xgmml:simpleEdge">
   <sequence>
      <element ref="xgmml:att" minOccurs="0" maxOccurs="unbounded"/>
   </sequence>
      <attributeGroup ref="xgmml:global-atts"/>
      <attributeGroup ref="xgmml:edge-atts-gml-safe"/>
      <attributeGroup ref="xgmml:edge-atts-app-safe"/>
</complexType>

<!-- Graphical Edge "is a" Simple Edge -->
<complexType name="xgmml:graphicEdge">
   <complexContent>      
     <extension base="xgmml:simpleEdge">
       <sequence>
         <element ref="xgmml:graphics" minOccurs="0"/>
       </sequence>
     </extension>
   </complexContent>
</complexType>

<!-- Edge Element -->
<element name="xgmml:edge" type="xgmml:graphicEdge"/>

<!-- Graphics Type  -->
<attributeGroup name="xgmml:graphics-type-att">
                <attribute name="xgmml:type" type="xgmml:type-graphics.type"/>
</attributeGroup>

<!-- Point Attributes (x,y,z)  -->
<attributeGroup name="xgmml:point-atts">
                <attribute name="xgmml:x" type="double"/>
                <attribute name="xgmml:y" type="double"/>
                <attribute name="xgmml:z" type="double"/>
</attributeGroup>

<!-- Dimension Attributes (width,height,depth)  -->
<attributeGroup name="xgmml:dimension-atts">
                <attribute name="xgmml:w" type="double"/>
                <attribute name="xgmml:h" type="double"/>
                <attribute name="xgmml:d" type="double"/>
</attributeGroup>

<!-- External Attributes (Image and Bitmap)  -->
<attributeGroup name="xgmml:external-atts">
                <attribute name="xgmml:image" type="xgmml:uri.type"/>
                <attribute name="xgmml:bitmap" type="xgmml:uri.type"/>
</attributeGroup>

<!-- Line Attributes -->
<attributeGroup name="xgmml:line-atts">
                <attribute name="xgmml:width" type="xgmml:number.type"/>
                <attribute name="xgmml:arrow" type="xgmml:arrow.type"/>
                <attribute name="xgmml:capstyle" type="xgmml:capstyle.type"/>
                <attribute name="xgmml:joinstyle" type="xgmml:joinstyle.type"/>
                <attribute name="xgmml:smooth" type="xgmml:boolean.type"/>
                <attribute name="xgmml:splinesteps" type="xgmml:number.type"/>
</attributeGroup>

<!-- Text Attributes -->
<attributeGroup name="xgmml:text-atts">
                <attribute name="xgmml:justify" type="xgmml:justify.type"/>
                <attribute name="xgmml:font" type="xgmml:font.type"/>
</attributeGroup>

<!-- Bitmap Attributes -->
<attributeGroup name="xgmml:bitmap-atts">
                <attribute name="xgmml:background" type="xgmml:color.type"/>
                <attribute name="xgmml:foreground" type="xgmml:color.type"/>
</attributeGroup>

<!-- Arc Attributes -->
<attributeGroup name="xgmml:arc-atts">
                <attribute name="xgmml:extent" type="integer"/>
                <attribute name="xgmml:start" type="integer"/>
                <attribute name="xgmml:style" type="xgmml:arcstyle.type"/>
</attributeGroup>

<!-- Graphical Object Attributes -->
<attributeGroup name="xgmml:object-atts">
                <attribute name="xgmml:stipple" type="xgmml:string.type"/>
                <attribute name="xgmml:visible" type="xgmml:boolean.type"/>
                <attribute name="xgmml:fill" type="xgmml:color.type"/>
                <attribute name="xgmml:outline" type="xgmml:color.type"/>
                <attribute name="xgmml:anchor" type="xgmml:anchor.type"/>
</attributeGroup>

<!-- Graphics Element -->
<element name="xgmml:graphics">
  <complexType>
     <sequence>
         <choice minOccurs="0" maxOccurs="1">
            <element ref="xgmml:Line"/>
            <element ref="xgmml:center"/>
         </choice>
         <element ref="xgmml:att" minOccurs="0" maxOccurs="unbounded"/>
     </sequence>
         <attributeGroup ref="xgmml:graphics-type-att"/>
         <attributeGroup ref="xgmml:point-atts"/>
         <attributeGroup ref="xgmml:dimension-atts"/>
         <attributeGroup ref="xgmml:external-atts"/>
         <attributeGroup ref="xgmml:line-atts"/>
         <attributeGroup ref="xgmml:text-atts"/>
         <attributeGroup ref="xgmml:bitmap-atts"/>
         <attributeGroup ref="xgmml:arc-atts"/>
         <attributeGroup ref="xgmml:object-atts"/>
     </complexType>
</element>

<!-- Center Point Element -->
<element name="xgmml:center">
   <complexType>
         <attributeGroup ref="xgmml:point-atts"/>
  </complexType>
</element>

<!-- Line Element -->
<element name="xgmml:Line">
   <complexType>
      <sequence>
           <element ref="xgmml:point" minOccurs="2" maxOccurs="unbounded"/>
      </sequence>
   </complexType>
</element>

<!-- Point Element -->
<element name="xgmml:point">
   <complexType> 
         <attributeGroup ref="xgmml:point-atts"/>
  </complexType>
</element>

<!-- Value Attribute -->
<attributeGroup name="xgmml:attribute-value">
                <attribute name="xgmml:value" type="xgmml:string.type"/>
</attributeGroup>

<!-- Type Attribute -->
<attributeGroup name="xgmml:attribute-type">
                <attribute name="xgmml:type" type="xgmml:object.type"/>
</attributeGroup>

<!-- Att Element -->
<element name="xgmml:att">
     <complexType mixed="true">
       <sequence>
         <element ref="xgmml:att" minOccurs="0" maxOccurs="unbounded"/>
         <element ref="xgmml:graph" minOccurs="0" maxOccurs="unbounded"/>
       </sequence>
         <attributeGroup ref="xgmml:global-atts"/>
         <attributeGroup ref="xgmml:attribute-value"/>
         <attributeGroup ref="xgmml:attribute-value"/>
     </complexType>
</element>

</schema>

D. XGMML Examples

D.1 Graph file in GML format  and  XGMML format.

This GML example is taken from the GML web site: http://infosun.fmi.uni-passau.de/Graphlet/GML/example1.html.

GML Format

graph [
    comment "This is a sample graph"
    directed 1
    id 42
    label "Hello, I am a graph"
    node [
        id 1
        label "Node 1"
    ]
    node [
        id 2
        label "node 2"
    ]
    node [
        id 3
        label "node 3"
    ]
    edge [
        source 1
        target 2
        label "Edge from node 1 to node 2"
    ]
    edge [
        source 2
        target 3
        label "Edge from node 2 to node 3"
    ]
    edge [
        source 3
        target 1
        label "Edge from node 3 to node 1"
    ]
]
XGMML Format
<?xml version="1.0"?>
<!DOCTYPE graph PUBLIC "-//John Punin//DTD graph description//EN" "http://www.cs.rpi.edu/~puninj/XGMML/xgmml.dtd">
<graph directed="1" id="42" label="Hello, I am a graph">
<node id="1" label="Node 1">
</node>
<node id="2" label="node 2">
</node>
<node id="3" label="node 3">
</node>
<edge source="1" target="2" label="Edge from node 1 to node 2">
</edge>
<edge source="2" target="3" label="Edge from node 2 to node 3">
</edge>
<edge source="3" target="1" label="Edge from node 3 to node 1">
</edge>
</graph>

D.2 XGMML graph file with graphics information.

<?xml version="1.0"?>
<!DOCTYPE graph PUBLIC "-//John Punin//DTD graph description//EN" "http://www.cs.rpi.edu/~puninj/XGMML/xgmml.dtd">

<graph directed="1" graphic="1" Layout="points">
<node id="1" label="Node 1"
         weight="0">
<graphics type="rhombus" x="270" y="90" >
</graphics>
</node>
<node id="2" label="node 2"
         weight="0">
<graphics type="ver_ellipsis" x="350" y="190" >
</graphics>
</node>
<node id="3" label="node 3"
         weight="0">
<graphics type="circle" x="190" y="190" >
</graphics>
</node>
<edge source="3" target="1" weight="0" 
label="Edge from node 3 to node 1" >
</edge>
<edge source="1" target="2" weight="0" 
label="Edge from node 1 to node 2" >
</edge>
<edge source="2" target="3" weight="0" 
label="Edge from node 2 to node 3" >
</edge>
</graph>

D.3 XGMML graph file of a simple website.

<?xml version="1.0"?>
<!DOCTYPE graph SYSTEM "xgmml.dtd">
<graph directed="1" Rootnode="1">
<node id="58" label="http://www.deitel.com/products_and_services/publications/jhtp2.htm" weight="-1">
</node>
<node id="57" label="http://www.inquiry.com/techtips/java_pro/" weight="-1">
</node>
<node id="56" label="http://java.sun.com/products/jdk/1.1/docs/api/packages.html" weight="-1">
</node>
<node id="55" label="http://www.gamelan.com/" weight="-1">
</node>
<node id="54" label="http://java.sun.com/" weight="-1">
</node>
<node id="53" label="http://www.yahoo.com/Computers_and_Internet/Programming_Languages/Java/" weight="-1">
</node>
<node id="52" label="http://www.cs.rpi.edu/~puninj/JAVA/tests/esum98.html" weight="8025">
<att name="title" value="Java Exam"/>
<att name="mime" value="text/html"/>
<att name="size" value="8025"/>
<att name="date" value="Tue Sep 29 14:55:04 1998"/>
<att name="code" value="200"/>
</node>
<node id="51" label="http://www.cs.rpi.edu/~puninj/JAVA/projects/proj1.html" weight="1910">
<att name="title" value="Project 1"/>
<att name="mime" value="text/html"/>
<att name="size" value="1910"/>
<att name="date" value="Wed Jun  9 23:01:06 1999"/>
<att name="code" value="200"/>
</node>
<node id="50" label="http://www.cs.rpi.edu/~puninj/JAVA/homeworks/hw2.html" weight="2795">
<att name="title" value="Homework 2"/>
<att name="mime" value="text/html"/>
<att name="size" value="2795"/>
<att name="date" value="Sun May 30 22:28:52 1999"/>
<att name="code" value="200"/>
</node>
<node id="49" label="http://www.cs.rpi.edu/~puninj/JAVA/homeworks/hw1.html" weight="3157">
<att name="title" value="Homework 1"/>
<att name="mime" value="text/html"/>
<att name="size" value="3157"/>
<att name="date" value="Wed May 19 10:40:54 1999"/>
<att name="code" value="200"/>
</node>
<node id="48" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec4.ppt" weight="53760">
<att name="title" value="No title"/>
<att name="mime" value="application/vnd.ms-powerpoint"/>
<att name="size" value="53760"/>
<att name="date" value="Mon Sep 14 13:22:26 1998"/>
<att name="code" value="200"/>
</node>
<node id="47" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec4.rtf" weight="26048">
<att name="title" value="No title"/>
<att name="mime" value="text/rtf"/>
<att name="size" value="26048"/>
<att name="date" value="Mon Sep 14 13:22:29 1998"/>
<att name="code" value="200"/>
</node>
<node id="46" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec4.ps" weight="211388">
<att name="title" value="No title"/>
<att name="mime" value="application/postscript"/>
<att name="size" value="211388"/>
<att name="date" value="Mon Sep 14 13:34:29 1998"/>
<att name="code" value="200"/>
</node>
<node id="45" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec4.html" weight="9192">
<att name="title" value="Programming in Java:  Lecture Notes 4"/>
<att name="mime" value="text/html"/>
<att name="size" value="9192"/>
<att name="date" value="Mon Oct 26 02:17:24 1998"/>
<att name="code" value="200"/>
</node>
<node id="44" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec3.ppt" weight="169984">
<att name="title" value="No title"/>
<att name="mime" value="application/vnd.ms-powerpoint"/>
<att name="size" value="169984"/>
<att name="date" value="Sat Aug 29 00:37:59 1998"/>
<att name="code" value="200"/>
</node>
<node id="43" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec3.rtf" weight="93603">
<att name="title" value="No title"/>
<att name="mime" value="text/rtf"/>
<att name="size" value="93603"/>
<att name="date" value="Sat Aug 29 00:38:03 1998"/>
<att name="code" value="200"/>
</node>
<node id="42" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec3.ps" weight="539469">
<att name="title" value="No title"/>
<att name="mime" value="application/postscript"/>
<att name="size" value="539469"/>
<att name="date" value="Sat Aug 29 00:38:02 1998"/>
<att name="code" value="200"/>
</node>
<node id="41" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec3.html" weight="40702">
<att name="title" value="Programming in Java : Lecture Notes 3"/>
<att name="mime" value="text/html"/>
<att name="size" value="40702"/>
<att name="date" value="Wed Apr  7 12:00:44 1999"/>
<att name="code" value="200"/>
</node>
<node id="40" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec2.ppt" weight="86016">
<att name="title" value="No title"/>
<att name="mime" value="application/vnd.ms-powerpoint"/>
<att name="size" value="86016"/>
<att name="date" value="Sat Aug 29 00:11:44 1998"/>
<att name="code" value="200"/>
</node>
<node id="39" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec2.rtf" weight="33351">
<att name="title" value="No title"/>
<att name="mime" value="text/rtf"/>
<att name="size" value="33351"/>
<att name="date" value="Sat Aug 29 00:11:52 1998"/>
<att name="code" value="200"/>
</node>
<node id="38" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec2.ps" weight="165658">
<att name="title" value="No title"/>
<att name="mime" value="application/postscript"/>
<att name="size" value="165658"/>
<att name="date" value="Sat Aug 29 00:14:24 1998"/>
<att name="code" value="200"/>
</node>
<node id="37" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec2.html" weight="11174">
<att name="title" value="Programming In Java : Lecture Notes 2"/>
<att name="mime" value="text/html"/>
<att name="size" value="11174"/>
<att name="date" value="Wed Sep  2 23:10:32 1998"/>
<att name="code" value="200"/>
</node>
<node id="36" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec1.ppt" weight="48640">
<att name="title" value="No title"/>
<att name="mime" value="application/vnd.ms-powerpoint"/>
<att name="size" value="48640"/>
<att name="date" value="Sat Aug 29 00:11:43 1998"/>
<att name="code" value="200"/>
</node>
<node id="35" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec1.rtf" weight="14871">
<att name="title" value="No title"/>
<att name="mime" value="text/rtf"/>
<att name="size" value="14871"/>
<att name="date" value="Sat Aug 29 00:11:51 1998"/>
<att name="code" value="200"/>
</node>
<node id="34" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec1.ps" weight="79558">
<att name="title" value="No title"/>
<att name="mime" value="application/postscript"/>
<att name="size" value="79558"/>
<att name="date" value="Sat Aug 29 00:14:22 1998"/>
<att name="code" value="200"/>
</node>
<node id="33" label="http://www.cs.rpi.edu/~puninj/JAVA/classes/lec1.html" weight="4530">
<att name="title" value="Programming in Java : Lecture Notes 1"/>
<att name="mime" value="text/html"/>
<att name="size" value="4530"/>
<att name="date" value="Wed Sep  2 16:49:15 1998"/>
<att name="code" value="200"/>
</node>
<node id="32" label="http://www.oreilly.com/catalog/jenut/" weight="-1">
</node>
<node id="31" label="http://www.oreilly.com/catalog/javanut2/" weight="-1">
</node>
<node id="30" label="http://www.prenhall.com/allbooks/esm_0138993947.html" weight="-1">
</node>
<node id="29" label="mailto:puninj@rpi.edu" weight="-1">
</node>
<node id="28" label="http://www.cs.rpi.edu/~puninj/JAVA/DEITEL/JHTP2/" weight="-1">
<att name="code" value="404"/>
</node>
<node id="27" label="http://www.rpi.edu/dept/its/consult/www2/WWW/" weight="-1">
</node>
<node id="26" label="http://www.cs.rpi.edu/~puninj/ASHE/help.html" weight="-1">
</node>
<node id="25" label="http://www.cs.rpi.edu/~puninj/ASHE/RCS.html" weight="-1">
</node>
<node id="24" label="http://www.rpi.edu/Computing/Docs/Memos/rpi120/rpi120.html" weight="-1">
</node>
<node id="23" label="http://www.rpi.edu/~ricem4/" weight="-1">
</node>
<node id="22" label="http://www.rpi.edu/~waterj2/" weight="-1">
</node>
<node id="21" label="http://www.rpi.edu/~ludwis/" weight="-1">
</node>
<node id="20" label="http://www.rpi.edu/~obergg/" weight="-1">
</node>
<node id="19" label="http://www.rpi.edu/~milinm/" weight="-1">
</node>
<node id="18" label="http://www.cs.rpi.edu/~puninj/JAVA/index.html" weight="2314">
<att name="title" value="Programming in Java Home Page"/>
<att name="mime" value="text/html"/>
<att name="size" value="2314"/>
<att name="date" value="Thu Jun 10 14:08:41 1999"/>
<att name="code" value="200"/>
</node>
<node id="17" label="mailto:puninj@cs.rpi.edu" weight="-1">
</node>
<node id="16" label="http://www.cs.rpi.edu/" weight="-1">
</node>
<node id="15" label="http://www.rpi.edu/" weight="-1">
</node>
<node id="14" label="http://www.rpi.edu/Bestof/April96/Bestof_April96.html" weight="-1">
</node>
<node id="13" label="http://www.cs.rpi.edu/~puninj/JAVA/toc.html" weight="4407">
<att name="title" value="Programming in Java Table of Contents"/>
<att name="mime" value="text/html"/>
<att name="size" value="4407"/>
<att name="date" value="Thu Jun 10 14:14:55 1999"/>
<att name="code" value="200"/>
</node>
<node id="12" label="http://www.cs.rpi.edu/~puninj/JAVA/hotlist.html" weight="1253">
<att name="title" value="Hot List of Programming in Java"/>
<att name="mime" value="text/html"/>
<att name="size" value="1253"/>
<att name="date" value="Fri Nov  6 15:21:22 1998"/>
<att name="code" value="200"/>
</node>
<node id="11" label="http://www.cs.rpi.edu/~puninj/JAVA/test.html" weight="473">
<att name="title" value="Tests of Programming in Java"/>
<att name="mime" value="text/html"/>
<att name="size" value="473"/>
<att name="date" value="Tue Jan 19 13:38:04 1999"/>
<att name="code" value="200"/>
</node>
<node id="10" label="http://www.cs.rpi.edu/~puninj/JAVA/projects.html" weight="472">
<att name="title" value="Projects of Programming in Java"/>
<att name="mime" value="text/html"/>
<att name="size" value="472"/>
<att name="date" value="Thu Jun 10 14:11:40 1999"/>
<att name="code" value="200"/>
</node>
<node id="9" label="http://www.cs.rpi.edu/~puninj/JAVA/homewk.html" weight="543">
<att name="title" value="Homeworks of Programming in Java"/>
<att name="mime" value="text/html"/>
<att name="size" value="543"/>
<att name="date" value="Thu Jun 10 14:11:41 1999"/>
<att name="code" value="200"/>
</node>
<node id="8" label="http://www.cs.rpi.edu/~puninj/JAVA/classes.html" weight="1375">
<att name="title" value="Classes of Programming in Java"/>
<att name="mime" value="text/html"/>
<att name="size" value="1375"/>
<att name="date" value="Wed Jun  9 22:06:02 1999"/>
<att name="code" value="200"/>
</node>
<node id="7" label="http://www.cs.rpi.edu/~puninj/JAVA/sched.html" weight="1606">
<att name="title" value="Schedule of Programming in Java"/>
<att name="mime" value="text/html"/>
<att name="size" value="1606"/>
<att name="date" value="Mon May 17 17:20:55 1999"/>
<att name="code" value="200"/>
</node>
<node id="6" label="http://www.cs.rpi.edu/~puninj/JAVA/syllabus.html" weight="8357">
<att name="title" value="Syllabus"/>
<att name="mime" value="text/html"/>
<att name="size" value="8357"/>
<att name="date" value="Tue May 18 11:42:14 1999"/>
<att name="code" value="200"/>
</node>
<node id="5" label="http://www.cs.rpi.edu/~puninj/JAVA/announ.html" weight="1297">
<att name="title" value="Announcements of Programming in Java"/>
<att name="mime" value="text/html"/>
<att name="size" value="1297"/>
<att name="date" value="Thu Jun 10 14:17:23 1999"/>
<att name="code" value="200"/>
</node>
<node id="4" label="http://www.cs.rpi.edu/~puninj/JAVA/students.html" weight="2010">
<att name="title" value="Programming in Java - Groups"/>
<att name="mime" value="text/html"/>
<att name="size" value="2010"/>
<att name="date" value="Tue Apr  6 14:57:35 1999"/>
<att name="code" value="200"/>
</node>
<node id="3" label="http://www.cs.rpi.edu/~puninj/JAVA/ta.html" weight="614">
<att name="title" value="Programming in Java Table of Contents"/>
<att name="mime" value="text/html"/>
<att name="size" value="614"/>
<att name="date" value="Thu May 20 11:27:37 1999"/>
<att name="code" value="200"/>
</node>
<node id="2" label="http://www.cs.rpi.edu/~puninj/" weight="-1">
</node>
<node id="1" label="http://www.cs.rpi.edu/~puninj/JAVA/" weight="2314">
<att name="title" value="Programming in Java Home Page"/>
<att name="mime" value="text/html"/>
<att name="size" value="2314"/>
<att name="date" value="Thu Jun 10 14:08:41 1999"/>
<att name="code" value="200"/>
</node>
<edge label="SRC IMG ../icon/lfarrw.gif" source="51" target="18">
</edge>
<edge label="SRC IMG ../icon/lfarrw.gif" source="50" target="18">
</edge>
<edge label="SRC IMG ../../icon/lfarrw.gif" source="49" target="18">
</edge>
<edge label="IMG CS Home Page" source="18" target="16">
</edge>
<edge label="IMG RPI Info" source="18" target="15">
</edge>
<edge label="IMG Best of RPI Info" source="18" target="14">
</edge>
<edge label="IMG TOC" source="18" target="13">
</edge>
<edge label="IMG Hot List" source="18" target="12">
</edge>
<edge label="IMG Exams" source="18" target="11">
</edge>
<edge label="IMG Projects" source="18" target="10">
</edge>
<edge label="IMG Homework" source="18" target="9">
</edge>
<edge label="IMG Classes" source="18" target="8">
</edge>
<edge label="IMG Schedule" source="18" target="7">
</edge>
<edge label="IMG Syllabus" source="18" target="6">
</edge>
<edge label="IMG Announcements" source="18" target="5">
</edge>
<edge label="IMG Students" source="18" target="4">
</edge>
<edge label="IMG Xiaomei Zhang" source="18" target="3">
</edge>
<edge label="IMG John Punin" source="18" target="2">
</edge>
<edge label="SRC IMG icon/lfarrw.gif" source="13" target="18">
</edge>
<edge label="Code Examples from the Java How To Program 2/e Book" source="13" target="28">
</edge>
<edge label="Java How to Program, 2E: Download Examples" source="13" target="58">
</edge>
<edge label="Java How to Program 2/e (Textbook)" source="13" target="30">
</edge>
<edge label="Ask the Java Pro!" source="13" target="57">
</edge>
<edge label="Java Package Index" source="13" target="56">
</edge>
<edge label="Gamelan" source="13" target="55">
</edge>
<edge label="Java Technology Home Page" source="13" target="54">
</edge>
<edge label="Yahoo Index on Java" source="13" target="53">
</edge>
<edge label="Java Exam Summer 1998 (Example)" source="13" target="52">
</edge>
<edge label="Project" source="13" target="51">
</edge>
<edge label="Homework 2" source="13" target="50">
</edge>
<edge label="Homework 1" source="13" target="49">
</edge>
<edge label="powerpoint" source="13" target="48">
</edge>
<edge label="MSWord" source="13" target="47">
</edge>
<edge label="postscript" source="13" target="46">
</edge>
<edge label="Graphics and Graphical User Interfaces" source="13" target="45">
</edge>
<edge label="powerpoint" source="13" target="44">
</edge>
<edge label="MSWord" source="13" target="43">
</edge>
<edge label="postscript" source="13" target="42">
</edge>
<edge label="Classes, Inheritance, Interfaces" source="13" target="41">
</edge>
<edge label="powerpoint" source="13" target="40">
</edge>
<edge label="MSWord" source="13" target="39">
</edge>
<edge label="postscript" source="13" target="38">
</edge>
<edge label="Objects, Classes, Program Constructs" source="13" target="37">
</edge>
<edge label="powerpoint" source="13" target="36">
</edge>
<edge label="MSWord" source="13" target="35">
</edge>
<edge label="postscript" source="13" target="34">
</edge>
<edge label="Introduction" source="13" target="33">
</edge>
<edge label=" Syllabus" source="13" target="6">
</edge>
<edge label="New Class Schedule" source="13" target="7">
</edge>
<edge label="Students Group Page" source="13" target="4">
</edge>
<edge label="Code Examples from the Java How To Program 2/e Book" source="13" target="28">
</edge>
<edge label="Homework 1" source="13" target="9">
</edge>
<edge label="Homework 2" source="13" target="9">
</edge>
<edge label="Project" source="13" target="10">
</edge>
<edge label="John Punin" source="13" target="17">
</edge>
<edge label="John Punin" source="13" target="2">
</edge>
<edge label="SRC IMG icon/lfarrw.gif" source="12" target="18">
</edge>
<edge label="Code Examples from the Java How To Program 2/e Book" source="12" target="28">
</edge>
<edge label="Java How to Program, 2E: Download Examples" source="12" target="58">
</edge>
<edge label="Java How to Program 2/e (Textbook)" source="12" target="30">
</edge>
<edge label="Ask the Java Pro!" source="12" target="57">
</edge>
<edge label="Java Package Index" source="12" target="56">
</edge>
<edge label="Gamelan" source="12" target="55">
</edge>
<edge label="Java Technology Home Page" source="12" target="54">
</edge>
<edge label="Yahoo Index on Java" source="12" target="53">
</edge>
<edge label="SRC IMG icon/lfarrw.gif" source="11" target="18">
</edge>
<edge label="Java Exam Summer 1998 (Example)" source="11" target="52">
</edge>
<edge label="SRC IMG icon/lfarrw.gif" source="10" target="18">
</edge>
<edge label="Project" source="10" target="51">
</edge>
<edge label="SRC IMG icon/lfarrw.gif" source="9" target="18">
</edge>
<edge label="Homework 2" source="9" target="50">
</edge>
<edge label="Homework 1" source="9" target="49">
</edge>
<edge label="SRC IMG icon/lfarrw.gif" source="8" target="18">
</edge>
<edge label="powerpoint" source="8" target="48">
</edge>
<edge label="MSWord" source="8" target="47">
</edge>
<edge label="postscript" source="8" target="46">
</edge>
<edge label="Graphics and Graphical User Interfaces" source="8" target="45">
</edge>
<edge label="powerpoint" source="8" target="44">
</edge>
<edge label="MSWord" source="8" target="43">
</edge>
<edge label="postscript" source="8" target="42">
</edge>
<edge label="Classes, Inheritance, Interfaces" source="8" target="41">
</edge>
<edge label="powerpoint" source="8" target="40">
</edge>
<edge label="MSWord" source="8" target="39">
</edge>
<edge label="postscript" source="8" target="38">
</edge>
<edge label="Objects, Classes, Program Constructs" source="8" target="37">
</edge>
<edge label="powerpoint" source="8" target="36">
</edge>
<edge label="MSWord" source="8" target="35">
</edge>
<edge label="postscript" source="8" target="34">
</edge>
<edge label="Introduction" source="8" target="33">
</edge>
<edge label="SRC IMG icon/lfarrw.gif" source="7" target="18">
</edge>
<edge label="SRC IMG icon/lfarrw.gif" source="6" target="18">
</edge>
<edge label="Java Examples in a Nutshell" source="6" target="32">
</edge>
<edge label="Java in a Nutshell" source="6" target="31">
</edge>
<edge label="Java How To Program 2nd Edition" source="6" target="30">
</edge>
<edge label="http://www.cs.rpi.edu/~puninj/JAVA/" source="6" target="1">
</edge>
<edge label="puninj@cs.rpi.edu" source="6" target="17">
</edge>
<edge label="puninj" source="6" target="29">
</edge>
<edge label="John Punin" source="6" target="2">
</edge>
<edge label="SRC IMG icon/lfarrw.gif" source="5" target="18">
</edge>
<edge label="New Class Schedule" source="5" target="7">
</edge>
<edge label="Students Group Page" source="5" target="4">
</edge>
<edge label="Code Examples from the Java How To Program 2/e Book" source="5" target="28">
</edge>
<edge label="Homework 1" source="5" target="9">
</edge>
<edge label="Homework 2" source="5" target="9">
</edge>
<edge label="Project" source="5" target="10">
</edge>
<edge label="SRC IMG icon/lfarrw.gif" source="4" target="18">
</edge>
<edge label="ITS : &quot;Help page on WWW&quot;" source="4" target="27">
</edge>
<edge label="ASHE help file" source="4" target="26">
</edge>
<edge label="ASHE (A Simple HTML Editor) on RCS workstations." source="4" target="25">
</edge>
<edge label="Creating On-Line Documents in RPInfo on the World Wide Web" source="4" target="24">
</edge>
<edge label="Matthew Rice" source="4" target="23">
</edge>
<edge label="Jeremy Waterfall" source="4" target="22">
</edge>
<edge label="Steve Ludwig" source="4" target="21">
</edge>
<edge label="Greg Oberg" source="4" target="20">
</edge>
<edge label="Matthew Miling" source="4" target="19">
</edge>
<edge source="4" target="17">
</edge>
<edge label="puninj@cs.rpi.edu" source="4" target="17">
</edge>
<edge label="SRC IMG icon/lfarrw.gif" source="3" target="18">
</edge>
<edge label="John Punin (puninj@cs.rpi.edu)" source="3" target="17">
</edge>
<edge label="IMG CS Home Page" source="1" target="16">
</edge>
<edge label="IMG RPI Info" source="1" target="15">
</edge>
<edge label="IMG Best of RPI Info" source="1" target="14">
</edge>
<edge label="IMG TOC" source="1" target="13">
</edge>
<edge label="IMG Hot List" source="1" target="12">
</edge>
<edge label="IMG Exams" source="1" target="11">
</edge>
<edge label="IMG Projects" source="1" target="10">
</edge>
<edge label="IMG Homework" source="1" target="9">
</edge>
<edge label="IMG Classes" source="1" target="8">
</edge>
<edge label="IMG Schedule" source="1" target="7">
</edge>
<edge label="IMG Syllabus" source="1" target="6">
</edge>
<edge label="IMG Announcements" source="1" target="5">
</edge>
<edge label="IMG Students" source="1" target="4">
</edge>
<edge label="IMG Xiaomei Zhang" source="1" target="3">
</edge>
<edge label="IMG John Punin" source="1" target="2">
</edge>
</graph>

D.3 XGMML graph file with self loops and parallel edges.

<?xml version="1.0"?>
<!DOCTYPE graph SYSTEM "xgmml.dtd">
<!-- Graph File Generated for GraphPack 2.0 -->
<graph directed="1" graphic="1" Layout="points">
<node id="1" label="1"
         weight="0">
<graphics type="circle" x="250" y="90" >
</graphics>
</node>
<node id="2" label="2"
         weight="0">
<graphics type="circle" x="190" y="150" >
</graphics>
</node>
<node id="3" label="3"
         weight="0">
<graphics type="circle" x="330" y="150" >
</graphics>
</node>
<node id="6" label="6"
         weight="0">
<graphics type="circle" x="270" y="230" >
</graphics>
</node>
<edge source="1" target="1" weight="1" >
</edge>
<edge source="1" target="2" weight="0" >
</edge>
<edge source="6" target="2" weight="4" >
</edge>
<edge source="1" target="3" weight="0" >
</edge>
<edge source="1" target="3" weight="2" >
</edge>
<edge source="2" target="3" weight="6" >
</edge>
<edge source="3" target="6" weight="0" >
</edge>
<edge source="1" target="6" weight="0" >
</edge>
</graph>

D.4 XGMML graph file with subgraphs.

<?xml version="1.0"?>
<!DOCTYPE graph SYSTEM "http://www.cs.rpi.edu/~puninj/XGMML/xgmml.dtd">
<graph directed="1">
<node id="1" label="n1">
<att>
<graph directed="1">
<node id="11" label="n11"/>       
<node id="12" label="n12"/>       
<edge source="11" target="12" weight="0"/>
</graph>
</att>
</node>
<node id="2" label="n2">
<att>
<graph directed="1">
<node id="21" label="n21"/>       
<node id="22" label="n22"/>       
<edge source="22" target="21" weight="0"/>
<edge source="21" target="22" weight="0"/>
</graph>
</att>
</node>
<edge source="11" target="21" weight="0"/>
<edge source="12" target="22" weight="0"/>
<edge source="21" target="11" weight="0"/>
<edge source="22" target="11" weight="0"/>
<edge source="22" target="12" weight="0"/>
</graph>

E. XGMML Internet Media Type

The recommended Internet Media Type (MIME type) for  XGMML Document is "application/xgmml" . The suffix ".gr" is recommended for XGMML files.

F. References

[CSS2]
"Cascading Style Sheets, level 2", B. Bos, H. W. Lie, C. Lilley, I. Jacobs, 12 May 1998.
URL: http://www.w3.org/TR/REC-CSS2
[DC]
Dublin Core Metadata for Resource Discovery, Internet RFC 2413.
URL: http://www.ietf.org/rfc/rfc2413.txt
URL: http://purl.oclc.org/dc/
[GML]
The GML File Format, Michael Himsolt, 1997.
URL: http://infosun.fmi.uni-passau.de/Graphlet/GML/
[ISO 639]
(International Organization for Standardization). ISO 639:1988 (E). Code for the representation of names of languages. [Geneva]: International Organization for Standardization, 1988.
[RDF]
Resource Description Framework (RDF) Model and Syntax Specification World Wide Web Consortium.
URL: http://www.w3.org/TR/REC-rdf-syntax
[RFC1630]
"Universal Resource Identifiers in WWW", T. Berners-Lee, L, June 1994
URL: http://www.ietf.org/rfc/rfc1630.txt
[RFC1738]
"Uniform Resource Locators", T. Berners-Lee, L. Masinter, and M. McCahill, December 1994.
URL: http://www.ietf.org/rfc/rfc1738.txt
[RFC1808]
"Relative Uniform Resource Locators", R. Fielding, June 1995.
URL: http://www.ietf.org/rfc/rfc1808.txt
[UTR20]
"Unicode in XML and other Markup Languages", Martin Dürst and Asmus Freytag, 23 June 2000.
URL:http://www.unicode.org/unicode/reports/tr20/
[VCARD]
vCard MIME Directory Profile, F. Dawson and T. Howes, Internet RFC 2426, September 1998.
URL: http://www.ietf.org/rfc/rfc2426.txt
URL: http://www.imc.org/pdi/vcardwhite.html
[XHTML-1.0]
"XHTML[tm] 1.0: The Extensible HyperText Markup Language"  W3C Recommendation , 26 January 1998. URL: http://www.w3.org/TR/xhtml1
[XLINK]
"XML Linking Language (XLink)", S. DeRose, E. Maler, D. Orchard,  B. Trafford editors, 21 February 2000.
URL: http://www.w3.org/TR/xlink
[XML-1.0]
"Extensible Markup Language (XML) 1.0" T. Bray, J. Paoli, C.M. Sperberg-McQueen, editors, 10 February 1998.
URL: http://www.w3.org/TR/REC-xml
[XML-NS]
"Namespaces in XML" T. Bray, D. Hollander, A. Layman, editors, 14 January 1999.
URL: http://www.w3.org/TR/REC-xml-names.
[XML-SCHEMA]
"XML Schema Part 1: Structures" H. Thompson, D. Beech, M. Maloney, N. Mendelsohn editors, 25 February 2000.
URL: http://www.w3.org/TR/xmlschema-1
"XML Schema Part 2: Datatypes" P. Biron and A. Malhotra editors, 25 February 2000.
URL:http://www.w3.org/TR/xmlschema-2