author | Edouard Tisserant |
Wed, 02 Oct 2019 11:31:02 +0200 | |
branch | svghmi |
changeset 2789 | ba0dd2ec6dc4 |
parent 2788 | 2ed9ff826d03 |
child 2790 | 8fab1886ebec |
permissions | -rw-r--r-- |
2753
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
1 |
include yslt_noindent.yml2 |
2779
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
2 |
|
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
3 |
// overrides yslt's output function to set CDATA |
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
4 |
decl output(method, cdata-section-elements="script"); |
2753
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
5 |
istylesheet |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
6 |
/* From Inkscape */ |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
7 |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
8 |
xmlns:cc="http://creativecommons.org/ns#" |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
9 |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
10 |
xmlns:svg="http://www.w3.org/2000/svg" |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
11 |
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
12 |
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
2779
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
13 |
xmlns="http://www.w3.org/1999/xhtml" |
2753
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
14 |
|
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
15 |
/* Our namespace to invoke python code */ |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
16 |
xmlns:ns="beremiz" |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
17 |
extension-element-prefixes="ns" |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
18 |
exclude-result-prefixes="ns" { |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
19 |
|
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
20 |
/* This retrieves geometry obtained through "inkscape -S" |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
21 |
* already parsed by python and presented as a list of |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
22 |
* <bbox x="0" y="0" w="42" h="42"> |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
23 |
*/ |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
24 |
variable "geometry", "ns:GetSVGGeometry()"; |
2763
ce04d79b8e57
Pass HMITree to SVG transform. It seems it could really help to reduce JS tree binding logic in the end.
Edouard Tisserant
parents:
2756
diff
changeset
|
25 |
variable "hmitree", "ns:GetHMITree()"; |
2753
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
26 |
|
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
27 |
/* Identity template : |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
28 |
* - copy every attributes |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
29 |
* - copy every sub-elements |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
30 |
*/ |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
31 |
template "@* | node()" { |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
32 |
/* use real xsl:copy instead copy-of alias from yslt.yml2 */ |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
33 |
xsl:copy apply "@* | node()"; |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
34 |
} |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
35 |
|
2782
723e420dfe72
SVGHMI: added transformation of code given in inkscape's description fields into javascript functions
Edouard Tisserant
parents:
2780
diff
changeset
|
36 |
variable "mark" > =HMI=\n |
723e420dfe72
SVGHMI: added transformation of code given in inkscape's description fields into javascript functions
Edouard Tisserant
parents:
2780
diff
changeset
|
37 |
|
2753
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
38 |
/* copy root node and add geometry as comment for a test */ |
2779
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
39 |
template "/" |
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
40 |
html xmlns="http://www.w3.org/1999/xhtml" { |
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
41 |
head; |
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
42 |
body style="margin:0;" { |
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
43 |
xsl:copy { |
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
44 |
comment { |
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
45 |
apply "$geometry", mode="testgeo"; |
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
46 |
} |
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
47 |
comment { |
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
48 |
apply "$hmitree", mode="testtree"; |
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
49 |
} |
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
50 |
apply "@* | node()"; |
75c6a31caca6
SVGHMI: Work In Progress : fixed pointer types in ctypes interface, cleaned up server startup and cleanup code, changed document type to XHTML, cleaner JS script : encapsulated in a function and in CDATA.
Edouard Tisserant
parents:
2763
diff
changeset
|
51 |
} |
2780
e468f18df200
SVGHMI: moved static JS code to a separate file included at xhtml generation time
Edouard Tisserant
parents:
2779
diff
changeset
|
52 |
script{ |
2788
2ed9ff826d03
SVGHMI: Work in progress. C side mostly implemented, neither built nor tested.
Edouard Tisserant
parents:
2783
diff
changeset
|
53 |
/* TODO : paste hmitree hash stored in hmi tree root node */ |
2ed9ff826d03
SVGHMI: Work in progress. C side mostly implemented, neither built nor tested.
Edouard Tisserant
parents:
2783
diff
changeset
|
54 |
|
2783
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
55 |
|| |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
56 |
function evaluate_js_from_descriptions() { |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
57 |
var Page; |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
58 |
var Input; |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
59 |
var Display; |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
60 |
var res = []; |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
61 |
|| |
2782
723e420dfe72
SVGHMI: added transformation of code given in inkscape's description fields into javascript functions
Edouard Tisserant
parents:
2780
diff
changeset
|
62 |
variable "midmark" > \n«$mark» |
723e420dfe72
SVGHMI: added transformation of code given in inkscape's description fields into javascript functions
Edouard Tisserant
parents:
2780
diff
changeset
|
63 |
apply """//*[contains(child::svg:desc, $midmark) or \ |
2783
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
64 |
starts-with(child::svg:desc, $mark)]""",2 |
2782
723e420dfe72
SVGHMI: added transformation of code given in inkscape's description fields into javascript functions
Edouard Tisserant
parents:
2780
diff
changeset
|
65 |
mode="code_from_descs"; |
2783
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
66 |
|| |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
67 |
return res; |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
68 |
} |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
69 |
|| |
2782
723e420dfe72
SVGHMI: added transformation of code given in inkscape's description fields into javascript functions
Edouard Tisserant
parents:
2780
diff
changeset
|
70 |
|
2780
e468f18df200
SVGHMI: moved static JS code to a separate file included at xhtml generation time
Edouard Tisserant
parents:
2779
diff
changeset
|
71 |
/*TODO add : |
e468f18df200
SVGHMI: moved static JS code to a separate file included at xhtml generation time
Edouard Tisserant
parents:
2779
diff
changeset
|
72 |
- pages content |
e468f18df200
SVGHMI: moved static JS code to a separate file included at xhtml generation time
Edouard Tisserant
parents:
2779
diff
changeset
|
73 |
+ with ref to elt ? |
e468f18df200
SVGHMI: moved static JS code to a separate file included at xhtml generation time
Edouard Tisserant
parents:
2779
diff
changeset
|
74 |
- widgets parameters |
e468f18df200
SVGHMI: moved static JS code to a separate file included at xhtml generation time
Edouard Tisserant
parents:
2779
diff
changeset
|
75 |
*/ |
2782
723e420dfe72
SVGHMI: added transformation of code given in inkscape's description fields into javascript functions
Edouard Tisserant
parents:
2780
diff
changeset
|
76 |
|
2780
e468f18df200
SVGHMI: moved static JS code to a separate file included at xhtml generation time
Edouard Tisserant
parents:
2779
diff
changeset
|
77 |
include text svghmi.js |
e468f18df200
SVGHMI: moved static JS code to a separate file included at xhtml generation time
Edouard Tisserant
parents:
2779
diff
changeset
|
78 |
} |
2763
ce04d79b8e57
Pass HMITree to SVG transform. It seems it could really help to reduce JS tree binding logic in the end.
Edouard Tisserant
parents:
2756
diff
changeset
|
79 |
} |
2753
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
80 |
} |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
81 |
|
2782
723e420dfe72
SVGHMI: added transformation of code given in inkscape's description fields into javascript functions
Edouard Tisserant
parents:
2780
diff
changeset
|
82 |
template "*", mode="code_from_descs" { |
2783
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
83 |
|| |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
84 |
{ |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
85 |
var path, role, name, priv; |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
86 |
var id = "«@id»"; |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
87 |
|| |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
88 |
|
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
89 |
/* if label is used, use it as default name */ |
2789 | 90 |
if "@inkscape:label" |
2783
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
91 |
|> name = "«@inkscape:label»"; |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
92 |
|
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
93 |
| /* -------------- */ |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
94 |
|
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
95 |
// this breaks indent, but fixing indent could break string literals |
2782
723e420dfe72
SVGHMI: added transformation of code given in inkscape's description fields into javascript functions
Edouard Tisserant
parents:
2780
diff
changeset
|
96 |
value "substring-after(svg:desc, $mark)"; |
2783
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
97 |
// nobody reads generated code anyhow... |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
98 |
|
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
99 |
|| |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
100 |
|
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
101 |
/* -------------- */ |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
102 |
res.push({ |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
103 |
path:path, |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
104 |
role:role, |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
105 |
name:name, |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
106 |
priv:priv |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
107 |
}) |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
108 |
} |
5ee6967f721d
SVGHMI: Starting to define JS side more in details.
Edouard Tisserant
parents:
2782
diff
changeset
|
109 |
|| |
2782
723e420dfe72
SVGHMI: added transformation of code given in inkscape's description fields into javascript functions
Edouard Tisserant
parents:
2780
diff
changeset
|
110 |
} |
723e420dfe72
SVGHMI: added transformation of code given in inkscape's description fields into javascript functions
Edouard Tisserant
parents:
2780
diff
changeset
|
111 |
|
723e420dfe72
SVGHMI: added transformation of code given in inkscape's description fields into javascript functions
Edouard Tisserant
parents:
2780
diff
changeset
|
112 |
|
2753
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
113 |
template "bbox", mode="testgeo"{ |
2763
ce04d79b8e57
Pass HMITree to SVG transform. It seems it could really help to reduce JS tree binding logic in the end.
Edouard Tisserant
parents:
2756
diff
changeset
|
114 |
| ID: «@Id» x: «@x» y: «@y» w: «@w» h: «@h» |
ce04d79b8e57
Pass HMITree to SVG transform. It seems it could really help to reduce JS tree binding logic in the end.
Edouard Tisserant
parents:
2756
diff
changeset
|
115 |
} |
ce04d79b8e57
Pass HMITree to SVG transform. It seems it could really help to reduce JS tree binding logic in the end.
Edouard Tisserant
parents:
2756
diff
changeset
|
116 |
|
ce04d79b8e57
Pass HMITree to SVG transform. It seems it could really help to reduce JS tree binding logic in the end.
Edouard Tisserant
parents:
2756
diff
changeset
|
117 |
template "*", mode="testtree"{ |
ce04d79b8e57
Pass HMITree to SVG transform. It seems it could really help to reduce JS tree binding logic in the end.
Edouard Tisserant
parents:
2756
diff
changeset
|
118 |
param "indent", "''"; |
ce04d79b8e57
Pass HMITree to SVG transform. It seems it could really help to reduce JS tree binding logic in the end.
Edouard Tisserant
parents:
2756
diff
changeset
|
119 |
| «$indent» «local-name()» «@name» «@type» «@path» |
ce04d79b8e57
Pass HMITree to SVG transform. It seems it could really help to reduce JS tree binding logic in the end.
Edouard Tisserant
parents:
2756
diff
changeset
|
120 |
apply "*", mode="testtree" { |
ce04d79b8e57
Pass HMITree to SVG transform. It seems it could really help to reduce JS tree binding logic in the end.
Edouard Tisserant
parents:
2756
diff
changeset
|
121 |
with "indent" value "concat($indent,'>')" |
ce04d79b8e57
Pass HMITree to SVG transform. It seems it could really help to reduce JS tree binding logic in the end.
Edouard Tisserant
parents:
2756
diff
changeset
|
122 |
}; |
2753
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
123 |
} |
9a7e12e96399
SVGHMI: Added XSLT transformation, Makefile to get XSLT from ysl2 (copy of plcopen/Makefile) and a minimal stylesheet to start with.
Edouard Tisserant
parents:
diff
changeset
|
124 |
} |