1 <!-- Graph Specification dtd -->
2 <!-- Centrum voor Wiskunde en Informatica (CWI) -->
4 Copyright Stichting Mathematisch Centrum 2000
6 Permission to use and distribute this software and its
7 documentation for any purpose is hereby granted without fee, provided that
8 the above copyright notice, author statement and this permission,
9 warranties and liability notice appear in all copies of this software
10 and related documentation.
13 Stichting Mathematisch Centrum makes no warranties, express or implied, with
14 regard to this software. In particular, but without limitation, SMC makes
15 no warranty of fitness for a particular use, no warranty of freedom from
16 infringement of any patent or copyright, nor any warranty as to accuracy.
17 Accordingly, SMC assumes no obligation to furnish assistance of any kind
18 whatsoever or to furnish additional information or documentation.
21 In no event shall Stichting Mathematisch Centrum be liable for any damages
22 arising out of or in connection with the use or performance of this
25 Amsterdam, 21 June, 2000
31 <!-- These entities are just to make the description simpler -->
32 <!ENTITY % common-elements
"label|data|dataref|properties">
34 <!-- These entities are the basis of the user's extension mechanism -->
35 <!ENTITY % rootExtensions
"">
36 <!ENTITY % nodeExtensions
"">
37 <!ENTITY % edgeExtensions
"">
38 <!ENTITY % graphExtensions
"">
39 <!ENTITY % editExtensions
"">
41 <!ENTITY % admissibleProperties
"">
42 <!ENTITY % admissibleGraphProperties
"">
44 <!-- ========================================================================= -->
45 <!-- ========================================================================= -->
47 <!-- A file consists of a graph definition and, optionally, -->
48 <!-- addinitional definitions and edit nodes -->
49 <!-- The real 'content' might be preceeded by optional data -->
50 <!ELEMENT GraphXML ((%common-elements;
52 |style)*,graph*,(edit|edit-bundle)*)
>
55 Note that, according to the official W3C specification, the definition
56 of the xlink namespace on the root level should be enough for the whole
57 document (children should inherit namespaces). However, some xml processors
58 (like IE5.0) does not know that feature yet, so the same attribute
59 specification is repeated for all children nodes which use it.
62 xmlns:xlink CDATA #FIXED
"http://www.w3.org/1999/xlink/namespace/"
64 <!-- ========================================================================= -->
65 <!-- ========================================================================= -->
68 <!-- ========================================================================= -->
69 <!-- The definition part -->
70 <!-- ========================================================================= -->
72 <!-- A graph consists of an optional label, references to icons, URL-s to -->
73 <!-- external data, locally stored data and, finally, nodes and edges -->
74 <!ELEMENT graph ((%common-elements;
76 |style|icon|size)*,(node|edge)*)
>
79 version CDATA #IMPLIED
82 preferredlayout CDATA #IMPLIED
85 <!-- An icon to representing a full graph -->
88 xmlns:xlink CDATA #FIXED
"http://www.w3.org/1999/xlink/namespace/"
89 xlink:type CDATA #FIXED
"simple"
90 xlink:role CDATA #FIXED
"Icon image for the full graph"
91 xlink:title CDATA #IMPLIED
92 xlink:show (new|parsed|replace) #FIXED
"parsed"
93 xlink:actuate (user|auto) #FIXED
"auto"
94 xlink:href CDATA #REQUIRED
97 <!-- ========================================================================= -->
98 <!-- Editing of graphs -->
99 <!-- ========================================================================= -->
100 <!ELEMENT edit ((%common-elements;
104 xmlns:xlink CDATA #FIXED
"http://www.w3.org/1999/xlink/namespace/"
105 action (replace|remove) #REQUIRED
106 xlink:type CDATA #FIXED
"simple"
107 xlink:role CDATA #FIXED
"Reference to graph"
108 xlink:title CDATA #IMPLIED
109 xlink:show (new|parsed|replace) #FIXED
"new"
110 xlink:actuate (user|auto) #FIXED
"user"
111 xlink:href CDATA #IMPLIED
115 <!ELEMENT edit-bundle (edit*)
>
116 <!ATTLIST edit-bundle
120 <!-- ========================================================================= -->
121 <!-- Nodes and edges -->
122 <!-- ========================================================================= -->
124 <!-- A node may include element information; it has a unique identifier -->
125 <!ELEMENT node (%common-elements;
127 |style|position|size|transform|subgraph-style)*
>
129 xmlns:xlink CDATA #FIXED
"http://www.w3.org/1999/xlink/namespace/"
131 isMetanode (true|false)
"false"
132 xlink:type CDATA #FIXED
"simple"
133 xlink:role CDATA #FIXED
"Reference to graph"
134 xlink:title CDATA #IMPLIED
135 xlink:show (new|parsed|replace) #FIXED
"new"
136 xlink:actuate (user|auto) #FIXED
"user"
137 xlink:href CDATA #IMPLIED
141 <!-- An edge may include element information; it may have an identifier, and -->
142 <!-- it has to give its source and target -->
143 <!ELEMENT edge (%common-elements;
148 source CDATA #REQUIRED
149 target CDATA #REQUIRED
151 isDirected (true|false) #IMPLIED
154 <!-- ========================================================================= -->
156 <!-- Properties are placeholders for key-value pairs -->
157 <!ELEMENT properties EMPTY
>
160 %admissibleProperties;
163 <!-- Graph-specific-properties are placeholders for key-value pairs, -->
164 <!-- within the context of the current (innermost nested) graph -->
165 <!ELEMENT graph-specific-properties EMPTY
>
166 <!ATTLIST graph-specific-properties
168 %admissibleGraphProperties;
171 <!ELEMENT label (#PCDATA)
>
176 <!ELEMENT data (#PCDATA)
>
181 <!ELEMENT dataref (ref*)
>
183 xmlns:xlink CDATA #FIXED
"http://www.w3.org/1999/xlink/namespace/"
184 xlink:type CDATA #FIXED
"extended"
185 xlink:role CDATA #FIXED
"Reference to external application data"
186 xlink:title CDATA #IMPLIED
187 xlink:show (new|parsed|replace) #FIXED
"new"
188 xlink:actuate (user|auto) #FIXED
"user"
192 <!-- links are like the html urls -->
195 xmlns:xlink CDATA #FIXED
"http://www.w3.org/1999/xlink/namespace/"
196 xlink:type CDATA #FIXED
"locator"
197 xlink:role CDATA #IMPLIED
198 xlink:title CDATA #IMPLIED
199 xlink:show (new|parsed|replace) #FIXED
"new"
200 xlink:actuate (user|auto) #FIXED
"user"
201 xlink:href CDATA #REQUIRED
205 <!-- position of a node -->
206 <!ELEMENT position EMPTY
>
214 <!-- size of a node or a graph -->
215 <!ELEMENT size EMPTY
>
217 width CDATA #REQUIRED
218 height CDATA #REQUIRED
223 <!-- the path of an edge is a sequence of positions -->
224 <!ELEMENT path (position)*
>
226 type (polyline|spline|arc)
"polyline"
230 <!ELEMENT transform EMPTY
>
232 matrix CDATA
"1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0"
236 <!-- ========================================================================= -->
238 In all specifications, colour can be:
239 name: black, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white, yellow
245 <!ELEMENT style (line|fill|implementation)*
>
246 <!ELEMENT subgraph-style (line|fill|implementation)*
>
248 <!ELEMENT line EMPTY
>
249 <!-- linestyle can be: none, solid, dashed, dash-dotted, dotted, or #bbbb -->
251 tag (edge|node)
"edge"
254 colour CDATA #IMPLIED
255 colour_start CDATA #IMPLIED
256 colour_end CDATA #IMPLIED
257 color_start CDATA #IMPLIED
258 color_end CDATA #IMPLIED
259 linestyle CDATA #IMPLIED
260 linewidth CDATA #IMPLIED
263 <!ELEMENT fill EMPTY
>
265 xmlns:xlink CDATA #FIXED
"http://www.w3.org/1999/xlink/namespace/"
266 tag (edge|node)
"node"
269 colour CDATA #IMPLIED
270 fillstyle (solid|none|background) #IMPLIED
271 xlink:type CDATA #FIXED
"simple"
272 xlink:role CDATA #FIXED
"Fill image or pattern"
273 xlink:title CDATA #IMPLIED
274 xlink:show (new|parsed|replace) #FIXED
"parsed"
275 xlink:actuate (user|auto) #FIXED
"user"
276 xlink:href CDATA #IMPLIED
277 imagefill (resize|duplicate|none) #IMPLIED
280 <!ELEMENT implementation EMPTY
>
281 <!ATTLIST implementation
282 tag (edge|node) #REQUIRED
284 scriptname CDATA #IMPLIED