Skip to content

Commit e12647d

Browse files
committed
added html like hex color notation...
removed some more start/endopen. see gephi#3, gephi#4
1 parent 847d72c commit e12647d

File tree

2 files changed

+46
-70
lines changed

2 files changed

+46
-70
lines changed

specs/1.3draft/viz.rng

Lines changed: 30 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.1" encoding="UTF-8"?>
2-
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2+
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
3+
xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns="http://relaxng.org/ns/structure/1.0"
4+
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
35
<!-- extension point -->
46
<define name="node-content" combine="interleave">
57
<interleave>
@@ -48,15 +50,22 @@
4850
<!-- new point -->
4951
<define name="color-content">
5052
<interleave>
51-
<attribute name="r">
52-
<ref name="color-channel"/>
53-
</attribute>
54-
<attribute name="g">
55-
<ref name="color-channel"/>
56-
</attribute>
57-
<attribute name="b">
58-
<ref name="color-channel"/>
59-
</attribute>
53+
<choice>
54+
<group>
55+
<attribute name="r">
56+
<ref name="color-channel"/>
57+
</attribute>
58+
<attribute name="g">
59+
<ref name="color-channel"/>
60+
</attribute>
61+
<attribute name="b">
62+
<ref name="color-channel"/>
63+
</attribute>
64+
</group>
65+
<attribute name="hex">
66+
<ref name="hex-color"/>
67+
</attribute>
68+
</choice>
6069
<optional>
6170
<attribute name="a">
6271
<ref name="alpha-channel"/>
@@ -69,23 +78,13 @@
6978
<ref name="time-type"/>
7079
</attribute>
7180
</optional>
72-
<optional>
73-
<attribute name="startopen">
74-
<ref name="time-type"/>
75-
</attribute>
76-
</optional>
7781
</choice>
7882
<interleave>
7983
<optional>
8084
<attribute name="end">
8185
<ref name="time-type"/>
8286
</attribute>
8387
</optional>
84-
<optional>
85-
<attribute name="endopen">
86-
<ref name="time-type"/>
87-
</attribute>
88-
</optional>
8988
</interleave>
9089
</interleave>
9190
<optional>
@@ -114,23 +113,13 @@
114113
<ref name="time-type"/>
115114
</attribute>
116115
</optional>
117-
<optional>
118-
<attribute name="startopen">
119-
<ref name="time-type"/>
120-
</attribute>
121-
</optional>
122116
</choice>
123117
<interleave>
124118
<optional>
125119
<attribute name="end">
126120
<ref name="time-type"/>
127121
</attribute>
128122
</optional>
129-
<optional>
130-
<attribute name="endopen">
131-
<ref name="time-type"/>
132-
</attribute>
133-
</optional>
134123
</interleave>
135124
</interleave>
136125
<optional>
@@ -153,23 +142,13 @@
153142
<ref name="time-type"/>
154143
</attribute>
155144
</optional>
156-
<optional>
157-
<attribute name="startopen">
158-
<ref name="time-type"/>
159-
</attribute>
160-
</optional>
161145
</choice>
162146
<interleave>
163147
<optional>
164148
<attribute name="end">
165149
<ref name="time-type"/>
166150
</attribute>
167151
</optional>
168-
<optional>
169-
<attribute name="endopen">
170-
<ref name="time-type"/>
171-
</attribute>
172-
</optional>
173152
</interleave>
174153
</interleave>
175154
<optional>
@@ -192,23 +171,13 @@
192171
<ref name="time-type"/>
193172
</attribute>
194173
</optional>
195-
<optional>
196-
<attribute name="startopen">
197-
<ref name="time-type"/>
198-
</attribute>
199-
</optional>
200174
</choice>
201175
<interleave>
202176
<optional>
203177
<attribute name="end">
204178
<ref name="time-type"/>
205179
</attribute>
206180
</optional>
207-
<optional>
208-
<attribute name="endopen">
209-
<ref name="time-type"/>
210-
</attribute>
211-
</optional>
212181
</interleave>
213182
</interleave>
214183
<optional>
@@ -236,23 +205,13 @@
236205
<ref name="time-type"/>
237206
</attribute>
238207
</optional>
239-
<optional>
240-
<attribute name="startopen">
241-
<ref name="time-type"/>
242-
</attribute>
243-
</optional>
244208
</choice>
245209
<interleave>
246210
<optional>
247211
<attribute name="end">
248212
<ref name="time-type"/>
249213
</attribute>
250214
</optional>
251-
<optional>
252-
<attribute name="endopen">
253-
<ref name="time-type"/>
254-
</attribute>
255-
</optional>
256215
</interleave>
257216
</interleave>
258217
<optional>
@@ -275,23 +234,13 @@
275234
<ref name="time-type"/>
276235
</attribute>
277236
</optional>
278-
<optional>
279-
<attribute name="startopen">
280-
<ref name="time-type"/>
281-
</attribute>
282-
</optional>
283237
</choice>
284238
<interleave>
285239
<optional>
286240
<attribute name="end">
287241
<ref name="time-type"/>
288242
</attribute>
289243
</optional>
290-
<optional>
291-
<attribute name="endopen">
292-
<ref name="time-type"/>
293-
</attribute>
294-
</optional>
295244
</interleave>
296245
</interleave>
297246
<optional>
@@ -349,4 +298,15 @@
349298
<define name="space-point">
350299
<data type="float"/>
351300
</define>
301+
<!-- new datatype -->
302+
<define name="hex-color">
303+
<choice>
304+
<data type="hexBinary">
305+
<param name="length">3</param>
306+
</data>
307+
<data type="string">
308+
<param name="pattern">#[0-9a-fA-F]{6}</param>
309+
</data>
310+
</choice>
311+
</define>
352312
</grammar>

specs/CHANGELOG

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## 1.3draft - Gephi 0.9 compatible
2+
3+
- xml version is now 1.1
4+
5+
###Graph Sturcture
6+
- allow datatype "long" for id-type attributes
7+
- in addition to "static" and "dynamic" a new mode "slice" has been added for dynamic graphs split over multiple-files
8+
- edges can now have a "kind" attribute to better describe them in multi-graphs
9+
10+
### Dynamics
11+
- open intervals "startopen" and "endopen" are no longer supported.
12+
13+
### Viz
14+
- viz:color now allows for a "hex" attribute to enable html like color encoding the initial "#" is optional
15+
16+
117
## 1.2draft - Gephi 0.8 compatible
218

319
### Graph structure

0 commit comments

Comments
 (0)