cutedriver-driver 2.0.0.20210120164037
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +16 -0
- data/bin/start_app_perf +200 -0
- data/bin/tdriver-devtools +3 -0
- data/config/sut_parameters.rb +52 -0
- data/config/sut_setup.rb +32 -0
- data/config/sut_teardown.rb +32 -0
- data/config/tdriver_custom_error_recovery.rb +83 -0
- data/ext/extconf.rb +70 -0
- data/ext/native_extensions.c +315 -0
- data/lib/matti.rb +25 -0
- data/lib/tdriver-devtools/behaviour/old/xml/example/flick-example.rb +120 -0
- data/lib/tdriver-devtools/behaviour/old/xml/example/impl.rb_invalid +194 -0
- data/lib/tdriver-devtools/behaviour/old/xml/generate_behaviour_xml.rb +95 -0
- data/lib/tdriver-devtools/behaviour/old/xml/lib/tdriver_generator.rb +722 -0
- data/lib/tdriver-devtools/behaviour/old/xml/qdoc_generator.rb +321 -0
- data/lib/tdriver-devtools/behaviour/old/xml/templates/behaviour.method.template +43 -0
- data/lib/tdriver-devtools/behaviour/old/xml/templates/behaviour.module.template +54 -0
- data/lib/tdriver-devtools/behaviour/old/xml/templates/behaviour.xml.argument.template +7 -0
- data/lib/tdriver-devtools/behaviour/old/xml/templates/behaviour.xml.argument_type.template +7 -0
- data/lib/tdriver-devtools/behaviour/old/xml/templates/behaviour.xml.exception.template +5 -0
- data/lib/tdriver-devtools/behaviour/old/xml/templates/behaviour.xml.howto.line.template +2 -0
- data/lib/tdriver-devtools/behaviour/old/xml/templates/behaviour.xml.howto.template +5 -0
- data/lib/tdriver-devtools/behaviour/old/xml/templates/behaviour.xml.method.template +23 -0
- data/lib/tdriver-devtools/behaviour/old/xml/templates/behaviour.xml.template +14 -0
- data/lib/tdriver-devtools/behaviour/old/xml/update +3 -0
- data/lib/tdriver-devtools/behaviour/xml/generate.rb +88 -0
- data/lib/tdriver-devtools/behaviour/xml/rdoc_behaviour_xml_generator.rb +1945 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.argument.default.template +1 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.argument.template +3 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.argument_type.template +4 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.exception.template +4 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.method.arguments.template +4 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.method.deprecated.template +3 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.method.exceptions.template +3 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.method.info.template +1 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.method.returns.template +3 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.method.tables.template +3 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.method.template +12 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.returns.template +5 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.table.item.template +1 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.table.row.template +2 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.table.template +8 -0
- data/lib/tdriver-devtools/behaviour/xml/templates/behaviour.xml.template +14 -0
- data/lib/tdriver-devtools/doc/behaviour_xml/QtExampleGestureBehaviour.xml +138 -0
- data/lib/tdriver-devtools/doc/behaviour_xml/created.rid +1 -0
- data/lib/tdriver-devtools/doc/behaviour_xml/tdriver.hash +1 -0
- data/lib/tdriver-devtools/doc/feature_xml/qt_widget_hold.feature.xml +9 -0
- data/lib/tdriver-devtools/doc/feature_xml/qt_widget_tap.feature.xml +9 -0
- data/lib/tdriver-devtools/doc/generate.rb +917 -0
- data/lib/tdriver-devtools/doc/update +1 -0
- data/lib/tdriver-devtools/doc/xslt/html.rb +7 -0
- data/lib/tdriver-devtools/doc/xslt/template.xsl +2170 -0
- data/lib/tdriver-devtools/doc/xslt/update +3 -0
- data/lib/tdriver-devtools/plugin/placeholder.txt +1 -0
- data/lib/tdriver-devtools/tdriver-devtools.rb +404 -0
- data/lib/tdriver-devtools/tests/feature_tests/example/behaviour_example.rb +100 -0
- data/lib/tdriver-devtools/tests/feature_tests/generate.rb +82 -0
- data/lib/tdriver-devtools/tests/feature_tests/lib/custom_rdoc_generator.rb +468 -0
- data/lib/tdriver-devtools/tests/feature_tests/templates/feature_attribute.template +5 -0
- data/lib/tdriver-devtools/tests/feature_tests/templates/feature_method.template +5 -0
- data/lib/tdriver-devtools/tests/feature_tests/templates/scenario_attribute.template +5 -0
- data/lib/tdriver-devtools/tests/feature_tests/templates/scenario_method.template +5 -0
- data/lib/tdriver-devtools/tests/feature_tests/update +3 -0
- data/lib/tdriver.rb +23 -0
- data/lib/tdriver/base/behaviour/abstract.rb +29 -0
- data/lib/tdriver/base/behaviour/behaviours/object_abstract.rb +107 -0
- data/lib/tdriver/base/behaviour/behaviours/object_behaviour_composition.rb +99 -0
- data/lib/tdriver/base/behaviour/behaviours/object_behaviour_description.rb +278 -0
- data/lib/tdriver/base/behaviour/behaviours/object_composition.rb +119 -0
- data/lib/tdriver/base/behaviour/factory.rb +495 -0
- data/lib/tdriver/base/behaviour/loader.rb +46 -0
- data/lib/tdriver/base/command_data/command_data.rb +51 -0
- data/lib/tdriver/base/command_data/loader.rb +29 -0
- data/lib/tdriver/base/controller/abstraction.rb +56 -0
- data/lib/tdriver/base/controller/loader.rb +21 -0
- data/lib/tdriver/base/errors.rb +134 -0
- data/lib/tdriver/base/loader.rb +47 -0
- data/lib/tdriver/base/state_object.rb +373 -0
- data/lib/tdriver/base/sut/adapter.rb +54 -0
- data/lib/tdriver/base/sut/controller.rb +151 -0
- data/lib/tdriver/base/sut/factory.rb +339 -0
- data/lib/tdriver/base/sut/generic/behaviours/agent.rb +77 -0
- data/lib/tdriver/base/sut/generic/behaviours/application.rb +427 -0
- data/lib/tdriver/base/sut/generic/behaviours/controller.rb +67 -0
- data/lib/tdriver/base/sut/generic/behaviours/find.rb +107 -0
- data/lib/tdriver/base/sut/generic/behaviours/flash_behaviour.rb +337 -0
- data/lib/tdriver/base/sut/generic/behaviours/sut.rb +1888 -0
- data/lib/tdriver/base/sut/generic/behaviours/switchbox_behaviour.rb +210 -0
- data/lib/tdriver/base/sut/generic/behaviours/verification.rb +222 -0
- data/lib/tdriver/base/sut/generic/commands/agent.rb +43 -0
- data/lib/tdriver/base/sut/generic/commands/application.rb +274 -0
- data/lib/tdriver/base/sut/generic/commands/fixture.rb +47 -0
- data/lib/tdriver/base/sut/generic/commands/key_sequence.rb +94 -0
- data/lib/tdriver/base/sut/generic/commands/screen_capture.rb +64 -0
- data/lib/tdriver/base/sut/generic/plugin.rb +97 -0
- data/lib/tdriver/base/sut/loader.rb +35 -0
- data/lib/tdriver/base/sut/sut.rb +98 -0
- data/lib/tdriver/base/test_object/abstract.rb +208 -0
- data/lib/tdriver/base/test_object/adapter.rb +740 -0
- data/lib/tdriver/base/test_object/behaviours/syncronization.rb +144 -0
- data/lib/tdriver/base/test_object/behaviours/test_object.rb +1047 -0
- data/lib/tdriver/base/test_object/cache.rb +134 -0
- data/lib/tdriver/base/test_object/factory.rb +684 -0
- data/lib/tdriver/base/test_object/loader.rb +51 -0
- data/lib/tdriver/base/test_object/verification.rb +178 -0
- data/lib/tdriver/base/test_object/xml/abstraction.rb +63 -0
- data/lib/tdriver/base/test_object/xml/adapter.rb +773 -0
- data/lib/tdriver/env.rb +21 -0
- data/lib/tdriver/loader.rb +57 -0
- data/lib/tdriver/matti.rb +35 -0
- data/lib/tdriver/report/error_recovery/tdriver_custom_error_recovery.rb +83 -0
- data/lib/tdriver/report/error_recovery/tdriver_error_recovery.rb +168 -0
- data/lib/tdriver/report/error_recovery/tdriver_error_recovery_settings.rb +106 -0
- data/lib/tdriver/report/report.rb +61 -0
- data/lib/tdriver/report/report_api.rb +348 -0
- data/lib/tdriver/report/report_combine.rb +86 -0
- data/lib/tdriver/report/report_crash_file_capture.rb +178 -0
- data/lib/tdriver/report/report_creator.rb +665 -0
- data/lib/tdriver/report/report_cucumber.rb +158 -0
- data/lib/tdriver/report/report_cucumber_listener.rb +184 -0
- data/lib/tdriver/report/report_cucumber_reporter.rb +181 -0
- data/lib/tdriver/report/report_data_presentation.rb +156 -0
- data/lib/tdriver/report/report_data_table.rb +64 -0
- data/lib/tdriver/report/report_execution_statistics.rb +400 -0
- data/lib/tdriver/report/report_file_capture.rb +159 -0
- data/lib/tdriver/report/report_graph_generator.rb +59 -0
- data/lib/tdriver/report/report_grouping.rb +541 -0
- data/lib/tdriver/report/report_javascript.rb +199 -0
- data/lib/tdriver/report/report_junit_xml.rb +147 -0
- data/lib/tdriver/report/report_rspec.rb +108 -0
- data/lib/tdriver/report/report_test_case_run.rb +725 -0
- data/lib/tdriver/report/report_test_run.rb +1476 -0
- data/lib/tdriver/report/report_test_unit.rb +223 -0
- data/lib/tdriver/report/report_writer.rb +1621 -0
- data/lib/tdriver/tdriver.rb +209 -0
- data/lib/tdriver/util/agent/loader.rb +22 -0
- data/lib/tdriver/util/agent/service.rb +107 -0
- data/lib/tdriver/util/common/array.rb +39 -0
- data/lib/tdriver/util/common/boolean.rb +48 -0
- data/lib/tdriver/util/common/crc16.rb +149 -0
- data/lib/tdriver/util/common/environment.rb +154 -0
- data/lib/tdriver/util/common/error.rb +40 -0
- data/lib/tdriver/util/common/exception.rb +53 -0
- data/lib/tdriver/util/common/exceptions.rb +12 -0
- data/lib/tdriver/util/common/file.rb +328 -0
- data/lib/tdriver/util/common/gem.rb +109 -0
- data/lib/tdriver/util/common/hash.rb +288 -0
- data/lib/tdriver/util/common/kernel.rb +253 -0
- data/lib/tdriver/util/common/loader.rb +47 -0
- data/lib/tdriver/util/common/numeric.rb +159 -0
- data/lib/tdriver/util/common/object.rb +159 -0
- data/lib/tdriver/util/common/retryable.rb +179 -0
- data/lib/tdriver/util/common/stackable.rb +185 -0
- data/lib/tdriver/util/common/string.rb +174 -0
- data/lib/tdriver/util/database/access.rb +240 -0
- data/lib/tdriver/util/database/connection.rb +44 -0
- data/lib/tdriver/util/database/error.rb +34 -0
- data/lib/tdriver/util/database/loader.rb +28 -0
- data/lib/tdriver/util/filters/attribute_filter.rb +121 -0
- data/lib/tdriver/util/filters/loader.rb +29 -0
- data/lib/tdriver/util/fixture/loader.rb +22 -0
- data/lib/tdriver/util/fixture/service.rb +211 -0
- data/lib/tdriver/util/hooking/hooking.rb +477 -0
- data/lib/tdriver/util/keymap/keymap.rb +81 -0
- data/lib/tdriver/util/loader.rb +80 -0
- data/lib/tdriver/util/localisation/error.rb +31 -0
- data/lib/tdriver/util/localisation/loader.rb +25 -0
- data/lib/tdriver/util/localisation/localisation.rb +762 -0
- data/lib/tdriver/util/logger/loader.rb +22 -0
- data/lib/tdriver/util/logger/logger.rb +591 -0
- data/lib/tdriver/util/operator_data/error.rb +29 -0
- data/lib/tdriver/util/operator_data/loader.rb +27 -0
- data/lib/tdriver/util/operator_data/operator_data.rb +93 -0
- data/lib/tdriver/util/other/config.rb +221 -0
- data/lib/tdriver/util/parameter/error.rb +48 -0
- data/lib/tdriver/util/parameter/loader.rb +25 -0
- data/lib/tdriver/util/parameter/parameter.rb +1161 -0
- data/lib/tdriver/util/plugin/abstract.rb +61 -0
- data/lib/tdriver/util/plugin/error.rb +0 -0
- data/lib/tdriver/util/plugin/loader.rb +28 -0
- data/lib/tdriver/util/plugin/service.rb +319 -0
- data/lib/tdriver/util/recorder/loader.rb +25 -0
- data/lib/tdriver/util/recorder/recorder.rb +72 -0
- data/lib/tdriver/util/recorder/scripter.rb +294 -0
- data/lib/tdriver/util/statistics/statistics.rb +89 -0
- data/lib/tdriver/util/user_data/error.rb +28 -0
- data/lib/tdriver/util/user_data/loader.rb +25 -0
- data/lib/tdriver/util/user_data/user_data.rb +104 -0
- data/lib/tdriver/util/video/camera.rb +67 -0
- data/lib/tdriver/util/video/camera_linux.rb +153 -0
- data/lib/tdriver/util/video/camera_windows.rb +174 -0
- data/lib/tdriver/util/video/loader.rb +31 -0
- data/lib/tdriver/util/video/video_utils.rb +139 -0
- data/lib/tdriver/util/xml/abstraction.rb +117 -0
- data/lib/tdriver/util/xml/attribute.rb +32 -0
- data/lib/tdriver/util/xml/builder.rb +53 -0
- data/lib/tdriver/util/xml/comment.rb +32 -0
- data/lib/tdriver/util/xml/document.rb +32 -0
- data/lib/tdriver/util/xml/element.rb +32 -0
- data/lib/tdriver/util/xml/error.rb +46 -0
- data/lib/tdriver/util/xml/loader.rb +62 -0
- data/lib/tdriver/util/xml/nil_node.rb +95 -0
- data/lib/tdriver/util/xml/nodeset.rb +32 -0
- data/lib/tdriver/util/xml/parsers/libxml/libxml.rb +140 -0
- data/lib/tdriver/util/xml/parsers/loader.rb +21 -0
- data/lib/tdriver/util/xml/parsers/nokogiri/abstraction.rb +167 -0
- data/lib/tdriver/util/xml/parsers/nokogiri/attribute.rb +66 -0
- data/lib/tdriver/util/xml/parsers/nokogiri/builder.rb +64 -0
- data/lib/tdriver/util/xml/parsers/nokogiri/comment.rb +39 -0
- data/lib/tdriver/util/xml/parsers/nokogiri/document.rb +66 -0
- data/lib/tdriver/util/xml/parsers/nokogiri/element.rb +39 -0
- data/lib/tdriver/util/xml/parsers/nokogiri/loader.rb +58 -0
- data/lib/tdriver/util/xml/parsers/nokogiri/node.rb +212 -0
- data/lib/tdriver/util/xml/parsers/nokogiri/nodeset.rb +237 -0
- data/lib/tdriver/util/xml/parsers/nokogiri/text.rb +39 -0
- data/lib/tdriver/util/xml/text.rb +32 -0
- data/lib/tdriver/util/xml/xml.rb +332 -0
- data/lib/tdriver/verify/verify.rb +2398 -0
- data/lib/tdriver/version.rb +21 -0
- data/xml/behaviours/generic.xml +530 -0
- data/xml/defaults/generic.xml +11 -0
- data/xml/defaults/sut_generic.xml +8 -0
- data/xml/parameters/tdriver_parameters.xml +23 -0
- data/xml/templates/generic.xml +292 -0
- metadata +324 -0
@@ -0,0 +1 @@
|
|
1
|
+
ruby generate.rb feature_xml/ behaviour_xml/ output/example.xml
|
@@ -0,0 +1,2170 @@
|
|
1
|
+
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2
|
+
<xsl:stylesheet version="1.0"
|
3
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
4
|
+
xmlns:str="http://exslt.org/strings"
|
5
|
+
xmlns:exsl="http://exslt.org/common"
|
6
|
+
extension-element-prefixes="exsl str">
|
7
|
+
|
8
|
+
<xsl:preserve-space elements="*"/>
|
9
|
+
<xsl:output method="html"/>
|
10
|
+
|
11
|
+
<xsl:template match="/">
|
12
|
+
<html>
|
13
|
+
<head>
|
14
|
+
<style TYPE="text/css">
|
15
|
+
|
16
|
+
body
|
17
|
+
{
|
18
|
+
padding: 10px;
|
19
|
+
border: #e7e7e7 1px solid;
|
20
|
+
background: #ffffff;
|
21
|
+
color: black;
|
22
|
+
font-size: 13px;
|
23
|
+
cursor: default;
|
24
|
+
#text-shadow: #909090 1px 1px 1px;
|
25
|
+
}
|
26
|
+
|
27
|
+
h2
|
28
|
+
{
|
29
|
+
text-shadow: #909090 1px 1px 2px;
|
30
|
+
}
|
31
|
+
|
32
|
+
div.feature_title
|
33
|
+
{
|
34
|
+
|
35
|
+
padding: 8px;
|
36
|
+
|
37
|
+
background: #404040;
|
38
|
+
|
39
|
+
border-top: 1px solid #484848;
|
40
|
+
border-left: 1px solid #484848;
|
41
|
+
|
42
|
+
border-bottom: 1px solid #2a2a2a;
|
43
|
+
border-right: 1px solid #2a2a2a;
|
44
|
+
|
45
|
+
-moz-box-shadow: 1px 1px 4px #010101;
|
46
|
+
-webkit-box-shadow: 1px 1px 4px #010101;
|
47
|
+
|
48
|
+
}
|
49
|
+
|
50
|
+
span.feature_title_text, a.feature_name_link
|
51
|
+
{
|
52
|
+
text-decoration: none;
|
53
|
+
font-size: 20px;
|
54
|
+
color: #FFFFFF;
|
55
|
+
text-shadow: #101010 2px 2px 3px;
|
56
|
+
font-weight: bold;
|
57
|
+
}
|
58
|
+
|
59
|
+
span.feature_title_text:hover
|
60
|
+
{
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
}
|
65
|
+
|
66
|
+
div.feature_section_title
|
67
|
+
{
|
68
|
+
|
69
|
+
font-family: arial;
|
70
|
+
font-size: 13px;
|
71
|
+
font-weight: bold;
|
72
|
+
color: #000000;
|
73
|
+
#text-shadow: #A0A0A0 1px 1px 0px;
|
74
|
+
|
75
|
+
}
|
76
|
+
|
77
|
+
div.feature_description, div.feature_call_sequence, div.scenario_description, div.feature_deprecated_version
|
78
|
+
{
|
79
|
+
|
80
|
+
padding: 2px;
|
81
|
+
font-family: 'Times New Roman', Times, serif;
|
82
|
+
font-size: 13px;
|
83
|
+
font-weight: normal;
|
84
|
+
|
85
|
+
}
|
86
|
+
|
87
|
+
div.feature_info
|
88
|
+
{
|
89
|
+
|
90
|
+
font-family: 'Times New Roman', Times, serif;
|
91
|
+
font-weight: normal;
|
92
|
+
|
93
|
+
}
|
94
|
+
|
95
|
+
div.feature_description, div.scenario_description, div.feature_deprecated_version
|
96
|
+
{
|
97
|
+
font-style: normal; // normal more readable than italic;
|
98
|
+
}
|
99
|
+
|
100
|
+
div.feature_call_sequence
|
101
|
+
{
|
102
|
+
|
103
|
+
}
|
104
|
+
|
105
|
+
table.default
|
106
|
+
{
|
107
|
+
|
108
|
+
margin-top: 2px;
|
109
|
+
|
110
|
+
width: 100%;
|
111
|
+
|
112
|
+
text-align: left;
|
113
|
+
|
114
|
+
<!-- cellspacing -->
|
115
|
+
border-spacing: 1px;
|
116
|
+
|
117
|
+
border: 1px solid #c1c1c1;
|
118
|
+
border-top: 1px solid #e1e1e1;
|
119
|
+
border-left: 1px solid #e1e1e1;
|
120
|
+
|
121
|
+
}
|
122
|
+
|
123
|
+
tr.header, tr.header_custom
|
124
|
+
{
|
125
|
+
#background: #96E066;
|
126
|
+
font-weight: bold;
|
127
|
+
}
|
128
|
+
|
129
|
+
tr.header_custom
|
130
|
+
{
|
131
|
+
|
132
|
+
#background: #f0a646;
|
133
|
+
|
134
|
+
}
|
135
|
+
|
136
|
+
td.header_custom{
|
137
|
+
|
138
|
+
background: #f0a646;
|
139
|
+
|
140
|
+
border-top: 1px solid #707070;
|
141
|
+
border-left: 1px solid #707070;
|
142
|
+
|
143
|
+
background: #606260;
|
144
|
+
|
145
|
+
border-bottom: 1px solid #595959;
|
146
|
+
border-right: 1px solid #595959;
|
147
|
+
|
148
|
+
}
|
149
|
+
|
150
|
+
<!-- table-style: cellpadding -->
|
151
|
+
td
|
152
|
+
{
|
153
|
+
|
154
|
+
padding: 6px;
|
155
|
+
font-family: arial;
|
156
|
+
font-size: 11px;
|
157
|
+
|
158
|
+
}
|
159
|
+
|
160
|
+
td.header
|
161
|
+
{
|
162
|
+
|
163
|
+
font-size: 11px;
|
164
|
+
border-top: 1px solid #a0a0a0;
|
165
|
+
border-left: 1px solid #a0a0a0;
|
166
|
+
|
167
|
+
background: #909290;
|
168
|
+
|
169
|
+
border-bottom: 1px solid #797979;
|
170
|
+
border-right: 1px solid #797979;
|
171
|
+
|
172
|
+
|
173
|
+
}
|
174
|
+
|
175
|
+
td.tablebg_even
|
176
|
+
{
|
177
|
+
background: #ededed;
|
178
|
+
border-top: 1px solid #f5f5f5;
|
179
|
+
border-left: 1px solid #f5f5f5;
|
180
|
+
border-bottom: 1px solid #d6d6d6;
|
181
|
+
border-right: 1px solid #d6d6d6;
|
182
|
+
}
|
183
|
+
|
184
|
+
td.tablebg_odd
|
185
|
+
{
|
186
|
+
background: #dedede;
|
187
|
+
border-top: 1px solid #e6e6e6;
|
188
|
+
border-left: 1px solid #e6e6e6;
|
189
|
+
border-bottom: 1px solid #c7c7c7;
|
190
|
+
border-right: 1px solid #c7c7c7;
|
191
|
+
}
|
192
|
+
|
193
|
+
td.warning, div.warning, span.warning, td.tablebg_warning, pre.failed, pre.skipped
|
194
|
+
{
|
195
|
+
|
196
|
+
background: #a11010;
|
197
|
+
color: #ffff00;
|
198
|
+
text-shadow: #666600 1px 1px 4px;
|
199
|
+
|
200
|
+
}
|
201
|
+
|
202
|
+
td.tablebg_warning, td.warning, pre.failed, pre.skipped
|
203
|
+
{
|
204
|
+
|
205
|
+
border-top: 1px solid #a91818;
|
206
|
+
border-left: 1px solid #a91818;
|
207
|
+
|
208
|
+
border-bottom: 1px solid #8a0000;
|
209
|
+
border-right: 1px solid #8a0000;
|
210
|
+
|
211
|
+
}
|
212
|
+
|
213
|
+
td.tablebg_disabled
|
214
|
+
{
|
215
|
+
|
216
|
+
background: #d5d5d5;
|
217
|
+
|
218
|
+
background-image:url('images/bg_disabled.png');
|
219
|
+
background-repeat: repeat;
|
220
|
+
|
221
|
+
border-top: 1px solid #cdcdcd;
|
222
|
+
border-left: 1px solid #cdcdcd;
|
223
|
+
border-bottom: 1px solid #aeaeae;
|
224
|
+
border-right: 1px solid #aeaeae;
|
225
|
+
|
226
|
+
}
|
227
|
+
|
228
|
+
div.warning
|
229
|
+
{
|
230
|
+
color: #ffff00;
|
231
|
+
text-shadow: #666600 1px 1px 4px;
|
232
|
+
|
233
|
+
font-family: arial;
|
234
|
+
font-size: 11px;
|
235
|
+
padding: 6px;
|
236
|
+
|
237
|
+
}
|
238
|
+
|
239
|
+
span.optional_argument
|
240
|
+
{
|
241
|
+
#font-style: italic;
|
242
|
+
color: #777777;
|
243
|
+
}
|
244
|
+
|
245
|
+
pre
|
246
|
+
{
|
247
|
+
|
248
|
+
font-family: monospace;
|
249
|
+
font-size: 11px;
|
250
|
+
|
251
|
+
white-space: pre-wrap;
|
252
|
+
word-wrap: break-word;
|
253
|
+
break-word: break-all;
|
254
|
+
|
255
|
+
}
|
256
|
+
|
257
|
+
pre.passed, pre.failed, pre.skipped, pre.block
|
258
|
+
{
|
259
|
+
|
260
|
+
margin: 5px 2px 9px 2px;
|
261
|
+
padding: 10px 10px 10px 8px;
|
262
|
+
|
263
|
+
}
|
264
|
+
|
265
|
+
pre.passed, pre.block
|
266
|
+
{
|
267
|
+
|
268
|
+
background: #f1f1f1;
|
269
|
+
|
270
|
+
border-top: 1px solid #f9f9f9;
|
271
|
+
border-left: 1px solid #f9f9f9;
|
272
|
+
|
273
|
+
border-bottom: 1px solid #dadada;
|
274
|
+
border-right: 1px solid #dadada;
|
275
|
+
|
276
|
+
color: black;
|
277
|
+
}
|
278
|
+
|
279
|
+
pre.failed, pre.skipped
|
280
|
+
{
|
281
|
+
|
282
|
+
//color: black;
|
283
|
+
|
284
|
+
}
|
285
|
+
span.hover_text
|
286
|
+
{
|
287
|
+
|
288
|
+
cursor: help; //pointer;
|
289
|
+
border-bottom: 1px dotted #b1b1b1;
|
290
|
+
|
291
|
+
}
|
292
|
+
|
293
|
+
span.hover_text:hover
|
294
|
+
{
|
295
|
+
|
296
|
+
cursor: help; //pointer;
|
297
|
+
border-bottom: 1px dotted #515151;
|
298
|
+
|
299
|
+
}
|
300
|
+
|
301
|
+
span.toc_title
|
302
|
+
{
|
303
|
+
|
304
|
+
font-size: 24px;
|
305
|
+
font-weight: bold;
|
306
|
+
#text-shadow: #909090 1px 1px 1px;
|
307
|
+
text-align: center;
|
308
|
+
|
309
|
+
}
|
310
|
+
|
311
|
+
div.toc
|
312
|
+
{
|
313
|
+
|
314
|
+
padding: 5px;
|
315
|
+
width: 65%;
|
316
|
+
word-spacing: normal;
|
317
|
+
}
|
318
|
+
|
319
|
+
span.toc_block
|
320
|
+
{
|
321
|
+
|
322
|
+
padding: 7px;
|
323
|
+
|
324
|
+
}
|
325
|
+
|
326
|
+
a.toc_item
|
327
|
+
{
|
328
|
+
|
329
|
+
font-size: 20px;
|
330
|
+
text-decoration: none;
|
331
|
+
color: #313131;
|
332
|
+
text-align: center;
|
333
|
+
|
334
|
+
}
|
335
|
+
|
336
|
+
a.toc_item2
|
337
|
+
{
|
338
|
+
|
339
|
+
font-size: 11px;
|
340
|
+
text-decoration: none;
|
341
|
+
color: #313131;
|
342
|
+
|
343
|
+
}
|
344
|
+
|
345
|
+
a.toc_item:hover
|
346
|
+
{
|
347
|
+
|
348
|
+
border-bottom: 1px dotted #515151;
|
349
|
+
|
350
|
+
}
|
351
|
+
|
352
|
+
a.toc_item2:hover
|
353
|
+
{
|
354
|
+
|
355
|
+
border-bottom: 1px dotted #515151;
|
356
|
+
|
357
|
+
}
|
358
|
+
|
359
|
+
|
360
|
+
a.jump_to
|
361
|
+
{
|
362
|
+
|
363
|
+
font-size: 11px;
|
364
|
+
text-decoration: none;
|
365
|
+
color: #313131;
|
366
|
+
|
367
|
+
}
|
368
|
+
|
369
|
+
a.jump_to:hover
|
370
|
+
{
|
371
|
+
|
372
|
+
border-bottom: 1px dotted #515151;
|
373
|
+
|
374
|
+
}
|
375
|
+
|
376
|
+
a.link
|
377
|
+
{
|
378
|
+
|
379
|
+
text-decoration: none;
|
380
|
+
|
381
|
+
color: #d15131;
|
382
|
+
|
383
|
+
color: #a06060;
|
384
|
+
|
385
|
+
color: #605555;
|
386
|
+
|
387
|
+
#text-shadow: #ff8f6f 1px 1px 4px;
|
388
|
+
|
389
|
+
#text-shadow: #b0a0a0 1px 1px 4px;
|
390
|
+
|
391
|
+
border-bottom: 1px dotted #515151;
|
392
|
+
font-weight: bold;
|
393
|
+
|
394
|
+
}
|
395
|
+
|
396
|
+
a.link:hover
|
397
|
+
{
|
398
|
+
|
399
|
+
border-bottom: 1px dotted #000000;
|
400
|
+
color: #000000;
|
401
|
+
|
402
|
+
}
|
403
|
+
|
404
|
+
|
405
|
+
img
|
406
|
+
{
|
407
|
+
|
408
|
+
border: 0px;
|
409
|
+
|
410
|
+
}
|
411
|
+
|
412
|
+
tr.header, tr.header_custom, div.feature_title, table.default, td.header, td.header_custom, td.tablebg_even, td.tablebg_odd, td.tablebg_warning, td.warning, div.warning, td.tablebg_disabled, pre.passed, pre.failed, pre.skipped, pre.block
|
413
|
+
{
|
414
|
+
|
415
|
+
-moz-border-radius: 5px 5px 5px 5px;
|
416
|
+
|
417
|
+
-webkit-border-radius: 9px;
|
418
|
+
-webkit-border-top-left-radius: 9px;
|
419
|
+
-webkit-border-bottom-right-radius: 9px;
|
420
|
+
|
421
|
+
|
422
|
+
}
|
423
|
+
|
424
|
+
</style>
|
425
|
+
</head>
|
426
|
+
<body>
|
427
|
+
|
428
|
+
<a name="top">
|
429
|
+
<center>
|
430
|
+
<h1>Testability Driver API Documentation</h1>
|
431
|
+
</center>
|
432
|
+
</a>
|
433
|
+
|
434
|
+
<xsl:apply-templates/>
|
435
|
+
|
436
|
+
</body>
|
437
|
+
</html>
|
438
|
+
</xsl:template>
|
439
|
+
|
440
|
+
<xsl:template match="documentation">
|
441
|
+
<!-- table of contents -->
|
442
|
+
<br />
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
<xsl:for-each select="feature/@name">
|
447
|
+
|
448
|
+
<xsl:sort select="." />
|
449
|
+
|
450
|
+
<!---
|
451
|
+
|
452
|
+
file:///home/jussi/git/2010-10-07/driver/lib/output/example.xml#QT;TestObject;activate
|
453
|
+
|
454
|
+
-->
|
455
|
+
|
456
|
+
<xsl:variable name="name"><xsl:value-of select="../@name"/></xsl:variable>
|
457
|
+
<xsl:variable name="module"><xsl:value-of select="../behaviour/@module"/></xsl:variable>
|
458
|
+
<xsl:variable name="module_name"><xsl:value-of select="../behaviour/@name"/></xsl:variable>
|
459
|
+
|
460
|
+
<xsl:for-each select="str:split(.,';')">
|
461
|
+
<span class="toc_block"><a href="#{ $module_name }:{ $name }" class="toc_item2" title="{ $module_name } ({ $module })"><xsl:value-of select="." /></a><xsl:text> </xsl:text></span>
|
462
|
+
</xsl:for-each>
|
463
|
+
|
464
|
+
<xsl:text> </xsl:text>
|
465
|
+
|
466
|
+
</xsl:for-each>
|
467
|
+
|
468
|
+
|
469
|
+
<br />
|
470
|
+
|
471
|
+
<!-- content -->
|
472
|
+
|
473
|
+
<!-- table of contents -->
|
474
|
+
<center>
|
475
|
+
<span class="toc_title">Table of contents:</span>
|
476
|
+
<br />
|
477
|
+
|
478
|
+
<div class="toc">
|
479
|
+
<table class="default">
|
480
|
+
<tr class="header">
|
481
|
+
<td class="header">Method</td>
|
482
|
+
<td class="header">Description</td>
|
483
|
+
</tr>
|
484
|
+
<xsl:for-each select="feature/@name">
|
485
|
+
|
486
|
+
<xsl:sort select="." />
|
487
|
+
|
488
|
+
<!---
|
489
|
+
|
490
|
+
file:///home/jussi/git/2010-10-07/driver/lib/output/example.xml#QT;TestObject;activate
|
491
|
+
|
492
|
+
-->
|
493
|
+
|
494
|
+
<xsl:variable name="name">
|
495
|
+
<xsl:value-of select="../@name"/>
|
496
|
+
</xsl:variable>
|
497
|
+
<xsl:variable name="module">
|
498
|
+
<xsl:value-of select="../behaviour/@module"/>
|
499
|
+
</xsl:variable>
|
500
|
+
<xsl:variable name="module_name">
|
501
|
+
<xsl:value-of select="../behaviour/@name"/>
|
502
|
+
</xsl:variable>
|
503
|
+
<xsl:variable name="feature_description">
|
504
|
+
<xsl:call-template name="formatted_content">
|
505
|
+
<xsl:with-param name="text" select="../description/text()" />
|
506
|
+
</xsl:call-template>
|
507
|
+
</xsl:variable>
|
508
|
+
|
509
|
+
<tr>
|
510
|
+
<td class="tablebg_even" valign="top">
|
511
|
+
<xsl:for-each select="str:split(.,';')">
|
512
|
+
<span class="toc_block">
|
513
|
+
<a href="#{ $module_name }:{ $name }" class="toc_item" title="{ $module_name } ({ $module })">
|
514
|
+
<xsl:value-of select="." />
|
515
|
+
</a>
|
516
|
+
<xsl:text> </xsl:text>
|
517
|
+
</span>
|
518
|
+
</xsl:for-each>
|
519
|
+
</td>
|
520
|
+
<td class="tablebg_even" valign="top">
|
521
|
+
|
522
|
+
<xsl:value-of select="$feature_description" />
|
523
|
+
|
524
|
+
</td>
|
525
|
+
</tr>
|
526
|
+
<xsl:text> </xsl:text>
|
527
|
+
|
528
|
+
</xsl:for-each>
|
529
|
+
</table>
|
530
|
+
</div>
|
531
|
+
</center>
|
532
|
+
<hr />
|
533
|
+
|
534
|
+
<!-- content -->
|
535
|
+
|
536
|
+
<xsl:for-each select="feature">
|
537
|
+
<xsl:sort select="@name" />
|
538
|
+
<xsl:call-template name="feature">
|
539
|
+
</xsl:call-template>
|
540
|
+
|
541
|
+
</xsl:for-each>
|
542
|
+
|
543
|
+
</xsl:template>
|
544
|
+
|
545
|
+
<xsl:template name="feature_name">
|
546
|
+
|
547
|
+
<!-- implements following features, e.g. method name, attribute reader, attribute writer or both when attribute accessor -->
|
548
|
+
|
549
|
+
<!-- #{ $module }.{ $name }-->
|
550
|
+
|
551
|
+
<a name="{ ./behaviour/@name }:{ @name }"></a>
|
552
|
+
<div class="feature_title">
|
553
|
+
<a href="#{ ./behaviour/@name }:{ @name }" class="feature_name_link">
|
554
|
+
<xsl:for-each select="str:split(@name,';')">
|
555
|
+
<span class="feature_title_text">
|
556
|
+
<xsl:value-of select="."/>
|
557
|
+
</span>
|
558
|
+
<xsl:if test="position()!=last()">
|
559
|
+
<xsl:text>, </xsl:text>
|
560
|
+
</xsl:if>
|
561
|
+
</xsl:for-each>
|
562
|
+
</a>
|
563
|
+
</div>
|
564
|
+
|
565
|
+
<br />
|
566
|
+
|
567
|
+
</xsl:template>
|
568
|
+
|
569
|
+
<xsl:template name="call_sequence">
|
570
|
+
|
571
|
+
<div class="feature_section_title">Call sequence:</div>
|
572
|
+
|
573
|
+
<div class="feature_call_sequence">
|
574
|
+
<!-- method: call example using parameters -->
|
575
|
+
<xsl:if test="@type='method'">
|
576
|
+
|
577
|
+
<!-- contains($type/@name,' ') -->
|
578
|
+
|
579
|
+
<!--
|
580
|
+
|
581
|
+
<xsl:choose>
|
582
|
+
<xsl:when test="string-length($tmp_full_tag)=0">
|
583
|
+
<xsl:value-of select="substring-after(substring-before($text, ']'), '[')" />
|
584
|
+
</xsl:when>
|
585
|
+
<xsl:otherwise>
|
586
|
+
<xsl:value-of select="$tmp_full_tag" />
|
587
|
+
</xsl:otherwise>
|
588
|
+
</xsl:choose>
|
589
|
+
|
590
|
+
|
591
|
+
-->
|
592
|
+
|
593
|
+
<!-- determine whether add dot between the object and method; e.g. object.method or object[]-->
|
594
|
+
|
595
|
+
<xsl:choose>
|
596
|
+
<xsl:when test="contains(@name, '[')">
|
597
|
+
<xsl:text>object</xsl:text>
|
598
|
+
</xsl:when>
|
599
|
+
<xsl:otherwise>
|
600
|
+
<xsl:text>object.</xsl:text>
|
601
|
+
<xsl:value-of select="@name" />
|
602
|
+
</xsl:otherwise>
|
603
|
+
</xsl:choose>
|
604
|
+
|
605
|
+
<xsl:choose>
|
606
|
+
|
607
|
+
<xsl:when test="arguments/@count>0 and count(arguments/argument)<arguments/@count">
|
608
|
+
<xsl:text>( </xsl:text>
|
609
|
+
<xsl:call-template name="span_warning">
|
610
|
+
<xsl:with-param name="text">Incomplete arguments documentation</xsl:with-param>
|
611
|
+
</xsl:call-template>
|
612
|
+
<xsl:text> )</xsl:text>
|
613
|
+
</xsl:when>
|
614
|
+
|
615
|
+
<xsl:when test="count(arguments/argument)=0"></xsl:when>
|
616
|
+
|
617
|
+
<xsl:when test="count(arguments/argument)>0">
|
618
|
+
|
619
|
+
<!-- do not show parenthesis if first argument is type of block -->
|
620
|
+
<xsl:if test="arguments/argument[1]/@type!='block'">
|
621
|
+
|
622
|
+
<xsl:choose>
|
623
|
+
<xsl:when test="contains(@name, '[')">
|
624
|
+
<xsl:text>[ </xsl:text>
|
625
|
+
</xsl:when>
|
626
|
+
<xsl:otherwise>
|
627
|
+
<xsl:text>( </xsl:text>
|
628
|
+
</xsl:otherwise>
|
629
|
+
</xsl:choose>
|
630
|
+
|
631
|
+
<!--<xsl:text>( </xsl:text>-->
|
632
|
+
|
633
|
+
<!-- collect arguments for example -->
|
634
|
+
<xsl:for-each select="arguments/argument">
|
635
|
+
|
636
|
+
<xsl:if test="@type='normal' or @type='multi'">
|
637
|
+
|
638
|
+
<xsl:choose>
|
639
|
+
|
640
|
+
<xsl:when test="@optional='true'">
|
641
|
+
|
642
|
+
<span class="optional_argument" title="Optional argument">
|
643
|
+
|
644
|
+
<xsl:if test="@type='multi'">
|
645
|
+
<xsl:text></xsl:text>
|
646
|
+
</xsl:if>
|
647
|
+
|
648
|
+
<xsl:text></xsl:text>
|
649
|
+
<span class="hover_text">
|
650
|
+
<xsl:value-of select="@name"/>
|
651
|
+
<xsl:if test="@type='multi'">
|
652
|
+
<xsl:text>, ..., ...</xsl:text>
|
653
|
+
</xsl:if>
|
654
|
+
</span>
|
655
|
+
|
656
|
+
<xsl:text></xsl:text>
|
657
|
+
|
658
|
+
</span>
|
659
|
+
|
660
|
+
</xsl:when>
|
661
|
+
|
662
|
+
<xsl:otherwise>
|
663
|
+
<span title="Mandatory argument" class="hover_text">
|
664
|
+
<xsl:value-of select="@name"/>
|
665
|
+
</span>
|
666
|
+
</xsl:otherwise>
|
667
|
+
|
668
|
+
</xsl:choose>
|
669
|
+
|
670
|
+
<!-- separate arguments with comma if next argument defintion is not type of block -->
|
671
|
+
<xsl:if test="position()!=last() and (string(following-sibling::argument/@type)!='block' and string(following-sibling::argument/@type)!='block_argument')">
|
672
|
+
<xsl:text>, </xsl:text>
|
673
|
+
</xsl:if>
|
674
|
+
|
675
|
+
</xsl:if>
|
676
|
+
|
677
|
+
</xsl:for-each>
|
678
|
+
<!--<xsl:text> ) </xsl:text>-->
|
679
|
+
|
680
|
+
<xsl:choose>
|
681
|
+
<xsl:when test="contains(@name, ']')">
|
682
|
+
<xsl:text> ] </xsl:text>
|
683
|
+
</xsl:when>
|
684
|
+
<xsl:otherwise>
|
685
|
+
<xsl:text> ) </xsl:text>
|
686
|
+
</xsl:otherwise>
|
687
|
+
</xsl:choose>
|
688
|
+
|
689
|
+
|
690
|
+
</xsl:if>
|
691
|
+
|
692
|
+
<!-- collect arguments for example -->
|
693
|
+
<xsl:for-each select="arguments/argument">
|
694
|
+
|
695
|
+
<xsl:if test="./@type='block'">
|
696
|
+
|
697
|
+
<xsl:text>{ </xsl:text>
|
698
|
+
|
699
|
+
<xsl:for-each select="../../arguments/argument[@type='block_argument']">
|
700
|
+
|
701
|
+
<xsl:choose>
|
702
|
+
<xsl:when test="position()=1">
|
703
|
+
<xsl:text>| </xsl:text>
|
704
|
+
</xsl:when>
|
705
|
+
<xsl:otherwise>
|
706
|
+
<xsl:text>, </xsl:text>
|
707
|
+
</xsl:otherwise>
|
708
|
+
</xsl:choose>
|
709
|
+
|
710
|
+
<span title="Code block argument, mandatory or optional" class="hover_text">
|
711
|
+
<xsl:value-of select="str:split(@name,'#')[2]"/>
|
712
|
+
</span>
|
713
|
+
|
714
|
+
<xsl:if test="position()=last()">
|
715
|
+
<xsl:text> | </xsl:text>
|
716
|
+
</xsl:if>
|
717
|
+
|
718
|
+
</xsl:for-each>
|
719
|
+
|
720
|
+
<span class="hover_text" title="Code block, mandatory or optional">
|
721
|
+
<xsl:value-of select="@name"/>
|
722
|
+
</span>
|
723
|
+
<xsl:text> }</xsl:text>
|
724
|
+
|
725
|
+
</xsl:if>
|
726
|
+
|
727
|
+
</xsl:for-each>
|
728
|
+
|
729
|
+
</xsl:when>
|
730
|
+
|
731
|
+
</xsl:choose>
|
732
|
+
|
733
|
+
<!-- describe block usage -->
|
734
|
+
<xsl:if test="count(arguments/block)>0">
|
735
|
+
<xsl:text>{ dsadsa</xsl:text>
|
736
|
+
<!-- TODO: block arguments -->
|
737
|
+
<xsl:value-of select="arguments/block/@name" />
|
738
|
+
<xsl:text> }</xsl:text>
|
739
|
+
</xsl:if>
|
740
|
+
<br />
|
741
|
+
</xsl:if>
|
742
|
+
|
743
|
+
<!-- attr_reader/attr_accessor: call example -->
|
744
|
+
<xsl:if test="@type='reader' or @type='accessor'">
|
745
|
+
<xsl:text>return_value = object.</xsl:text>
|
746
|
+
<xsl:value-of select="str:split(@name,';')[1]" />
|
747
|
+
<br />
|
748
|
+
</xsl:if>
|
749
|
+
|
750
|
+
<!-- attr_writer/attr_accessor: call example -->
|
751
|
+
<xsl:if test="@type='writer' or @type='accessor'">
|
752
|
+
|
753
|
+
<!-- TODO: argument name from arguments array -->
|
754
|
+
<xsl:text>object.</xsl:text>
|
755
|
+
<xsl:value-of select="str:split(@name,';')[1]" />
|
756
|
+
<xsl:text> = ( </xsl:text>
|
757
|
+
|
758
|
+
<xsl:choose>
|
759
|
+
|
760
|
+
<xsl:when test="count(arguments/argument)=0">
|
761
|
+
<span title="Mandatory value" class="hover_text">
|
762
|
+
<xsl:text>new_value</xsl:text>
|
763
|
+
</span>
|
764
|
+
</xsl:when>
|
765
|
+
|
766
|
+
<xsl:otherwise>
|
767
|
+
<span title="Mandatory value" class="hover_text">
|
768
|
+
<xsl:value-of select="arguments/argument[1]/@name" />
|
769
|
+
</span>
|
770
|
+
</xsl:otherwise>
|
771
|
+
|
772
|
+
</xsl:choose>
|
773
|
+
|
774
|
+
<xsl:text> )</xsl:text>
|
775
|
+
<br />
|
776
|
+
</xsl:if>
|
777
|
+
|
778
|
+
</div>
|
779
|
+
|
780
|
+
<br />
|
781
|
+
|
782
|
+
</xsl:template>
|
783
|
+
|
784
|
+
<!-- template to capitalize string -->
|
785
|
+
<xsl:template name="capitalize">
|
786
|
+
|
787
|
+
<xsl:param name="text" />
|
788
|
+
|
789
|
+
<xsl:value-of select="concat(translate(substring($text,1,1), 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ'), substring($text,2))"/>
|
790
|
+
|
791
|
+
</xsl:template>
|
792
|
+
|
793
|
+
<xsl:template name="target_details">
|
794
|
+
|
795
|
+
<div class="feature_section_title">Feature and target details:</div>
|
796
|
+
<table class="default">
|
797
|
+
<tr class="header">
|
798
|
+
<td class="header">Type</td>
|
799
|
+
<td class="header">Target object</td>
|
800
|
+
<td class="header">SUT type</td>
|
801
|
+
<td class="header">SUT version</td>
|
802
|
+
<td class="header">SUT input type</td>
|
803
|
+
<td class="header">Behaviour module and name</td>
|
804
|
+
<td class="header">Required plugin</td>
|
805
|
+
</tr>
|
806
|
+
<tr>
|
807
|
+
|
808
|
+
<!-- feature type -->
|
809
|
+
<td class="tablebg_even" valign="top">
|
810
|
+
<!-- capitalize text() -->
|
811
|
+
<xsl:call-template name="capitalize">
|
812
|
+
<xsl:with-param name="text" select="@type" />
|
813
|
+
</xsl:call-template>
|
814
|
+
</td>
|
815
|
+
|
816
|
+
<!-- target object -->
|
817
|
+
<xsl:choose>
|
818
|
+
<xsl:when test="string-length(@object_type)>0">
|
819
|
+
<td class="tablebg_even" valign="top">
|
820
|
+
<xsl:for-each select="str:split(@object_type,';')">
|
821
|
+
<xsl:choose>
|
822
|
+
<xsl:when test="text()='*'">
|
823
|
+
<xsl:text>Any test object</xsl:text>
|
824
|
+
</xsl:when>
|
825
|
+
<xsl:when test="text()='sut'">
|
826
|
+
<xsl:text>SUT object</xsl:text>
|
827
|
+
</xsl:when>
|
828
|
+
<xsl:otherwise>
|
829
|
+
<xsl:value-of select="text()" />
|
830
|
+
</xsl:otherwise>
|
831
|
+
</xsl:choose>
|
832
|
+
<xsl:if test="position()!=last()">
|
833
|
+
<xsl:text>,</xsl:text>
|
834
|
+
</xsl:if>
|
835
|
+
<br />
|
836
|
+
</xsl:for-each>
|
837
|
+
</td>
|
838
|
+
</xsl:when>
|
839
|
+
<xsl:otherwise>
|
840
|
+
<td class="tablebg_warning" valign="top">
|
841
|
+
<xsl:call-template name="div_warning">
|
842
|
+
<xsl:with-param name="text">Not defined</xsl:with-param>
|
843
|
+
</xsl:call-template>
|
844
|
+
</td>
|
845
|
+
</xsl:otherwise>
|
846
|
+
</xsl:choose>
|
847
|
+
|
848
|
+
|
849
|
+
|
850
|
+
<!-- target sut -->
|
851
|
+
<xsl:choose>
|
852
|
+
<xsl:when test="string-length(@sut_type)>0">
|
853
|
+
<td class="tablebg_even" valign="top">
|
854
|
+
<xsl:for-each select="str:split(@sut_type,';')">
|
855
|
+
<xsl:choose>
|
856
|
+
<xsl:when test="text()='*'">
|
857
|
+
<xsl:text>Any SUT type</xsl:text>
|
858
|
+
</xsl:when>
|
859
|
+
<xsl:otherwise>
|
860
|
+
<!-- capitalize text() -->
|
861
|
+
<xsl:call-template name="capitalize">
|
862
|
+
<xsl:with-param name="text" select="text()" />
|
863
|
+
</xsl:call-template>
|
864
|
+
</xsl:otherwise>
|
865
|
+
</xsl:choose>
|
866
|
+
<xsl:if test="position()!=last()">
|
867
|
+
<xsl:text>,</xsl:text>
|
868
|
+
</xsl:if>
|
869
|
+
<br />
|
870
|
+
</xsl:for-each>
|
871
|
+
</td>
|
872
|
+
</xsl:when>
|
873
|
+
<xsl:otherwise>
|
874
|
+
<td class="tablebg_warning" valign="top">
|
875
|
+
<xsl:call-template name="div_warning">
|
876
|
+
<xsl:with-param name="text">Not defined</xsl:with-param>
|
877
|
+
</xsl:call-template>
|
878
|
+
</td>
|
879
|
+
</xsl:otherwise>
|
880
|
+
</xsl:choose>
|
881
|
+
|
882
|
+
<!-- sut version -->
|
883
|
+
<xsl:choose>
|
884
|
+
<xsl:when test="string-length(@sut_version)>0">
|
885
|
+
<td class="tablebg_even" valign="top">
|
886
|
+
<xsl:for-each select="str:split(@sut_version,';')">
|
887
|
+
|
888
|
+
<xsl:choose>
|
889
|
+
<xsl:when test="text()='*'">
|
890
|
+
<xsl:text>All</xsl:text>
|
891
|
+
</xsl:when>
|
892
|
+
<xsl:otherwise>
|
893
|
+
<!-- capitalize text() -->
|
894
|
+
<xsl:call-template name="capitalize">
|
895
|
+
<xsl:with-param name="text" select="text()" />
|
896
|
+
</xsl:call-template>
|
897
|
+
</xsl:otherwise>
|
898
|
+
</xsl:choose>
|
899
|
+
<xsl:if test="position()!=last()">
|
900
|
+
<xsl:text>,</xsl:text>
|
901
|
+
</xsl:if>
|
902
|
+
<br />
|
903
|
+
</xsl:for-each>
|
904
|
+
</td>
|
905
|
+
</xsl:when>
|
906
|
+
<xsl:otherwise>
|
907
|
+
<td class="tablebg_warning" valign="top">
|
908
|
+
<xsl:call-template name="div_warning">
|
909
|
+
<xsl:with-param name="text">Not defined</xsl:with-param>
|
910
|
+
</xsl:call-template>
|
911
|
+
</td>
|
912
|
+
</xsl:otherwise>
|
913
|
+
</xsl:choose>
|
914
|
+
|
915
|
+
<!-- input type -->
|
916
|
+
<xsl:choose>
|
917
|
+
<xsl:when test="string-length(@input_type)=0">
|
918
|
+
<td class="tablebg_warning" valign="top">
|
919
|
+
<xsl:call-template name="div_warning">
|
920
|
+
<xsl:with-param name="text">Not defined</xsl:with-param>
|
921
|
+
</xsl:call-template>
|
922
|
+
</td>
|
923
|
+
</xsl:when>
|
924
|
+
<xsl:otherwise>
|
925
|
+
<td class="tablebg_even" valign="top">
|
926
|
+
<xsl:for-each select="str:split(@input_type,';')">
|
927
|
+
<xsl:choose>
|
928
|
+
<xsl:when test="text()='*'">
|
929
|
+
<xsl:text>All</xsl:text>
|
930
|
+
</xsl:when>
|
931
|
+
<xsl:otherwise>
|
932
|
+
<!-- capitalize text() -->
|
933
|
+
<xsl:call-template name="capitalize">
|
934
|
+
<xsl:with-param name="text" select="text()" />
|
935
|
+
</xsl:call-template>
|
936
|
+
</xsl:otherwise>
|
937
|
+
</xsl:choose>
|
938
|
+
<xsl:if test="position()!=last()">
|
939
|
+
<xsl:text>,</xsl:text>
|
940
|
+
</xsl:if>
|
941
|
+
<br />
|
942
|
+
</xsl:for-each>
|
943
|
+
</td>
|
944
|
+
</xsl:otherwise>
|
945
|
+
</xsl:choose>
|
946
|
+
|
947
|
+
<!-- behaviour module -->
|
948
|
+
<xsl:choose>
|
949
|
+
<xsl:when test="string-length(behaviour/@module)>0">
|
950
|
+
|
951
|
+
<xsl:choose>
|
952
|
+
<xsl:when test="string-length(behaviour/@name)>0">
|
953
|
+
|
954
|
+
<td class="tablebg_even" valign="top">
|
955
|
+
<xsl:value-of select="behaviour/@module" />
|
956
|
+
<xsl:text> (</xsl:text>
|
957
|
+
<xsl:value-of select="behaviour/@name" />
|
958
|
+
<xsl:text>)</xsl:text>
|
959
|
+
</td>
|
960
|
+
|
961
|
+
</xsl:when>
|
962
|
+
<xsl:otherwise>
|
963
|
+
|
964
|
+
<td class="tablebg_warning" valign="top">
|
965
|
+
<xsl:call-template name="div_warning">
|
966
|
+
<xsl:with-param name="text">
|
967
|
+
<xsl:value-of select="behaviour/@module" />
|
968
|
+
<xsl:text> (Behaviour name not defined)</xsl:text>
|
969
|
+
</xsl:with-param>
|
970
|
+
</xsl:call-template>
|
971
|
+
</td>
|
972
|
+
|
973
|
+
</xsl:otherwise>
|
974
|
+
</xsl:choose>
|
975
|
+
|
976
|
+
</xsl:when>
|
977
|
+
<xsl:otherwise>
|
978
|
+
<td class="tablebg_warning" valign="top">
|
979
|
+
<xsl:call-template name="div_warning">
|
980
|
+
<xsl:with-param name="text">Not defined</xsl:with-param>
|
981
|
+
</xsl:call-template>
|
982
|
+
</td>
|
983
|
+
</xsl:otherwise>
|
984
|
+
</xsl:choose>
|
985
|
+
|
986
|
+
<!-- required plugin -->
|
987
|
+
<xsl:choose>
|
988
|
+
<xsl:when test="string-length(@required_plugin)=0">
|
989
|
+
<td class="tablebg_warning" valign="top">
|
990
|
+
<xsl:call-template name="div_warning">
|
991
|
+
<xsl:with-param name="text">Not defined</xsl:with-param>
|
992
|
+
</xsl:call-template>
|
993
|
+
</td>
|
994
|
+
</xsl:when>
|
995
|
+
<xsl:when test="@required_plugin!='*'">
|
996
|
+
<td class="tablebg_even" valign="top">
|
997
|
+
<xsl:value-of select="@required_plugin" />
|
998
|
+
</td>
|
999
|
+
</xsl:when>
|
1000
|
+
<xsl:otherwise>
|
1001
|
+
<td class="tablebg_disabled" valign="top"></td>
|
1002
|
+
</xsl:otherwise>
|
1003
|
+
</xsl:choose>
|
1004
|
+
|
1005
|
+
</tr>
|
1006
|
+
|
1007
|
+
</table>
|
1008
|
+
<br />
|
1009
|
+
|
1010
|
+
</xsl:template>
|
1011
|
+
|
1012
|
+
<xsl:template name="feature">
|
1013
|
+
|
1014
|
+
<div id="{ ./behaviour/@name }.@name">
|
1015
|
+
|
1016
|
+
<xsl:call-template name="feature_name" />
|
1017
|
+
|
1018
|
+
<xsl:if test="count(deprecated)>0">
|
1019
|
+
|
1020
|
+
<xsl:call-template name="deprecated" />
|
1021
|
+
|
1022
|
+
</xsl:if>
|
1023
|
+
|
1024
|
+
<xsl:call-template name="description" />
|
1025
|
+
|
1026
|
+
<xsl:if test="count(deprecated)>0">
|
1027
|
+
|
1028
|
+
<xsl:call-template name="target_details" />
|
1029
|
+
|
1030
|
+
</xsl:if>
|
1031
|
+
|
1032
|
+
<xsl:if test="count(deprecated)=0">
|
1033
|
+
|
1034
|
+
<xsl:call-template name="call_sequence" />
|
1035
|
+
|
1036
|
+
<xsl:call-template name="target_details" />
|
1037
|
+
|
1038
|
+
<xsl:call-template name="arguments" />
|
1039
|
+
|
1040
|
+
<xsl:call-template name="returns">
|
1041
|
+
<xsl:with-param name="type" select="returns/type" />
|
1042
|
+
<xsl:with-param name="feature_type" select="@type" />
|
1043
|
+
</xsl:call-template>
|
1044
|
+
|
1045
|
+
<xsl:call-template name="exceptions">
|
1046
|
+
<xsl:with-param name="type" select="exceptions/type" />
|
1047
|
+
<xsl:with-param name="feature_type" select="@type" />
|
1048
|
+
</xsl:call-template>
|
1049
|
+
|
1050
|
+
<xsl:if test="count(tables/table)>0">
|
1051
|
+
<!-- custom tables -->
|
1052
|
+
<xsl:call-template name="tables" />
|
1053
|
+
</xsl:if>
|
1054
|
+
|
1055
|
+
<xsl:call-template name="tests">
|
1056
|
+
<xsl:with-param name="tests" select="tests" />
|
1057
|
+
</xsl:call-template>
|
1058
|
+
|
1059
|
+
</xsl:if>
|
1060
|
+
|
1061
|
+
<xsl:call-template name="info" />
|
1062
|
+
|
1063
|
+
<xsl:if test="position()!=last()-1">
|
1064
|
+
<!-- feature separator? -->
|
1065
|
+
</xsl:if>
|
1066
|
+
|
1067
|
+
<a href="#top" class="jump_to">Jump to top of page</a>
|
1068
|
+
<br />
|
1069
|
+
<br />
|
1070
|
+
|
1071
|
+
</div>
|
1072
|
+
|
1073
|
+
</xsl:template>
|
1074
|
+
|
1075
|
+
<xsl:template name="exceptions">
|
1076
|
+
|
1077
|
+
<xsl:param name="type" />
|
1078
|
+
<xsl:param name="feature_type" />
|
1079
|
+
|
1080
|
+
<xsl:if test="count($type)>0">
|
1081
|
+
|
1082
|
+
<!-- exceptions -->
|
1083
|
+
<div class="feature_section_title">Exceptions:</div>
|
1084
|
+
|
1085
|
+
<table class="default">
|
1086
|
+
<tr class="header">
|
1087
|
+
<td class="header">Type</td>
|
1088
|
+
<td class="header">Description</td>
|
1089
|
+
</tr>
|
1090
|
+
|
1091
|
+
<xsl:for-each select="$type">
|
1092
|
+
|
1093
|
+
<xsl:choose>
|
1094
|
+
|
1095
|
+
<xsl:when test="(number(position()-1) mod 2)=0">
|
1096
|
+
<xsl:call-template name="exception_type">
|
1097
|
+
<xsl:with-param name="type" select="." />
|
1098
|
+
<xsl:with-param name="class">tablebg_even</xsl:with-param>
|
1099
|
+
</xsl:call-template>
|
1100
|
+
</xsl:when>
|
1101
|
+
|
1102
|
+
<xsl:otherwise>
|
1103
|
+
<xsl:call-template name="exception_type">
|
1104
|
+
<xsl:with-param name="type" select="." />
|
1105
|
+
<xsl:with-param name="class">tablebg_odd</xsl:with-param>
|
1106
|
+
</xsl:call-template>
|
1107
|
+
</xsl:otherwise>
|
1108
|
+
|
1109
|
+
</xsl:choose>
|
1110
|
+
|
1111
|
+
</xsl:for-each>
|
1112
|
+
|
1113
|
+
</table>
|
1114
|
+
<br />
|
1115
|
+
|
1116
|
+
</xsl:if>
|
1117
|
+
|
1118
|
+
</xsl:template>
|
1119
|
+
|
1120
|
+
<xsl:template name="exception_type">
|
1121
|
+
|
1122
|
+
<xsl:param name="type" />
|
1123
|
+
<xsl:param name="class" />
|
1124
|
+
|
1125
|
+
<tr valign="top" class="{ $class }">
|
1126
|
+
<td class="{ $class }">
|
1127
|
+
<xsl:value-of select="$type/@name"/>
|
1128
|
+
</td>
|
1129
|
+
|
1130
|
+
|
1131
|
+
<xsl:choose>
|
1132
|
+
|
1133
|
+
|
1134
|
+
|
1135
|
+
<xsl:when test="string-length($type/description)=0">
|
1136
|
+
|
1137
|
+
<xsl:call-template name="col_warning" >
|
1138
|
+
<xsl:with-param name="text">Exception description not defined</xsl:with-param>
|
1139
|
+
</xsl:call-template>
|
1140
|
+
|
1141
|
+
</xsl:when>
|
1142
|
+
|
1143
|
+
<xsl:otherwise>
|
1144
|
+
<td class="{ $class }">
|
1145
|
+
<xsl:for-each select="str:split($type/description,'\n')">
|
1146
|
+
<xsl:value-of select="text()" />
|
1147
|
+
<br />
|
1148
|
+
</xsl:for-each>
|
1149
|
+
</td>
|
1150
|
+
</xsl:otherwise>
|
1151
|
+
|
1152
|
+
</xsl:choose>
|
1153
|
+
<!--
|
1154
|
+
|
1155
|
+
<td class="{ $class }"><xsl:for-each select="str:split($type/description,'\n')"><xsl:value-of select="text()" /><br /></xsl:for-each></td>
|
1156
|
+
-->
|
1157
|
+
|
1158
|
+
|
1159
|
+
|
1160
|
+
</tr>
|
1161
|
+
|
1162
|
+
</xsl:template>
|
1163
|
+
|
1164
|
+
<xsl:template name="argument_details">
|
1165
|
+
|
1166
|
+
<xsl:param name="argument_name" />
|
1167
|
+
<xsl:param name="type" />
|
1168
|
+
<xsl:param name="default" />
|
1169
|
+
<xsl:param name="class" />
|
1170
|
+
|
1171
|
+
<xsl:choose>
|
1172
|
+
|
1173
|
+
<xsl:when test="count(type)>0">
|
1174
|
+
|
1175
|
+
<xsl:variable name="argument_types" select="count(type)" />
|
1176
|
+
|
1177
|
+
<xsl:for-each select="type">
|
1178
|
+
|
1179
|
+
<tr valign="top" class="{ $class }">
|
1180
|
+
|
1181
|
+
<xsl:if test="position()=1">
|
1182
|
+
|
1183
|
+
<xsl:choose>
|
1184
|
+
|
1185
|
+
<xsl:when test="string(../@type)='block_argument'">
|
1186
|
+
<td rowspan="{ $argument_types }" class="{ $class }">
|
1187
|
+
<span title="Code block argument, mandatory or optional" class="hover_text">
|
1188
|
+
<xsl:value-of select="str:split($argument_name,'#')[2]" />
|
1189
|
+
</span>
|
1190
|
+
</td>
|
1191
|
+
</xsl:when>
|
1192
|
+
|
1193
|
+
<xsl:when test="string(../@type)='block'">
|
1194
|
+
<td rowspan="{ $argument_types }" class="{ $class }">
|
1195
|
+
<span title="Code block, mandatory or optional" class="hover_text">
|
1196
|
+
<xsl:value-of select="$argument_name" />
|
1197
|
+
</span>
|
1198
|
+
</td>
|
1199
|
+
</xsl:when>
|
1200
|
+
|
1201
|
+
<xsl:when test="string(../@optional)='true'">
|
1202
|
+
<td rowspan="{$argument_types}" class="{ $class }">
|
1203
|
+
<span class="optional_argument" title="Optional argument">
|
1204
|
+
<span class="hover_text">
|
1205
|
+
<xsl:value-of select="$argument_name" />
|
1206
|
+
</span>
|
1207
|
+
</span>
|
1208
|
+
</td>
|
1209
|
+
</xsl:when>
|
1210
|
+
|
1211
|
+
|
1212
|
+
<xsl:otherwise>
|
1213
|
+
<td rowspan="{ $argument_types }" class="{ $class }">
|
1214
|
+
<span title="Mandatory argument" class="hover_text">
|
1215
|
+
<xsl:value-of select="$argument_name" />
|
1216
|
+
</span>
|
1217
|
+
</td>
|
1218
|
+
</xsl:otherwise>
|
1219
|
+
|
1220
|
+
</xsl:choose>
|
1221
|
+
|
1222
|
+
</xsl:if>
|
1223
|
+
|
1224
|
+
<!-- verify that argument variable type is defined -->
|
1225
|
+
<xsl:choose>
|
1226
|
+
<xsl:when test="string-length(@name)>0">
|
1227
|
+
<td class="{ $class }">
|
1228
|
+
<xsl:value-of select="@name"/>
|
1229
|
+
</td>
|
1230
|
+
</xsl:when>
|
1231
|
+
<xsl:otherwise>
|
1232
|
+
<xsl:call-template name="col_warning" >
|
1233
|
+
<xsl:with-param name="text">Not defined</xsl:with-param>
|
1234
|
+
</xsl:call-template>
|
1235
|
+
</xsl:otherwise>
|
1236
|
+
</xsl:choose>
|
1237
|
+
|
1238
|
+
<!-- verify that argument description is defined -->
|
1239
|
+
<xsl:choose>
|
1240
|
+
<xsl:when test="string-length(description/text())>0">
|
1241
|
+
<td class="{ $class }">
|
1242
|
+
<xsl:call-template name="formatted_content">
|
1243
|
+
<xsl:with-param name="text" select="description/text()"/>
|
1244
|
+
</xsl:call-template>
|
1245
|
+
</td>
|
1246
|
+
</xsl:when>
|
1247
|
+
<xsl:otherwise>
|
1248
|
+
<xsl:call-template name="col_warning" >
|
1249
|
+
<xsl:with-param name="text">Not defined</xsl:with-param>
|
1250
|
+
</xsl:call-template>
|
1251
|
+
</xsl:otherwise>
|
1252
|
+
</xsl:choose>
|
1253
|
+
|
1254
|
+
<!-- verify that argument example is defined -->
|
1255
|
+
<xsl:choose>
|
1256
|
+
|
1257
|
+
<xsl:when test="@type='block_argument'">
|
1258
|
+
<td class="{ $class }">
|
1259
|
+
<xsl:value-of select="example/text()"/>
|
1260
|
+
</td>
|
1261
|
+
</xsl:when>
|
1262
|
+
|
1263
|
+
<xsl:when test="string(example/text())='-'">
|
1264
|
+
<!-- <td class="tablebg_disabled" rowspan="{ $argument_types }"><xsl:value-of select="$default"/></td> -->
|
1265
|
+
<td class="tablebg_disabled">
|
1266
|
+
<xsl:value-of select="example/text()"/>
|
1267
|
+
</td>
|
1268
|
+
</xsl:when>
|
1269
|
+
|
1270
|
+
<xsl:when test="string-length(example/text())>0">
|
1271
|
+
<td class="{ $class }">
|
1272
|
+
<xsl:value-of select="example/text()"/>
|
1273
|
+
</td>
|
1274
|
+
</xsl:when>
|
1275
|
+
|
1276
|
+
<xsl:otherwise>
|
1277
|
+
<xsl:call-template name="col_warning" >
|
1278
|
+
<xsl:with-param name="text">Not defined</xsl:with-param>
|
1279
|
+
</xsl:call-template>
|
1280
|
+
</xsl:otherwise>
|
1281
|
+
|
1282
|
+
</xsl:choose>
|
1283
|
+
|
1284
|
+
<!-- default value -->
|
1285
|
+
<xsl:if test="position()=1">
|
1286
|
+
|
1287
|
+
<xsl:choose>
|
1288
|
+
|
1289
|
+
<xsl:when test="string-length($default)=0">
|
1290
|
+
<td class="tablebg_disabled" rowspan="{ $argument_types }">
|
1291
|
+
<xsl:value-of select="$default"/>
|
1292
|
+
</td>
|
1293
|
+
</xsl:when>
|
1294
|
+
|
1295
|
+
<xsl:otherwise>
|
1296
|
+
<td class="{ $class }" rowspan="{ $argument_types }">
|
1297
|
+
<xsl:value-of select="$default"/>
|
1298
|
+
</td>
|
1299
|
+
</xsl:otherwise>
|
1300
|
+
|
1301
|
+
</xsl:choose>
|
1302
|
+
|
1303
|
+
</xsl:if>
|
1304
|
+
|
1305
|
+
</tr>
|
1306
|
+
|
1307
|
+
</xsl:for-each>
|
1308
|
+
|
1309
|
+
</xsl:when>
|
1310
|
+
|
1311
|
+
<xsl:otherwise>
|
1312
|
+
|
1313
|
+
<tr>
|
1314
|
+
<td class="{ $class }">
|
1315
|
+
<xsl:value-of select="$argument_name" />
|
1316
|
+
</td>
|
1317
|
+
|
1318
|
+
<xsl:call-template name="col_warning">
|
1319
|
+
<xsl:with-param name="colspan">3</xsl:with-param>
|
1320
|
+
<xsl:with-param name="text">Not defined; description, example cannot be shown due to variable type is not defined. Please verify also that argument name is defined properly</xsl:with-param>
|
1321
|
+
</xsl:call-template>
|
1322
|
+
|
1323
|
+
<xsl:choose>
|
1324
|
+
|
1325
|
+
<xsl:when test="string-length($default)=0">
|
1326
|
+
<td class="tablebg_disabled">
|
1327
|
+
<xsl:value-of select="$default"/>
|
1328
|
+
</td>
|
1329
|
+
</xsl:when>
|
1330
|
+
|
1331
|
+
<xsl:otherwise>
|
1332
|
+
<td class="{ $class }">
|
1333
|
+
<xsl:value-of select="$default"/>
|
1334
|
+
</td>
|
1335
|
+
</xsl:otherwise>
|
1336
|
+
|
1337
|
+
</xsl:choose>
|
1338
|
+
|
1339
|
+
|
1340
|
+
</tr>
|
1341
|
+
|
1342
|
+
</xsl:otherwise>
|
1343
|
+
|
1344
|
+
</xsl:choose>
|
1345
|
+
|
1346
|
+
</xsl:template>
|
1347
|
+
|
1348
|
+
<xsl:template name="arguments">
|
1349
|
+
|
1350
|
+
<xsl:if test="@type='writer' or @type='accessor' or (@type='method' and number(arguments/@count)>0)">
|
1351
|
+
|
1352
|
+
<div class="feature_section_title">Arguments:</div>
|
1353
|
+
|
1354
|
+
<table class="default">
|
1355
|
+
<tr class="header">
|
1356
|
+
<td class="header">Name</td>
|
1357
|
+
<td class="header">Type</td>
|
1358
|
+
<td class="header">Description</td>
|
1359
|
+
<td class="header">Example</td>
|
1360
|
+
<td class="header">Default</td>
|
1361
|
+
</tr>
|
1362
|
+
|
1363
|
+
<xsl:for-each select="arguments/argument">
|
1364
|
+
|
1365
|
+
<xsl:choose>
|
1366
|
+
|
1367
|
+
<!-- table stripes: position even -->
|
1368
|
+
<xsl:when test="((number(position())-1) mod 2)=0">
|
1369
|
+
<xsl:call-template name="argument_details">
|
1370
|
+
<xsl:with-param name="argument_name" select="@name" />
|
1371
|
+
<xsl:with-param name="type" select="type" />
|
1372
|
+
<xsl:with-param name="class">tablebg_even</xsl:with-param>
|
1373
|
+
<xsl:with-param name="default" select="@default" />
|
1374
|
+
</xsl:call-template>
|
1375
|
+
</xsl:when>
|
1376
|
+
|
1377
|
+
<!-- table stripes: position odd -->
|
1378
|
+
<xsl:otherwise>
|
1379
|
+
<xsl:call-template name="argument_details">
|
1380
|
+
<xsl:with-param name="argument_name" select="@name" />
|
1381
|
+
<xsl:with-param name="type" select="type" />
|
1382
|
+
<xsl:with-param name="class">tablebg_odd</xsl:with-param>
|
1383
|
+
<xsl:with-param name="default" select="@default" />
|
1384
|
+
</xsl:call-template>
|
1385
|
+
</xsl:otherwise>
|
1386
|
+
|
1387
|
+
</xsl:choose>
|
1388
|
+
|
1389
|
+
</xsl:for-each>
|
1390
|
+
|
1391
|
+
<!-- show error message if argument is not described -->
|
1392
|
+
<xsl:if test="@type='method' and (arguments/@described<arguments/@count)">
|
1393
|
+
<xsl:call-template name="row_warning" >
|
1394
|
+
<xsl:with-param name="colspan">5</xsl:with-param>
|
1395
|
+
<xsl:with-param name="text">Incomplete documentation:
|
1396
|
+
<xsl:value-of select="arguments/@described" /> of
|
1397
|
+
<xsl:value-of select="arguments/@count" /> arguments documented. Please note that block is also counted as one argument.
|
1398
|
+
</xsl:with-param>
|
1399
|
+
</xsl:call-template>
|
1400
|
+
</xsl:if>
|
1401
|
+
|
1402
|
+
<!-- show error message if argument is not described -->
|
1403
|
+
<xsl:if test="(@type='accessor' or @type='writer') and arguments/@described=0">
|
1404
|
+
<xsl:call-template name="row_warning" >
|
1405
|
+
<xsl:with-param name="colspan">5</xsl:with-param>
|
1406
|
+
<xsl:with-param name="text">Attribute writer or accessor input value needs to be documented.</xsl:with-param>
|
1407
|
+
</xsl:call-template>
|
1408
|
+
</xsl:if>
|
1409
|
+
|
1410
|
+
</table>
|
1411
|
+
<br />
|
1412
|
+
|
1413
|
+
</xsl:if>
|
1414
|
+
|
1415
|
+
</xsl:template>
|
1416
|
+
|
1417
|
+
<xsl:template name="returns_type">
|
1418
|
+
|
1419
|
+
<xsl:param name="type" />
|
1420
|
+
<xsl:param name="class" />
|
1421
|
+
|
1422
|
+
<tr valign="top" class="{ $class }">
|
1423
|
+
|
1424
|
+
<!-- verify that return value type is defined -->
|
1425
|
+
<xsl:choose>
|
1426
|
+
|
1427
|
+
<xsl:when test="string-length($type/@name)>0 and contains($type/@name,' ')">
|
1428
|
+
<xsl:call-template name="col_warning" >
|
1429
|
+
<xsl:with-param name="text">Return value variable type cannot be multiple words with whitespaces</xsl:with-param>
|
1430
|
+
</xsl:call-template>
|
1431
|
+
</xsl:when>
|
1432
|
+
|
1433
|
+
<xsl:when test="string-length($type/@name)>0">
|
1434
|
+
<td class="{ $class }">
|
1435
|
+
<xsl:value-of select="$type/@name"/>
|
1436
|
+
</td>
|
1437
|
+
</xsl:when>
|
1438
|
+
|
1439
|
+
<xsl:otherwise>
|
1440
|
+
<xsl:call-template name="col_warning" >
|
1441
|
+
<xsl:with-param name="text">Return value variable type not defined</xsl:with-param>
|
1442
|
+
</xsl:call-template>
|
1443
|
+
</xsl:otherwise>
|
1444
|
+
</xsl:choose>
|
1445
|
+
|
1446
|
+
<!-- verify that argument description is defined -->
|
1447
|
+
<xsl:choose>
|
1448
|
+
|
1449
|
+
<xsl:when test="string($type/description/text())='-'">
|
1450
|
+
<td class="tablebg_disabled" />
|
1451
|
+
</xsl:when>
|
1452
|
+
|
1453
|
+
<xsl:when test="string-length($type/description/text())>0">
|
1454
|
+
<td class="{ $class }">
|
1455
|
+
<xsl:call-template name="formatted_content">
|
1456
|
+
<xsl:with-param name="text" select="$type/description/text()"/>
|
1457
|
+
</xsl:call-template>
|
1458
|
+
</td>
|
1459
|
+
</xsl:when>
|
1460
|
+
<xsl:otherwise>
|
1461
|
+
<xsl:call-template name="col_warning" >
|
1462
|
+
<xsl:with-param name="text">Return value description not defined</xsl:with-param>
|
1463
|
+
</xsl:call-template>
|
1464
|
+
</xsl:otherwise>
|
1465
|
+
</xsl:choose>
|
1466
|
+
|
1467
|
+
<!-- verify that return value example is defined -->
|
1468
|
+
<xsl:choose>
|
1469
|
+
|
1470
|
+
<xsl:when test="string($type/example/text())='-'">
|
1471
|
+
<td class="tablebg_disabled" />
|
1472
|
+
</xsl:when>
|
1473
|
+
|
1474
|
+
<xsl:when test="string-length($type/example/text())>0">
|
1475
|
+
<td class="{ $class }">
|
1476
|
+
<xsl:value-of select="$type/example/text()"/>
|
1477
|
+
</td>
|
1478
|
+
</xsl:when>
|
1479
|
+
<xsl:otherwise>
|
1480
|
+
<xsl:call-template name="col_warning" >
|
1481
|
+
<xsl:with-param name="text">Return value example not defined</xsl:with-param>
|
1482
|
+
</xsl:call-template>
|
1483
|
+
</xsl:otherwise>
|
1484
|
+
</xsl:choose>
|
1485
|
+
</tr>
|
1486
|
+
|
1487
|
+
</xsl:template>
|
1488
|
+
|
1489
|
+
<xsl:template name="row_warning">
|
1490
|
+
<xsl:param name="text" />
|
1491
|
+
<xsl:param name="colspan" />
|
1492
|
+
<tr>
|
1493
|
+
<td colspan="{ $colspan }" class="warning">[!!]
|
1494
|
+
<xsl:value-of select="$text" />
|
1495
|
+
</td>
|
1496
|
+
</tr>
|
1497
|
+
</xsl:template>
|
1498
|
+
|
1499
|
+
<xsl:template name="col_warning">
|
1500
|
+
|
1501
|
+
<xsl:param name="text" />
|
1502
|
+
<xsl:param name="colspan" />
|
1503
|
+
|
1504
|
+
<xsl:choose>
|
1505
|
+
|
1506
|
+
<xsl:when test="number($colspan)>0">
|
1507
|
+
<td class="warning" colspan="{ $colspan }">[!!]
|
1508
|
+
<xsl:value-of select="$text" />
|
1509
|
+
</td>
|
1510
|
+
</xsl:when>
|
1511
|
+
|
1512
|
+
<xsl:otherwise>
|
1513
|
+
<td class="warning">[!!]
|
1514
|
+
<xsl:value-of select="$text" />
|
1515
|
+
</td>
|
1516
|
+
</xsl:otherwise>
|
1517
|
+
|
1518
|
+
</xsl:choose>
|
1519
|
+
|
1520
|
+
</xsl:template>
|
1521
|
+
|
1522
|
+
<xsl:template name="div_warning">
|
1523
|
+
<xsl:param name="text" />
|
1524
|
+
<div class="warning">[!!]
|
1525
|
+
<xsl:value-of select="$text" />
|
1526
|
+
</div>
|
1527
|
+
</xsl:template>
|
1528
|
+
|
1529
|
+
<xsl:template name="span_warning">
|
1530
|
+
<xsl:param name="text" />
|
1531
|
+
<span class="warning">[!!]
|
1532
|
+
<xsl:value-of select="$text" />
|
1533
|
+
</span>
|
1534
|
+
</xsl:template>
|
1535
|
+
|
1536
|
+
<xsl:template name="returns">
|
1537
|
+
|
1538
|
+
<xsl:param name="type" />
|
1539
|
+
<xsl:param name="feature_type" />
|
1540
|
+
|
1541
|
+
<!-- show return value types table if feature type is method, reader or accessor -->
|
1542
|
+
<!--<xsl:if test="@type='reader' or @type='accessor' or @type='method'"> -->
|
1543
|
+
|
1544
|
+
<xsl:if test="@type='reader' or @type='accessor' or @type='method'">
|
1545
|
+
|
1546
|
+
<!-- return values -->
|
1547
|
+
<div class="feature_section_title">Returns:</div>
|
1548
|
+
<table class="default">
|
1549
|
+
<tr class="header">
|
1550
|
+
<td class="header">Type</td>
|
1551
|
+
<td class="header">Description</td>
|
1552
|
+
<td class="header">Example</td>
|
1553
|
+
</tr>
|
1554
|
+
|
1555
|
+
<!-- show error message if no return values defined -->
|
1556
|
+
<xsl:if test="(( count($type)=0 ) or ( count( arguments )=0 ) ) and ((@type='method') or (@type='accessor') or (@type='reader'))">
|
1557
|
+
<xsl:call-template name="row_warning">
|
1558
|
+
<xsl:with-param name="text">No return value type(s) defined for method, attribute reader or attribute accessor</xsl:with-param>
|
1559
|
+
<xsl:with-param name="colspan">3</xsl:with-param>
|
1560
|
+
</xsl:call-template>
|
1561
|
+
</xsl:if>
|
1562
|
+
|
1563
|
+
<xsl:if test="count($type)>0">
|
1564
|
+
|
1565
|
+
<xsl:for-each select="$type">
|
1566
|
+
|
1567
|
+
<xsl:choose>
|
1568
|
+
|
1569
|
+
<xsl:when test="(number(position()-1) mod 2)=0">
|
1570
|
+
<xsl:call-template name="returns_type" >
|
1571
|
+
<xsl:with-param name="type" select="." />
|
1572
|
+
<xsl:with-param name="class">tablebg_even</xsl:with-param>
|
1573
|
+
</xsl:call-template>
|
1574
|
+
</xsl:when>
|
1575
|
+
|
1576
|
+
<xsl:otherwise>
|
1577
|
+
<xsl:call-template name="returns_type" >
|
1578
|
+
<xsl:with-param name="type" select="." />
|
1579
|
+
<xsl:with-param name="class">tablebg_odd</xsl:with-param>
|
1580
|
+
</xsl:call-template>
|
1581
|
+
</xsl:otherwise>
|
1582
|
+
|
1583
|
+
</xsl:choose>
|
1584
|
+
|
1585
|
+
</xsl:for-each>
|
1586
|
+
|
1587
|
+
</xsl:if>
|
1588
|
+
|
1589
|
+
</table>
|
1590
|
+
<br />
|
1591
|
+
|
1592
|
+
</xsl:if>
|
1593
|
+
|
1594
|
+
</xsl:template>
|
1595
|
+
|
1596
|
+
<xsl:template name="tables">
|
1597
|
+
|
1598
|
+
<xsl:for-each select="tables/table">
|
1599
|
+
|
1600
|
+
<div class="feature_section_title">
|
1601
|
+
<a name="{ @name }">
|
1602
|
+
<xsl:value-of select="title/text()" />:
|
1603
|
+
</a>
|
1604
|
+
</div>
|
1605
|
+
|
1606
|
+
<xsl:if test="string-length(description/text())>0">
|
1607
|
+
<div class="feature_description">
|
1608
|
+
<xsl:call-template name="formatted_content">
|
1609
|
+
<xsl:with-param name="text" select="description/text()"/>
|
1610
|
+
</xsl:call-template>
|
1611
|
+
<br />
|
1612
|
+
</div>
|
1613
|
+
</xsl:if>
|
1614
|
+
|
1615
|
+
<table class="default">
|
1616
|
+
<!-- header -->
|
1617
|
+
<tr class="header_custom">
|
1618
|
+
<xsl:for-each select="header/item">
|
1619
|
+
<td class="header_custom">
|
1620
|
+
<xsl:value-of select="."/>
|
1621
|
+
</td>
|
1622
|
+
</xsl:for-each>
|
1623
|
+
</tr>
|
1624
|
+
|
1625
|
+
<!-- rows -->
|
1626
|
+
<xsl:for-each select="row">
|
1627
|
+
<xsl:choose>
|
1628
|
+
<xsl:when test="(number(position()-1) mod 2)=0">
|
1629
|
+
<tr>
|
1630
|
+
<xsl:for-each select="item">
|
1631
|
+
<td class="tablebg_even">
|
1632
|
+
<xsl:call-template name="formatted_content">
|
1633
|
+
<xsl:with-param name="text" select="."/>
|
1634
|
+
</xsl:call-template>
|
1635
|
+
<br />
|
1636
|
+
|
1637
|
+
</td>
|
1638
|
+
</xsl:for-each>
|
1639
|
+
</tr>
|
1640
|
+
</xsl:when>
|
1641
|
+
<xsl:otherwise>
|
1642
|
+
<tr>
|
1643
|
+
<xsl:for-each select="item">
|
1644
|
+
<td class="tablebg_odd">
|
1645
|
+
<xsl:call-template name="formatted_content">
|
1646
|
+
<xsl:with-param name="text" select="."/>
|
1647
|
+
</xsl:call-template>
|
1648
|
+
<br />
|
1649
|
+
</td>
|
1650
|
+
</xsl:for-each>
|
1651
|
+
</tr>
|
1652
|
+
</xsl:otherwise>
|
1653
|
+
</xsl:choose>
|
1654
|
+
</xsl:for-each>
|
1655
|
+
</table>
|
1656
|
+
<br />
|
1657
|
+
|
1658
|
+
</xsl:for-each>
|
1659
|
+
|
1660
|
+
</xsl:template>
|
1661
|
+
|
1662
|
+
<xsl:template name="description">
|
1663
|
+
|
1664
|
+
<div class="feature_section_title">Description:</div>
|
1665
|
+
|
1666
|
+
<xsl:if test="string-length(description/text())>0">
|
1667
|
+
<!-- display feature description (split lines with '\n') -->
|
1668
|
+
|
1669
|
+
<div class="feature_description">
|
1670
|
+
<xsl:call-template name="formatted_content">
|
1671
|
+
<xsl:with-param name="text" select="description/text()"/>
|
1672
|
+
</xsl:call-template>
|
1673
|
+
<br />
|
1674
|
+
</div>
|
1675
|
+
|
1676
|
+
</xsl:if>
|
1677
|
+
|
1678
|
+
<xsl:if test="string-length(description/text())=0">
|
1679
|
+
<xsl:call-template name="div_warning">
|
1680
|
+
<xsl:with-param name="text">Description not defined</xsl:with-param>
|
1681
|
+
</xsl:call-template>
|
1682
|
+
</xsl:if>
|
1683
|
+
<br />
|
1684
|
+
|
1685
|
+
</xsl:template>
|
1686
|
+
|
1687
|
+
<xsl:template name="deprecated">
|
1688
|
+
|
1689
|
+
<div class="feature_section_title">Deprecated in version:</div>
|
1690
|
+
|
1691
|
+
<div class="feature_deprecated_version">
|
1692
|
+
<xsl:value-of select="deprecated/@version"/>
|
1693
|
+
</div>
|
1694
|
+
<br />
|
1695
|
+
|
1696
|
+
</xsl:template>
|
1697
|
+
|
1698
|
+
<xsl:template name="tests">
|
1699
|
+
|
1700
|
+
<xsl:param name="tests" />
|
1701
|
+
|
1702
|
+
<!-- examples -->
|
1703
|
+
<div class="feature_section_title">Examples:</div>
|
1704
|
+
|
1705
|
+
<xsl:for-each select="$tests/scenario">
|
1706
|
+
|
1707
|
+
<!-- description (splitted with '\n') -->
|
1708
|
+
<div class="scenario_description">
|
1709
|
+
<xsl:for-each select="str:split(description,'\n')">
|
1710
|
+
<xsl:value-of select="text()" />
|
1711
|
+
<br />
|
1712
|
+
</xsl:for-each>
|
1713
|
+
</div>
|
1714
|
+
|
1715
|
+
<xsl:value-of select="@name"/>
|
1716
|
+
|
1717
|
+
<pre class="{@status}">
|
1718
|
+
<!-- show status only if other than 'passed' -->
|
1719
|
+
<xsl:if test="string(@status)!='passed'" >
|
1720
|
+
<xsl:text># [!!] scenario </xsl:text>
|
1721
|
+
<xsl:value-of select="@status" />
|
1722
|
+
<br />
|
1723
|
+
</xsl:if>
|
1724
|
+
|
1725
|
+
<xsl:for-each select="str:split(example,'\n')">
|
1726
|
+
<xsl:value-of select="text()" />
|
1727
|
+
<br />
|
1728
|
+
</xsl:for-each>
|
1729
|
+
</pre>
|
1730
|
+
|
1731
|
+
</xsl:for-each>
|
1732
|
+
|
1733
|
+
<xsl:if test="count($tests/scenario)=0">
|
1734
|
+
<xsl:call-template name="div_warning">
|
1735
|
+
<xsl:with-param name="text">No examples/test scenarios available</xsl:with-param>
|
1736
|
+
</xsl:call-template>
|
1737
|
+
</xsl:if>
|
1738
|
+
|
1739
|
+
<hr />
|
1740
|
+
<br />
|
1741
|
+
<br />
|
1742
|
+
<br />
|
1743
|
+
<br />
|
1744
|
+
<br />
|
1745
|
+
<br />
|
1746
|
+
<hr />
|
1747
|
+
</xsl:template>
|
1748
|
+
|
1749
|
+
<xsl:template name="info">
|
1750
|
+
|
1751
|
+
<xsl:if test="string-length(info/text())>0">
|
1752
|
+
<!-- display feature description (split lines with '\n') -->
|
1753
|
+
<div class="feature_info">
|
1754
|
+
<xsl:call-template name="formatted_content">
|
1755
|
+
<xsl:with-param name="text" select="info/text()"/>
|
1756
|
+
</xsl:call-template>
|
1757
|
+
</div>
|
1758
|
+
<br />
|
1759
|
+
</xsl:if>
|
1760
|
+
|
1761
|
+
</xsl:template>
|
1762
|
+
|
1763
|
+
<xsl:template name="formatted_content">
|
1764
|
+
|
1765
|
+
<xsl:param name="text"/>
|
1766
|
+
|
1767
|
+
<xsl:variable name="text_with_linefeeds">
|
1768
|
+
<xsl:call-template name="split_lines">
|
1769
|
+
<xsl:with-param name="text" select="$text" />
|
1770
|
+
</xsl:call-template>
|
1771
|
+
</xsl:variable>
|
1772
|
+
|
1773
|
+
<xsl:call-template name="process_tags">
|
1774
|
+
|
1775
|
+
<xsl:with-param name="text" select="$text_with_linefeeds" />
|
1776
|
+
|
1777
|
+
</xsl:call-template>
|
1778
|
+
|
1779
|
+
</xsl:template>
|
1780
|
+
|
1781
|
+
<xsl:template name="split_lines">
|
1782
|
+
|
1783
|
+
<xsl:param name="text"/>
|
1784
|
+
|
1785
|
+
<!-- content before \n -->
|
1786
|
+
<xsl:variable name="before_linefeed" select="substring-before($text, '\')"/>
|
1787
|
+
|
1788
|
+
<!-- content after \n -->
|
1789
|
+
<xsl:variable name="after_linefeed" select="substring-after($text, '\')"/>
|
1790
|
+
|
1791
|
+
<xsl:choose>
|
1792
|
+
<xsl:when test="substring(substring-after($text,'\'),1,1)='n'">
|
1793
|
+
<xsl:value-of select="$before_linefeed" />
|
1794
|
+
<xsl:text>[br]</xsl:text>
|
1795
|
+
<xsl:call-template name="split_lines">
|
1796
|
+
<xsl:with-param name="text" select="substring($text,string-length($before_linefeed)+3,string-length($text))" />
|
1797
|
+
</xsl:call-template>
|
1798
|
+
</xsl:when>
|
1799
|
+
<xsl:otherwise>
|
1800
|
+
<xsl:value-of select="$text" />
|
1801
|
+
</xsl:otherwise>
|
1802
|
+
</xsl:choose>
|
1803
|
+
|
1804
|
+
</xsl:template>
|
1805
|
+
|
1806
|
+
<xsl:template name="replace">
|
1807
|
+
|
1808
|
+
<xsl:param name="text"/>
|
1809
|
+
|
1810
|
+
<xsl:param name="string" />
|
1811
|
+
|
1812
|
+
<xsl:param name="with" />
|
1813
|
+
|
1814
|
+
<xsl:variable name="remaining_text" select="$text"/>
|
1815
|
+
|
1816
|
+
<!-- content before $string -->
|
1817
|
+
<xsl:variable name="content_before_string" select="substring-before($text, $string)"/>
|
1818
|
+
|
1819
|
+
<!-- content after $string -->
|
1820
|
+
<xsl:variable name="content_after_string" select="substring-after($text, $string)" />
|
1821
|
+
|
1822
|
+
<xsl:choose>
|
1823
|
+
|
1824
|
+
<xsl:when test="contains($text, $string)">
|
1825
|
+
|
1826
|
+
<!-- $string found from $text, show leading content before $string -->
|
1827
|
+
<xsl:value-of disable-output-escaping="yes" select="$content_before_string" />
|
1828
|
+
<xsl:value-of disable-output-escaping="yes" select="$with" />
|
1829
|
+
|
1830
|
+
<xsl:choose>
|
1831
|
+
|
1832
|
+
<xsl:when test="contains($content_after_string, $string)">
|
1833
|
+
|
1834
|
+
<!-- $content_after_string contains $string, call replace template recursively -->
|
1835
|
+
<xsl:call-template name="replace">
|
1836
|
+
|
1837
|
+
<xsl:with-param name="text" select="$content_after_string" />
|
1838
|
+
<xsl:with-param name="string" select="$string" />
|
1839
|
+
<xsl:with-param name="with" select="$with" />
|
1840
|
+
|
1841
|
+
</xsl:call-template>
|
1842
|
+
|
1843
|
+
</xsl:when>
|
1844
|
+
|
1845
|
+
<xsl:otherwise>
|
1846
|
+
|
1847
|
+
<!-- $content_after_string doesnt contain $string, return $content_after_string as is -->
|
1848
|
+
<xsl:value-of disable-output-escaping="yes" select="$content_after_string" />
|
1849
|
+
|
1850
|
+
</xsl:otherwise>
|
1851
|
+
|
1852
|
+
</xsl:choose>
|
1853
|
+
|
1854
|
+
</xsl:when>
|
1855
|
+
|
1856
|
+
<xsl:otherwise>
|
1857
|
+
|
1858
|
+
<!-- $string not found from $text, return $text as is -->
|
1859
|
+
<xsl:value-of select="$text" />
|
1860
|
+
|
1861
|
+
</xsl:otherwise>
|
1862
|
+
|
1863
|
+
</xsl:choose>
|
1864
|
+
|
1865
|
+
</xsl:template>
|
1866
|
+
|
1867
|
+
<!-- template#process_tags -->
|
1868
|
+
<xsl:template name="process_tags">
|
1869
|
+
|
1870
|
+
<xsl:param name="text"/>
|
1871
|
+
|
1872
|
+
<xsl:variable name="remainingContent" select="$text"/>
|
1873
|
+
|
1874
|
+
<!-- content before tag start character -->
|
1875
|
+
<xsl:variable name="content_before_tag" select="substring-before($text, '[')"/>
|
1876
|
+
|
1877
|
+
<!-- content after start tag -->
|
1878
|
+
<!-- content after start tag: content[/example_tag]continues-->
|
1879
|
+
<!--<xsl:variable name="content_after_tag" select="substring-after(substring-after($text, '['), ']')"/>
|
1880
|
+
-->
|
1881
|
+
|
1882
|
+
<!-- start tag: [example_tag="abcdef"] -->
|
1883
|
+
<xsl:variable name="content_after_tag">
|
1884
|
+
<xsl:variable name="tmp_content_after_tag" select="substring-after(substring-after($text, '['), '"]')"/>
|
1885
|
+
<xsl:choose>
|
1886
|
+
<xsl:when test="string-length($tmp_content_after_tag)=0">
|
1887
|
+
<xsl:value-of select="substring-after(substring-after($text, '['), ']')" />
|
1888
|
+
</xsl:when>
|
1889
|
+
<xsl:otherwise>
|
1890
|
+
<xsl:value-of select="$tmp_content_after_tag" />
|
1891
|
+
</xsl:otherwise>
|
1892
|
+
</xsl:choose>
|
1893
|
+
</xsl:variable>
|
1894
|
+
|
1895
|
+
|
1896
|
+
<!-- start tag: [example_tag="abcdef"] -->
|
1897
|
+
<!-- <xsl:variable name="tmp_full_tag" select="substring-after(substring-before($text, '"]'), '[')"/>
|
1898
|
+
-->
|
1899
|
+
|
1900
|
+
<!-- check if full tag contains string value -->
|
1901
|
+
|
1902
|
+
<!--
|
1903
|
+
|
1904
|
+
|
1905
|
+
<xsl:if test="string-length($tag_content)=0">
|
1906
|
+
|
1907
|
+
<xsl:call-template name="process_tags">
|
1908
|
+
<xsl:with-param name="text" select="$content_after_start_tag" />
|
1909
|
+
</xsl:call-template>
|
1910
|
+
|
1911
|
+
</xsl:if>
|
1912
|
+
|
1913
|
+
-->
|
1914
|
+
|
1915
|
+
<xsl:variable name="full_tag">
|
1916
|
+
<!-- start tag: [example_tag="abcdef"] -->
|
1917
|
+
<xsl:variable name="tmp_full_tag" select="substring-after(substring-before($text, '"]'), '[')"/>
|
1918
|
+
<xsl:choose>
|
1919
|
+
<xsl:when test="string-length($tmp_full_tag)=0">
|
1920
|
+
<xsl:value-of select="substring-after(substring-before($text, ']'), '[')" />
|
1921
|
+
</xsl:when>
|
1922
|
+
<xsl:otherwise>
|
1923
|
+
<xsl:value-of select="$tmp_full_tag" />
|
1924
|
+
</xsl:otherwise>
|
1925
|
+
</xsl:choose>
|
1926
|
+
</xsl:variable>
|
1927
|
+
|
1928
|
+
<!-- tag: example_tag -->
|
1929
|
+
<xsl:variable name="tag" select="str:split(substring-after(substring-before($text, ']'), '['), '=')[1]"/>
|
1930
|
+
|
1931
|
+
<!-- content between tags: content-->
|
1932
|
+
<xsl:variable name="tag_content" select="substring-before($content_after_tag, concat('[/', $tag, ']'))"/>
|
1933
|
+
|
1934
|
+
<!-- content after start tag: content[/example_tag]continues -->
|
1935
|
+
<xsl:variable name="content_after_start_tag" select="substring-after($text, concat('[',$tag,']'))"/>
|
1936
|
+
|
1937
|
+
<!-- content after end tag: continues-->
|
1938
|
+
<xsl:variable name="content_after_end_tag" select="substring-after($content_after_tag, concat('[/', $tag, ']'))"/>
|
1939
|
+
|
1940
|
+
<!-- show leading text before tag... -->
|
1941
|
+
<xsl:value-of select="$content_before_tag" />
|
1942
|
+
|
1943
|
+
<xsl:choose>
|
1944
|
+
|
1945
|
+
<xsl:when test="string-length($tag)>0">
|
1946
|
+
|
1947
|
+
<xsl:call-template name="process_tag" >
|
1948
|
+
<xsl:with-param name="tag" select="$tag" />
|
1949
|
+
<xsl:with-param name="full_tag" select="$full_tag" />
|
1950
|
+
<xsl:with-param name="content" select="$tag_content" />
|
1951
|
+
<xsl:with-param name="content_after" select="$content_after_end_tag" />
|
1952
|
+
</xsl:call-template>
|
1953
|
+
|
1954
|
+
<xsl:if test="string-length($tag_content)=0">
|
1955
|
+
|
1956
|
+
<xsl:call-template name="process_tags">
|
1957
|
+
<xsl:with-param name="text" select="$content_after_start_tag" />
|
1958
|
+
</xsl:call-template>
|
1959
|
+
|
1960
|
+
</xsl:if>
|
1961
|
+
|
1962
|
+
</xsl:when>
|
1963
|
+
|
1964
|
+
<xsl:otherwise>
|
1965
|
+
|
1966
|
+
<xsl:value-of select="$text" />
|
1967
|
+
|
1968
|
+
</xsl:otherwise>
|
1969
|
+
|
1970
|
+
</xsl:choose>
|
1971
|
+
|
1972
|
+
</xsl:template>
|
1973
|
+
|
1974
|
+
<xsl:template name="process_tag" >
|
1975
|
+
|
1976
|
+
<xsl:param name="tag" />
|
1977
|
+
<xsl:param name="full_tag" />
|
1978
|
+
|
1979
|
+
|
1980
|
+
<xsl:param name="content" />
|
1981
|
+
<xsl:param name="content_after" />
|
1982
|
+
|
1983
|
+
<xsl:variable name="parameter">
|
1984
|
+
<!-- remove quotations from parameter value -->
|
1985
|
+
<xsl:call-template name="replace">
|
1986
|
+
<xsl:with-param name="text" select="str:split($full_tag,'=')[2]" />
|
1987
|
+
<xsl:with-param name="string">"</xsl:with-param>
|
1988
|
+
<xsl:with-param name="with" ></xsl:with-param>
|
1989
|
+
</xsl:call-template>
|
1990
|
+
</xsl:variable>
|
1991
|
+
|
1992
|
+
<!--
|
1993
|
+
<br /><b>tag:</b> <xsl:value-of select="$tag" />
|
1994
|
+
<br /><b>content:</b> <xsl:value-of select="$content" />
|
1995
|
+
<br /><b>content_after:</b> <xsl:value-of select="$content_after" />
|
1996
|
+
-->
|
1997
|
+
|
1998
|
+
<xsl:choose>
|
1999
|
+
<xsl:when test="$tag='b'">
|
2000
|
+
|
2001
|
+
<b>
|
2002
|
+
<xsl:call-template name="process_tags" >
|
2003
|
+
<xsl:with-param name="text" select="$content" />
|
2004
|
+
</xsl:call-template>
|
2005
|
+
</b>
|
2006
|
+
|
2007
|
+
<xsl:call-template name="process_tags" >
|
2008
|
+
<xsl:with-param name="text" select="$content_after" />
|
2009
|
+
</xsl:call-template>
|
2010
|
+
|
2011
|
+
</xsl:when>
|
2012
|
+
|
2013
|
+
<xsl:when test="$tag='u'">
|
2014
|
+
<u>
|
2015
|
+
<xsl:call-template name="process_tags" >
|
2016
|
+
<xsl:with-param name="text" select="$content" />
|
2017
|
+
</xsl:call-template>
|
2018
|
+
</u>
|
2019
|
+
<xsl:call-template name="process_tags" >
|
2020
|
+
<xsl:with-param name="text" select="$content_after" />
|
2021
|
+
</xsl:call-template>
|
2022
|
+
|
2023
|
+
</xsl:when>
|
2024
|
+
|
2025
|
+
<xsl:when test="$tag='i'">
|
2026
|
+
<i>
|
2027
|
+
<xsl:call-template name="process_tags" >
|
2028
|
+
<xsl:with-param name="text" select="$content" />
|
2029
|
+
</xsl:call-template>
|
2030
|
+
</i>
|
2031
|
+
<xsl:call-template name="process_tags" >
|
2032
|
+
<xsl:with-param name="text" select="$content_after" />
|
2033
|
+
</xsl:call-template>
|
2034
|
+
|
2035
|
+
</xsl:when>
|
2036
|
+
|
2037
|
+
<xsl:when test="$tag='code'">
|
2038
|
+
|
2039
|
+
<pre class="block">
|
2040
|
+
<xsl:value-of select="$content" />
|
2041
|
+
</pre>
|
2042
|
+
|
2043
|
+
<xsl:call-template name="process_tags" >
|
2044
|
+
<xsl:with-param name="text" select="$content_after" />
|
2045
|
+
</xsl:call-template>
|
2046
|
+
|
2047
|
+
</xsl:when>
|
2048
|
+
|
2049
|
+
<xsl:when test="$tag='img'">
|
2050
|
+
|
2051
|
+
<xsl:choose>
|
2052
|
+
|
2053
|
+
<xsl:when test="string-length($parameter)>0">
|
2054
|
+
<!-- found title text for image -->
|
2055
|
+
<img src="{ $parameter }" title="{ $content }" />
|
2056
|
+
</xsl:when>
|
2057
|
+
|
2058
|
+
<xsl:otherwise>
|
2059
|
+
<!-- no title text for image -->
|
2060
|
+
<img src="{ $content }" title="" />
|
2061
|
+
</xsl:otherwise>
|
2062
|
+
|
2063
|
+
</xsl:choose>
|
2064
|
+
|
2065
|
+
<xsl:call-template name="process_tags" >
|
2066
|
+
<xsl:with-param name="text" select="$content_after" />
|
2067
|
+
</xsl:call-template>
|
2068
|
+
|
2069
|
+
</xsl:when>
|
2070
|
+
|
2071
|
+
<xsl:when test="$tag='link'">
|
2072
|
+
|
2073
|
+
<xsl:choose>
|
2074
|
+
|
2075
|
+
<xsl:when test="string-length($parameter)>0">
|
2076
|
+
<a href="{ $parameter }" class="link" title="{ $content }">
|
2077
|
+
<xsl:call-template name="process_tags" >
|
2078
|
+
<xsl:with-param name="text" select="$content" />
|
2079
|
+
</xsl:call-template>
|
2080
|
+
</a>
|
2081
|
+
</xsl:when>
|
2082
|
+
|
2083
|
+
<xsl:otherwise>
|
2084
|
+
<a href="{ $content }" class="link" title="">
|
2085
|
+
<xsl:call-template name="process_tags" >
|
2086
|
+
<xsl:with-param name="text" select="$content" />
|
2087
|
+
</xsl:call-template>
|
2088
|
+
</a>
|
2089
|
+
</xsl:otherwise>
|
2090
|
+
|
2091
|
+
</xsl:choose>
|
2092
|
+
|
2093
|
+
<xsl:call-template name="process_tags" >
|
2094
|
+
<xsl:with-param name="text" select="$content_after" />
|
2095
|
+
</xsl:call-template>
|
2096
|
+
|
2097
|
+
</xsl:when>
|
2098
|
+
|
2099
|
+
|
2100
|
+
<xsl:when test="$tag='name'">
|
2101
|
+
|
2102
|
+
<xsl:choose>
|
2103
|
+
|
2104
|
+
<xsl:when test="string-length($parameter)>0">
|
2105
|
+
<a name="{ $parameter }" title="">
|
2106
|
+
<xsl:call-template name="process_tags" >
|
2107
|
+
<xsl:with-param name="text" select="$content" />
|
2108
|
+
</xsl:call-template>
|
2109
|
+
</a>
|
2110
|
+
</xsl:when>
|
2111
|
+
|
2112
|
+
<xsl:otherwise>
|
2113
|
+
<a name="{ $content }" title="">
|
2114
|
+
<xsl:call-template name="process_tags" >
|
2115
|
+
<xsl:with-param name="text" select="$content" />
|
2116
|
+
</xsl:call-template>
|
2117
|
+
</a>
|
2118
|
+
</xsl:otherwise>
|
2119
|
+
|
2120
|
+
</xsl:choose>
|
2121
|
+
|
2122
|
+
<xsl:call-template name="process_tags" >
|
2123
|
+
<xsl:with-param name="text" select="$content_after" />
|
2124
|
+
</xsl:call-template>
|
2125
|
+
|
2126
|
+
</xsl:when>
|
2127
|
+
|
2128
|
+
|
2129
|
+
|
2130
|
+
<xsl:when test="$tag='br'">
|
2131
|
+
<br />
|
2132
|
+
</xsl:when>
|
2133
|
+
|
2134
|
+
<xsl:otherwise>
|
2135
|
+
|
2136
|
+
<xsl:choose>
|
2137
|
+
|
2138
|
+
<xsl:when test="string-length($content)>0">
|
2139
|
+
<xsl:text>[</xsl:text>
|
2140
|
+
<xsl:value-of select="$full_tag" />
|
2141
|
+
<xsl:text>]</xsl:text>
|
2142
|
+
|
2143
|
+
<xsl:call-template name="process_tags" >
|
2144
|
+
<xsl:with-param name="text" select="$content" />
|
2145
|
+
</xsl:call-template>
|
2146
|
+
|
2147
|
+
<xsl:text>[/</xsl:text>
|
2148
|
+
<xsl:value-of select="$tag" />
|
2149
|
+
<xsl:text>]</xsl:text>
|
2150
|
+
</xsl:when>
|
2151
|
+
|
2152
|
+
<xsl:otherwise>
|
2153
|
+
<xsl:text>[</xsl:text>
|
2154
|
+
<xsl:value-of select="$full_tag" />
|
2155
|
+
<xsl:text>]</xsl:text>
|
2156
|
+
</xsl:otherwise>
|
2157
|
+
|
2158
|
+
</xsl:choose>
|
2159
|
+
|
2160
|
+
<xsl:call-template name="process_tags" >
|
2161
|
+
<xsl:with-param name="text" select="$content_after" />
|
2162
|
+
</xsl:call-template>
|
2163
|
+
|
2164
|
+
</xsl:otherwise>
|
2165
|
+
|
2166
|
+
</xsl:choose>
|
2167
|
+
|
2168
|
+
</xsl:template>
|
2169
|
+
|
2170
|
+
</xsl:stylesheet>
|