equal
deleted
inserted
replaced
1 include yslt_noindent.yml2 |
1 include yslt_noindent.yml2 |
|
2 |
|
3 // overrides yslt's output function to set CDATA |
|
4 decl output(method, cdata-section-elements="script"); |
2 istylesheet |
5 istylesheet |
3 /* From Inkscape */ |
6 /* From Inkscape */ |
4 xmlns:dc="http://purl.org/dc/elements/1.1/" |
7 xmlns:dc="http://purl.org/dc/elements/1.1/" |
5 xmlns:cc="http://creativecommons.org/ns#" |
8 xmlns:cc="http://creativecommons.org/ns#" |
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
9 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
7 xmlns:svg="http://www.w3.org/2000/svg" |
10 xmlns:svg="http://www.w3.org/2000/svg" |
8 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
11 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
9 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
12 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
|
13 xmlns="http://www.w3.org/1999/xhtml" |
10 |
14 |
11 /* Our namespace to invoke python code */ |
15 /* Our namespace to invoke python code */ |
12 xmlns:ns="beremiz" |
16 xmlns:ns="beremiz" |
13 extension-element-prefixes="ns" |
17 extension-element-prefixes="ns" |
14 exclude-result-prefixes="ns" { |
18 exclude-result-prefixes="ns" { |
28 /* use real xsl:copy instead copy-of alias from yslt.yml2 */ |
32 /* use real xsl:copy instead copy-of alias from yslt.yml2 */ |
29 xsl:copy apply "@* | node()"; |
33 xsl:copy apply "@* | node()"; |
30 } |
34 } |
31 |
35 |
32 /* copy root node and add geometry as comment for a test */ |
36 /* copy root node and add geometry as comment for a test */ |
33 template "/" { |
37 template "/" |
34 xsl:copy { |
38 html xmlns="http://www.w3.org/1999/xhtml" { |
35 comment { |
39 head; |
36 apply "$geometry", mode="testgeo"; |
40 body style="margin:0;" { |
|
41 xsl:copy { |
|
42 comment { |
|
43 apply "$geometry", mode="testgeo"; |
|
44 } |
|
45 comment { |
|
46 apply "$hmitree", mode="testtree"; |
|
47 } |
|
48 apply "@* | node()"; |
|
49 } |
|
50 script |
|
51 || |
|
52 (function(){ |
|
53 var relative_URI = window.location.href.replace(/^http(s?:\/\/[^\/]*)\/.*$/, 'ws$1/ws'); |
|
54 var ws = new WebSocket(relative_URI); |
|
55 ws.onmessage = function (evt) { |
|
56 var received_msg = evt.data; |
|
57 alert("Message is received..."+received_msg); |
|
58 }; |
|
59 ws.onopen = function (evt) { |
|
60 ws.send("test"); |
|
61 }; |
|
62 })(); |
|
63 || |
37 } |
64 } |
38 comment { |
|
39 | blah |
|
40 apply "$hmitree", mode="testtree"; |
|
41 } |
|
42 apply "@* | node()"; |
|
43 } |
|
44 } |
65 } |
45 |
66 |
46 template "bbox", mode="testgeo"{ |
67 template "bbox", mode="testgeo"{ |
47 | ID: «@Id» x: «@x» y: «@y» w: «@w» h: «@h» |
68 | ID: «@Id» x: «@x» y: «@y» w: «@w» h: «@h» |
48 } |
69 } |