Wgraph:Sample Genealogy
From Dpldemo
This example demonstrates the power of wgraph in combination with
- mediawiki templates
- the Dynamic Page List extension (DPL).
We will guide you through a series of steps where a small genealogy tree is built.
We start with a straight forward approach and show how a very high level of abstraction can be reached.
Please go carefully through each step to understand the architecture of the final result.
First we define a small genealogy tree directly in WGL
- We concentrate on the semantics
- We do not use any coordinates or size attributes for the shapes
- we use nodetypes (male, female, info) to share common properties
- we use edgetypes (mother, father, married to, info) for the same purpose
- we mark undefined nodes in a special way
Thus we reach a fair level of abstraction.
(made with Wgraph)
1: graph "Sample_Genealogy" . {
2: node John_Smith { type male label "John Smith\n*'' 21.06.1952''" }
3: node Bella_Smith { type female label "Bella Smith\n*'' 03.04.1955''" }
4: node Dave_Smith { type male label "Dave Smith\n*'' 30.05.1986''" }
5: node Paul_Smith { type male label "Paul Smith\n*'' 28.02.1988''" }
6: node Susan_Smith { type female label "Susan Smith\n*'' 04.06.1995''" }
7:
8: edge Susan_Smith John_Smith { type father }
9: edge Paul_Smith John_Smith { type father }
10: edge Dave_Smith John_Smith { type father }
11: edge Susan_Smith Bella_Smith { type mother }
12: edge Paul_Smith Bella_Smith { type mother }
13: edge Dave_Smith Bella_Smith { type mother }
14:
15: edge Bella_Smith John_Smith { type marriage label 01.03.1985 }
16:
17: edge Bella_Smith Bella_Smith_info { type info }
18: edge John_Smith John_Smith_info { type info }
19: node John_Smith_info { type info label "that & this" }
20: node Bella_Smith_info { type info label "this and that" }
21:
22: nodetype male { shape box color #ddddff bordercolor #9999ff width 140 textwidth 20 }
23: nodetype female { shape box color #ffdddd bordercolor #ff9999 width 140 textwidth 20 }
24:
25: edgetype father { color #7777ff backarrowsize 10 backarrowstyle solid arrowsize 0 }
26: edgetype mother { color #ff7777 backarrowsize 10 backarrowstyle solid arrowsize 0 }
27: edgetype marriage { kind rightnear arrowstyle line backarrowstyle line backarrowsize 10 color #ff77ff }
28:
29: nodetype info { color #f0f0f0 borderstyle dashed bordercolor #e0e0e0 }
30: edgetype info { kind near arrowstyle none linestyle dotted color lightgray }
31:
32: nodetype 'undefined node' { bordercolor red label '%%?' }
33:
34: orientation bottom_to_top
35: splines yes
36: }
continue with Wgraph:Sample Genealogy 2 ..