|
Ric Holt
, Andy
Schürr, Susan
Elliott Sim, Andreas
Winter
Graph eXchange Language |
|||||||
|
|
||||||||
![]() Background Graph Model Examples ![]() DTD ![]() Metaschema ![]() Tools Publications Links ![]() Change Requests Future
|
GXL 1.1 Graph Module (alpha release, December 6, 2002) uncommented document type definition: gxl-1.1.dtd, gxl-1.1_attribute.dtd, gxl-1.1_graph.dtd copyright by Andy SchuerrGXL has been developed to be an open standard. No licensing or other legal arrangements are required for its use, whether commercial and non-commercial. The specification of GXL is copyright by its authors, to allow control of its evolution. The specification can be reproduced and used without charge, but with explicit acknowledgement of its authors. --> <!-- Extensions --><!ENTITY % graph-extension "" ><!ENTITY % node-extension "" > <!ENTITY % edge-extension "" > <!ENTITY % rel-extension "" > <!ENTITY % relend-extension "" > <!ENTITY % graph-attr-extension "" > <!ENTITY % node-attr-extension "" > <!ENTITY % edge-attr-extension "" > <!ENTITY % rel-attr-extension "" > <!ENTITY % relend-attr-extension "" > <!--
Extending GXL by redefining these macros facilitates specializations of GXL e.g. for graph transformation and graph drawing. Warning: Using extensions results
in a DTD that deviates from the predefined GXL standard. In general, extensions
are not supported by GXL tools and should be used with care.
<!-- graph --><!ELEMENT graph (attr* , ( node | edge | rel )* %graph-extension;) >
<!--
A graph may link to its schema, which is accessible by following the link defined in its (optional) type-attribute. GXL requires that the resource which is accessible by this link is a schema graph document (i.e. a GXL graph matching the GXL meta schema). A graph contains a possibly empty list of attributes, and a possibly empty list of nodes, edges, or relations. A role may be specified for graph, for example, if it is a component of a hierarchical graph. By redefining %graph-extension; further
sub-elements may be added to graph
elements. Further attributes of graphs can be added by redefining %graph-attr-extension;.
<!-- node -->
<!ATTLIST node id ID #REQUIRED type CDATA #IMPLIED
> <!--
A node may link to its type using the link defined in its (optional) type attribute. Type-links in graph-elements are local links within the schema-document that is linked via the graph's type-link. Thus, the type attribute for nodes, edges and rels may only be used if it is used for graph as well. GXL requires the target element to define a node type in the corresponding schema graph. Finally, a node has a node unique identifier id. By redefining %node-extension; further
sub elements may be added to node elements.
Further attributes of node elements can be added by redefining %node-attr-extension;.
<!-- edge --><!ELEMENT edge (attr*, (graph|graphref)* %edge-extension;) ><!ATTLIST edge id ID #IMPLIED type CDATA #IMPLIED
fromorder CDATA #IMPLIED toorder CDATA #IMPLIED isdirected ( true | false ) #IMPLIED %edge-attr-extension; > <!--
An edge may link to its type, which is accessible by following the link defined in its (optional) type attribute. The type-link is a local link within the graph-schema-document. This attribute may only be used in combination with the type attribut of the graph element. GXL requires the target element to define an edge type in the corresponding schema graph. Each edge contains a possibly empty list of attributes, and an optional list of graphs. The two graph elements (node, edge, relation) connected by an edge are accessed by following the reference defined in the from- and to-attributes. GXL only allows from/to connections within the same GXL graph element, including components of hierarchical graphs. Those edges point from the graph element referenced in the from attribute to the graph element referenced in the to attributes. In ordered graphs, the ordering of incidences is recorded using the fromorder and toorder attributes. The order of incidence on the entity that the edge came from is given by the fromorder, and the order of incidence on the entity that the edge is going to is given toorder attribute. Since incidence information is stored on the edges (and relends), the collection of values in the fromorder and toorder attributes of all edges (and endorder attributes of all relends) incident to a node must define a proper ordering of these incidences. The values of fromorder and toorder are required to be numbers. The isdirected attribute is used to specify an edgemode (directed or undirected) for an edge, overwriting the default edgemode (defaultDirected attribute) of the surrounding graph element. Graph elements or graphref elements are associated with an edge to represent graphs on a lower level of hierarchy. An edge can be associated with multiple child graphs. Their structure has to follow the graph class specifying the type of the sub graph. By redefining %edge-extension; further
sub-elements may be added to edge elements.
Further attributes of edge elements can be added by redefining %edge-attr-extension;.
<!-- rel --><!ELEMENT rel (attr*, (graph|graphref)*, relend* %rel-extension;) ><!ATTLIST rel id ID #IMPLIED type CDATA #IMPLIED
%rel-attr-extension; > <!--
A rel may link to its type, which is accessible by following the link defined in its (optional) type element. The type-link is a lokal link within the schema-document. This attribute may only be used in combination with the type-attribute of the according graph element. GXL requires that the element which is accessible by the type-link defines a relation type in the corresponding schema graph. Each rel contains a possibly empty list of attributes, an optional list of graphs or graphrefs, and a possibly empty list of incident relation ends (relend). These relends are often also called "tentacles" (or "columns" by a database designer). GXL distinguishes between incoming and outgoing relends. Further sub-elements may be added to relation elements, by redefining %rel-extension; . The isdirected attribute is used to specify an edgemode (directed or undirected) for a relation, overwriting the default edgemode (defaultDirected attribute) of the surrounding graph element. Graph elements or graphref elements associated to a relation represent graphs on a lower level of hierarchy. An relation can be associated with multiple child graphs. Their structure has to follow the graph class specifying the type of the sub graph. By redefining %rel-extension; further
sub-elements may be added to rel elements.
Further attributes (of relation elements) can be added by redefining
%rel-attr-extension;.
<!-- relend --><!ELEMENT relend (attr* %relend-extension;) ><!ATTLIST relend target IDREF #REQUIRED role NMTOKEN #IMPLIED direction ( in | out | none) #IMPLIED startorder CDATA #IMPLIED endorder CDATA #IMPLIED %relend-attr-extension; > <!--
A relend may have its own attributes. Further sub-elements may be added to relend elements by redefining %relend-extension;. A single relend element defines an incidence together with its optional role (name/tentacle/relend name) and direction according the covering relation element. GXL distinguishes between incoming and outgoing relends. Relends with direction = "in" model tentacles pointing into the relation, and relends with direction = "out" model tentacles pointing out of the relation. Missing direction value or direction = "none" indicates undirected tentacles. A direction attribute is required for relends contained in a relation element with isdirected = "true". They are ignored for those relends contained in a relation element with isdirected ="false". The same holds for those relations whose orientation is inherited from the surrounding graph element. The target attribute refers to those graph elements which are incident to the parent rel. To facilitate relations between edges and rel's the references are not restricted to node elements only. Here GXL provides node, edge and rel elements. The ordering of relends according their target (association end) is given by the endorder attribute. The ordering of relends according their incident relation (association start) is given by the startorder attribute. The incidence order for a given node is given in by the collection of all endorder attributes of relends (and fromorder and toorder attributes of edges) incident to a the node; these attributes together must define a proper ordering of incidences. Analogously, all values of startorder attributes of relends incident to a given relation have to define a proper ordering. The values of startorder and endorder must be numbers. Further attributes (of relend elements) can be added by redefining
%relend-attr-extension;.
<!-- (O. Heinen - December 6, 2002) -->. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
|||||||
|
||||||||
|
July 17, 2002
[change log] |
|
|||||||