rendered paste bodyUn petit bout d'un SVG:
<g
id=3D"g3105">
<rect
y=3D"991.10437"
x=3D"58.024895"
height=3D"588.26154"
width=3D"879.9502"
id=3D"rect4476"
style=3D"fill:#e3dbdb;fill-opacity:1;stroke:#000000;stroke-width:2=
;stroke-miterlimit:4;stroke-dasharray:2, 4;stroke-dashoffset:0;stroke-opaci=
ty:1" />
<path
sodipodi:nodetypes=3D"ccccccccccc"
id=3D"path4474"
d=3D"M 718,166.72437 L 718,186.72437 L 998,186.72437 L 998,956.724=
37 L 1122,956.72437 L 1122,946.72437 L 1008,946.72437 L 1008,176.72437 L 72=
8,176.72437 L 728,166.724
37 L 718,166.72437 z"
style=3D"fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:none=
;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:=
1" />
<g
transform=3D"translate(38,42)"
id=3D"g4044">
<rect
style=3D"fill:#ffaaaa;fill-opacity:1;fill-rule:nonzero;stroke:#0=
00000;stroke-width:1.53898835;stroke-linecap:butt;stroke-linejoin:round;str=
oke-miterlimit:4;stroke-d
asharray:none;stroke-dashoffset:0;stroke-opacity:1"
id=3D"rect4127"
width=3D"687.65308"
height=3D"70.395348"
x=3D"33.489006"
y=3D"27.190891" />
<text
xml:space=3D"preserve"
style=3D"font-size:24px;font-style:normal;font-weight:normal;tex=
t-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;s=
troke-width:1px;stroke-li
necap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Arial"
x=3D"360.21722"
y=3D"53.129921"
id=3D"text4129"><tspan
sodipodi:role=3D"line"
x=3D"360.21722"
y=3D"53.129921"
id=3D"tspan4133">quadruple associative Instruction Cache 32 KB=
yte,</tspan><tspan
sodipodi:role=3D"line"
x=3D"360.21722"
y=3D"83.129921"
id=3D"tspan3320">128-entry TLB-4K, 7 TLB-2/4M per thread</tspa=
n></text>
</g>
Cela requiert la connaissance de quatre dialectes par le programme
l'utilisant:
- L'encapsulation XML (les <foo>...</foo>)
- L'encapsulation des tags specifiques a SVG (foo=3Dbar)
- Le format CSS utilise pour les styles: (style=3D"foo:bar;baz:quux")
- Les d=3D"foo..."
- Les appels de fonctions i.e.: transform=3D"translate(38,42)"
Quand le tout pourrait avoir une presentation uniforme necessitant une
seule librairie de parse, pas quatre, si S-EXP etaient utilises:
(g
(id "g3105")
(rect
(y 991.10437)
(x 58.024895)
(height 588.26154)
(width 879.9502)
(id "rect4476")
(style
(fill #e3dbdb)
(fill-opacity 1)
(stroke #000000)
(stroke-width 2)
(stroke-miterlimit 4)
(stroke-dasharray '(2 4))
(stroke-dashoffset 0)
(stroke-opacity 1)))
(path
(sodipodi:nodetypes "cccccccccc")
(id "path4474")
(d
(M 718 166.72437)
(L 718 186.72437)
(L 998 186.72437)
(L 998 956.72437)
(L 1122 956.72437)
(L 1122 946.72437)
(L 1008 946.72437)
(L 1008 176.72437)
(L 728 176.72437)
(L 728 166.72437)
(L 718 166.72437))
(style
(fill #008000)
(fill-opacity 1)
(fill-rule-evenodd t)
(stroke nil)
(stroke-width 1)
(stroke-linecap butt)
(stroke-linejoin miter)
(stroke-opacity 1)))
[...]
Oh, et le translate devient:
(transform (translate 38 42))
Et le petit exemple tres simple de HTML 4.04:
<html>
<head>
<title>Foo</title>
</head>
<body>
<h1>Bar</h1>
<p>Baz</p>
</body>
</html>
Qui devient:
(html
(head
(title Foo))
(body
(h1 Bar)
(p Baz)))
Et:
<font size=3D"24">foo</font>
(font :size 24
foo)