cpee 1.5.27 → 2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{FEATURES → FEATURES.md} +7 -6
- data/INSTALL.md +1 -0
- data/{README → README.md} +3 -3
- data/Rakefile +1 -0
- data/cockpit/index.html +7 -7
- data/cockpit/js/details.js +13 -14
- data/cockpit/js/instance.js +186 -284
- data/cockpit/js/parameters.js +13 -3
- data/cockpit/js/ui.js +2 -2
- data/cockpit/rngs/attributes.rng +1 -1
- data/cockpit/rngs/dataelements.rng +1 -1
- data/cockpit/rngs/endpoints.rng +1 -1
- data/cockpit/templates.legacy/Async.xml +7 -7
- data/cockpit/templates.legacy/BCO.xml +7 -10
- data/cockpit/templates.legacy/BCS.xml +7 -10
- data/cockpit/templates.legacy/Centurio.xml +6 -6
- data/cockpit/templates.legacy/Concurrent.xml +6 -6
- data/cockpit/templates.legacy/Coopis Testset.xml +6 -6
- data/cockpit/templates.legacy/Endpoints and Data Manipulation.xml +6 -6
- data/cockpit/templates.legacy/ICSOC Testset.xml +6 -6
- data/cockpit/templates.legacy/Infinity.xml +3 -3
- data/cockpit/templates.legacy/Lego Boxer.xml +7 -7
- data/cockpit/templates.legacy/Lego Conveyor.xml +7 -7
- data/cockpit/templates.legacy/Lego Crane.xml +7 -7
- data/cockpit/templates.legacy/Lego Ejector.xml +7 -7
- data/cockpit/templates.legacy/Lego Full.xml +7 -7
- data/cockpit/templates.legacy/Lego Liddy.xml +7 -7
- data/cockpit/templates.legacy/Lego Plate.xml +7 -7
- data/cockpit/templates.legacy/Lego Transporter.xml +7 -7
- data/cockpit/templates.legacy/Lego_Part_1.xml +7 -7
- data/cockpit/templates.legacy/LgLinear.xml +6 -10
- data/cockpit/templates.legacy/Linear.xml +7 -7
- data/cockpit/templates.legacy/Log.xml +7 -7
- data/cockpit/templates.legacy/Mangler 1.xml +6 -6
- data/cockpit/templates.legacy/Mangler 2.xml +6 -6
- data/cockpit/templates.legacy/Manuel Labels.xml +7 -7
- data/cockpit/templates.legacy/Promise.xml +7 -7
- data/cockpit/templates.legacy/SOPROMO Test Sonification.xml +6 -6
- data/cockpit/templates.legacy/Subprocess.xml +56 -0
- data/cockpit/templates.legacy/Syncing P34 1.xml +8 -11
- data/cockpit/templates.legacy/Syncing P34 2.xml +8 -11
- data/cockpit/templates.legacy/Syncing P34 3.xml +8 -11
- data/cockpit/templates.legacy/Syncing P34.xml +8 -11
- data/cockpit/templates.legacy/TEST - Bad Loop.xml +6 -6
- data/cockpit/templates.legacy/TEST - Wrong Positions.xml +6 -6
- data/cockpit/templates.legacy/Take_5.xml +48 -0
- data/cockpit/templates.legacy/Update.xml +7 -7
- data/cockpit/templates.legacy/Worklist Parallel.xml +7 -7
- data/cockpit/templates.legacy/Worklist Test CPEE.xml +7 -7
- data/cockpit/templates.legacy/Worklist Test.xml +7 -7
- data/cockpit/templates.legacy/Worklist Test2.xml +7 -7
- data/cockpit/templates.legacy/convert_cpee2.rb +15 -0
- data/cockpit/templates.legacy/testsets.xml +1 -1
- data/cockpit/templates/BPM 2020 Manual Adjust.xml +18 -71
- data/cockpit/templates/BPM 2020 Solution Baseline.xml +17 -71
- data/cockpit/templates/BPM 2020 Solution NN.xml +25 -71
- data/cockpit/templates/BPM 2020 Solution View.xml +15 -71
- data/cockpit/templates/BPM 2020.xml +17 -6
- data/cockpit/templates/Coopis 2010.xml +16 -7
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml +8 -11
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml +8 -11
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml +8 -11
- data/cockpit/templates/Worklist.xml +7 -7
- data/cockpit/templates/convert_cpee2.rb +15 -0
- data/cockpit/themes/compact/rngs/alternative.rng +25 -0
- data/cockpit/themes/compact/rngs/call.rng +18 -18
- data/cockpit/themes/compact/rngs/callmanipulate.rng +26 -26
- data/cockpit/themes/compact/rngs/choose.rng +14 -0
- data/cockpit/themes/compact/rngs/critical.rng +5 -0
- data/cockpit/themes/compact/rngs/escape.rng +1 -0
- data/cockpit/themes/compact/rngs/group.rng +3 -0
- data/cockpit/themes/compact/rngs/loop.rng +22 -0
- data/cockpit/themes/compact/rngs/manipulate.rng +9 -0
- data/cockpit/themes/compact/rngs/otherwise.rng +22 -0
- data/cockpit/themes/compact/rngs/parallel.rng +21 -0
- data/cockpit/themes/compact/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/compact/rngs/scripts.rng +10 -11
- data/cockpit/themes/compact/rngs/stop.rng +5 -0
- data/cockpit/themes/compact/rngs/terminate.rng +1 -0
- data/cockpit/themes/convert_cpee2.rb +8 -0
- data/cockpit/themes/default/rngs/alternative.rng +8 -8
- data/cockpit/themes/default/rngs/call.rng +85 -49
- data/cockpit/themes/default/rngs/callmanipulate.rng +103 -64
- data/cockpit/themes/default/rngs/choose.rng +5 -3
- data/cockpit/themes/default/rngs/critical.rng +2 -2
- data/cockpit/themes/default/rngs/escape.rng +1 -1
- data/cockpit/themes/default/rngs/group.rng +3 -3
- data/cockpit/themes/default/rngs/loop.rng +8 -8
- data/cockpit/themes/default/rngs/manipulate.rng +3 -3
- data/cockpit/themes/default/rngs/otherwise.rng +8 -8
- data/cockpit/themes/default/rngs/parallel.rng +14 -6
- data/cockpit/themes/default/rngs/parallel_branch.rng +2 -2
- data/cockpit/themes/default/rngs/scripts.rng +23 -0
- data/cockpit/themes/default/rngs/stop.rng +2 -2
- data/cockpit/themes/default/rngs/terminate.rng +1 -1
- data/cockpit/themes/extended/rngs/alternative.rng +25 -0
- data/cockpit/themes/extended/rngs/call.rng +18 -18
- data/cockpit/themes/extended/rngs/callmanipulate.rng +26 -26
- data/cockpit/themes/extended/rngs/choose.rng +14 -0
- data/cockpit/themes/extended/rngs/critical.rng +5 -0
- data/cockpit/themes/extended/rngs/escape.rng +1 -0
- data/cockpit/themes/extended/rngs/group.rng +3 -0
- data/cockpit/themes/extended/rngs/loop.rng +22 -0
- data/cockpit/themes/extended/rngs/manipulate.rng +9 -0
- data/cockpit/themes/extended/rngs/otherwise.rng +22 -0
- data/cockpit/themes/extended/rngs/parallel.rng +21 -0
- data/cockpit/themes/extended/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/extended/rngs/scripts.rng +10 -11
- data/cockpit/themes/extended/rngs/stop.rng +5 -0
- data/cockpit/themes/extended/rngs/terminate.rng +1 -0
- data/cockpit/themes/extended/theme.js +7 -6
- data/cockpit/themes/model/rngs/alternative.rng +1 -1
- data/cockpit/themes/model/rngs/call.rng +16 -16
- data/cockpit/themes/model/rngs/callmanipulate.rng +17 -17
- data/cockpit/themes/model/rngs/choose.rng +1 -1
- data/cockpit/themes/model/rngs/critical.rng +1 -1
- data/cockpit/themes/model/rngs/escape.rng +1 -1
- data/cockpit/themes/model/rngs/group.rng +1 -1
- data/cockpit/themes/model/rngs/loop.rng +1 -1
- data/cockpit/themes/model/rngs/manipulate.rng +1 -1
- data/cockpit/themes/model/rngs/otherwise.rng +1 -1
- data/cockpit/themes/model/rngs/parallel.rng +1 -1
- data/cockpit/themes/model/rngs/parallel_branch.rng +1 -1
- data/cockpit/themes/model/rngs/scripts.rng +3 -4
- data/cockpit/themes/model/rngs/stop.rng +1 -1
- data/cockpit/themes/model/rngs/terminate.rng +1 -1
- data/cockpit/themes/model/theme.js +7 -6
- data/cockpit/themes/packed/rngs/alternative.rng +25 -0
- data/cockpit/themes/packed/rngs/call.rng +18 -18
- data/cockpit/themes/packed/rngs/callmanipulate.rng +26 -26
- data/cockpit/themes/packed/rngs/choose.rng +14 -0
- data/cockpit/themes/packed/rngs/critical.rng +5 -0
- data/cockpit/themes/packed/rngs/escape.rng +1 -0
- data/cockpit/themes/packed/rngs/group.rng +3 -0
- data/cockpit/themes/packed/rngs/loop.rng +22 -0
- data/cockpit/themes/packed/rngs/manipulate.rng +9 -0
- data/cockpit/themes/packed/rngs/otherwise.rng +22 -0
- data/cockpit/themes/packed/rngs/parallel.rng +21 -0
- data/cockpit/themes/packed/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/packed/rngs/scripts.rng +10 -11
- data/cockpit/themes/packed/rngs/stop.rng +5 -0
- data/cockpit/themes/packed/rngs/terminate.rng +1 -0
- data/cockpit/themes/packed/theme.js +7 -6
- data/cockpit/themes/preset/rngs/alternative.rng +25 -0
- data/cockpit/themes/preset/rngs/call.rng +18 -18
- data/cockpit/themes/preset/rngs/callmanipulate.rng +26 -26
- data/cockpit/themes/preset/rngs/choose.rng +14 -0
- data/cockpit/themes/preset/rngs/critical.rng +5 -0
- data/cockpit/themes/preset/rngs/escape.rng +1 -0
- data/cockpit/themes/preset/rngs/group.rng +3 -0
- data/cockpit/themes/preset/rngs/loop.rng +22 -0
- data/cockpit/themes/preset/rngs/manipulate.rng +9 -0
- data/cockpit/themes/preset/rngs/otherwise.rng +22 -0
- data/cockpit/themes/preset/rngs/parallel.rng +21 -0
- data/cockpit/themes/preset/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/preset/rngs/scripts.rng +10 -11
- data/cockpit/themes/preset/rngs/stop.rng +5 -0
- data/cockpit/themes/preset/rngs/terminate.rng +1 -0
- data/cockpit/themes/preset/theme.js +7 -6
- data/cpee.gemspec +9 -10
- data/{log/topics.xml → lib/callbacks.xml} +16 -6
- data/lib/{engine → callbacks}/callbacks.rng +2 -8
- data/lib/cpee.xml +10 -4
- data/lib/cpee/attributes_helper.rb +27 -0
- data/lib/cpee/controller.rb +113 -596
- data/lib/cpee/implementation.rb +152 -191
- data/lib/cpee/implementation_callbacks.rb +77 -0
- data/lib/cpee/implementation_notifications.rb +189 -0
- data/lib/cpee/implementation_properties.rb +707 -0
- data/lib/cpee/{callback.rb → message.rb} +20 -18
- data/lib/cpee/persistence.rb +135 -0
- data/lib/cpee/statemachine.rb +20 -0
- data/lib/cpee/transform.rb +95 -0
- data/lib/engine.xml +1 -59
- data/lib/properties.xml +236 -0
- data/lib/properties/arbitrary.rng +26 -0
- data/lib/properties/attributes.rng +10 -0
- data/lib/properties/dataelements.rng +10 -0
- data/lib/properties/description.rng +8 -0
- data/lib/properties/dsl.rng +7 -0
- data/lib/properties/dslx.rng +8 -0
- data/lib/properties/endpoints.rng +10 -0
- data/lib/properties/handlerwrapper.rng +9 -0
- data/lib/properties/position.rng +15 -0
- data/lib/properties/positions.rng +10 -0
- data/lib/properties/properties.rng +29 -0
- data/lib/properties/set-properties.rng +25 -0
- data/lib/properties/set-some-properties.rng +45 -0
- data/lib/properties/simple.rng +8 -0
- data/lib/properties/state.rng +33 -0
- data/lib/properties/status.rng +12 -0
- data/lib/properties/t_attributes.rng +7 -0
- data/lib/properties/t_dataelements.rng +7 -0
- data/lib/properties/t_endpoints.rng +7 -0
- data/lib/properties/t_position.rng +7 -0
- data/lib/properties/t_positions.rng +7 -0
- data/lib/properties/t_simple.rng +7 -0
- data/lib/properties/t_status.rng +7 -0
- data/lib/properties/t_transformation.rng +7 -0
- data/lib/properties/transformation.rng +40 -0
- data/server/dev.rb +1 -0
- data/server/handlerwrappers/default.rb +40 -38
- data/server/resources/backend/README.md +17 -0
- data/server/resources/backend/instance.rb +23 -0
- data/server/resources/backend/instance.template +19 -0
- data/server/resources/backend/opts.yaml +6 -0
- data/server/resources/backend/run +29 -0
- data/server/resources/notifications/logging/subscription.xml +19 -0
- data/server/resources/properties.empty +38 -0
- data/server/resources/properties.init +11 -11
- data/server/resources/states.dot +19 -0
- data/server/resources/states.xml +49 -0
- data/server/resources/transformation_dslx.xsl +3 -12
- data/server/routing/end.rb +44 -0
- data/server/routing/forward-events.rb +59 -0
- data/server/routing/forward-votes.rb +108 -0
- data/server/routing/persist.rb +155 -0
- data/server/server.rb +1 -0
- data/tools/cpee +19 -15
- data/tools/instantiation/instantiation +0 -1
- data/tools/server/server.rb +0 -1
- metadata +77 -132
- data/INSTALL +0 -23
- data/cockpit/templates/convert_preset.rb +0 -32
- data/cockpit/templates/testsets.xml +0 -11
- data/cockpit/templates/transformations.xml +0 -4
- data/cockpit/themes/compact/rngs/alternative.rng +0 -1
- data/cockpit/themes/compact/rngs/choose.rng +0 -1
- data/cockpit/themes/compact/rngs/critical.rng +0 -1
- data/cockpit/themes/compact/rngs/escape.rng +0 -1
- data/cockpit/themes/compact/rngs/group.rng +0 -1
- data/cockpit/themes/compact/rngs/loop.rng +0 -1
- data/cockpit/themes/compact/rngs/manipulate.rng +0 -1
- data/cockpit/themes/compact/rngs/otherwise.rng +0 -1
- data/cockpit/themes/compact/rngs/parallel.rng +0 -1
- data/cockpit/themes/compact/rngs/parallel_branch.rng +0 -1
- data/cockpit/themes/compact/rngs/stop.rng +0 -1
- data/cockpit/themes/compact/rngs/terminate.rng +0 -1
- data/cockpit/themes/default/rngs/finalize.rng +0 -6
- data/cockpit/themes/default/rngs/update.rng +0 -6
- data/cockpit/themes/default/theme.js +0 -1286
- data/cockpit/themes/extended/rngs/alternative.rng +0 -1
- data/cockpit/themes/extended/rngs/choose.rng +0 -1
- data/cockpit/themes/extended/rngs/critical.rng +0 -1
- data/cockpit/themes/extended/rngs/escape.rng +0 -1
- data/cockpit/themes/extended/rngs/group.rng +0 -1
- data/cockpit/themes/extended/rngs/loop.rng +0 -1
- data/cockpit/themes/extended/rngs/manipulate.rng +0 -1
- data/cockpit/themes/extended/rngs/otherwise.rng +0 -1
- data/cockpit/themes/extended/rngs/parallel.rng +0 -1
- data/cockpit/themes/extended/rngs/parallel_branch.rng +0 -1
- data/cockpit/themes/extended/rngs/stop.rng +0 -1
- data/cockpit/themes/extended/rngs/terminate.rng +0 -1
- data/cockpit/themes/labels/rngs/alternative.rng +0 -25
- data/cockpit/themes/labels/rngs/call.rng +0 -81
- data/cockpit/themes/labels/rngs/callmanipulate.rng +0 -101
- data/cockpit/themes/labels/rngs/choose.rng +0 -12
- data/cockpit/themes/labels/rngs/critical.rng +0 -5
- data/cockpit/themes/labels/rngs/escape.rng +0 -1
- data/cockpit/themes/labels/rngs/finalize.rng +0 -6
- data/cockpit/themes/labels/rngs/group.rng +0 -3
- data/cockpit/themes/labels/rngs/loop.rng +0 -22
- data/cockpit/themes/labels/rngs/manipulate.rng +0 -9
- data/cockpit/themes/labels/rngs/otherwise.rng +0 -22
- data/cockpit/themes/labels/rngs/parallel.rng +0 -13
- data/cockpit/themes/labels/rngs/parallel_branch.rng +0 -8
- data/cockpit/themes/labels/rngs/stop.rng +0 -5
- data/cockpit/themes/labels/rngs/terminate.rng +0 -1
- data/cockpit/themes/labels/rngs/update.rng +0 -6
- data/cockpit/themes/labels/symbols/alternative.svg +0 -5
- data/cockpit/themes/labels/symbols/arrow.svg +0 -3
- data/cockpit/themes/labels/symbols/call.svg +0 -6
- data/cockpit/themes/labels/symbols/callmanipulate.svg +0 -8
- data/cockpit/themes/labels/symbols/choose.svg +0 -5
- data/cockpit/themes/labels/symbols/choose_exclusive.svg +0 -5
- data/cockpit/themes/labels/symbols/choose_inclusive.svg +0 -4
- data/cockpit/themes/labels/symbols/complex.svg +0 -8
- data/cockpit/themes/labels/symbols/critical.svg +0 -4
- data/cockpit/themes/labels/symbols/end.svg +0 -3
- data/cockpit/themes/labels/symbols/escape.svg +0 -5
- data/cockpit/themes/labels/symbols/event_end.svg +0 -3
- data/cockpit/themes/labels/symbols/loop.svg +0 -5
- data/cockpit/themes/labels/symbols/manipulate.svg +0 -4
- data/cockpit/themes/labels/symbols/otherwise.svg +0 -5
- data/cockpit/themes/labels/symbols/parallel.svg +0 -5
- data/cockpit/themes/labels/symbols/parallel_branch.svg +0 -5
- data/cockpit/themes/labels/symbols/parallel_branch_compact.svg +0 -4
- data/cockpit/themes/labels/symbols/parallel_branch_event.svg +0 -14
- data/cockpit/themes/labels/symbols/parallel_branch_normal.svg +0 -5
- data/cockpit/themes/labels/symbols/scripts.svg +0 -4
- data/cockpit/themes/labels/symbols/start.svg +0 -3
- data/cockpit/themes/labels/symbols/stop.svg +0 -5
- data/cockpit/themes/labels/symbols/terminate.svg +0 -4
- data/cockpit/themes/packed/rngs/alternative.rng +0 -1
- data/cockpit/themes/packed/rngs/choose.rng +0 -1
- data/cockpit/themes/packed/rngs/critical.rng +0 -1
- data/cockpit/themes/packed/rngs/escape.rng +0 -1
- data/cockpit/themes/packed/rngs/group.rng +0 -1
- data/cockpit/themes/packed/rngs/loop.rng +0 -1
- data/cockpit/themes/packed/rngs/manipulate.rng +0 -1
- data/cockpit/themes/packed/rngs/otherwise.rng +0 -1
- data/cockpit/themes/packed/rngs/parallel.rng +0 -1
- data/cockpit/themes/packed/rngs/parallel_branch.rng +0 -1
- data/cockpit/themes/packed/rngs/stop.rng +0 -1
- data/cockpit/themes/packed/rngs/terminate.rng +0 -1
- data/cockpit/themes/preset/rngs/alternative.rng +0 -1
- data/cockpit/themes/preset/rngs/choose.rng +0 -1
- data/cockpit/themes/preset/rngs/critical.rng +0 -1
- data/cockpit/themes/preset/rngs/escape.rng +0 -1
- data/cockpit/themes/preset/rngs/group.rng +0 -1
- data/cockpit/themes/preset/rngs/loop.rng +0 -1
- data/cockpit/themes/preset/rngs/manipulate.rng +0 -1
- data/cockpit/themes/preset/rngs/otherwise.rng +0 -1
- data/cockpit/themes/preset/rngs/parallel.rng +0 -1
- data/cockpit/themes/preset/rngs/parallel_branch.rng +0 -1
- data/cockpit/themes/preset/rngs/stop.rng +0 -1
- data/cockpit/themes/preset/rngs/terminate.rng +0 -1
- data/lib/cpee/empty_workflow.rb +0 -28
- data/lib/cpee/handler_notifications.rb +0 -47
- data/lib/cpee/handler_properties.rb +0 -50
- data/lib/cpee/instantiation.rb +0 -369
- data/lib/cpee/processtransformation/bpel/Repository/booking.bpel +0 -125
- data/lib/cpee/processtransformation/bpel/Repository/booking.wsdl +0 -72
- data/lib/cpee/processtransformation/bpel/Repository/booking/airline.wsdl +0 -71
- data/lib/cpee/processtransformation/bpel/Repository/booking/hotel.wsdl +0 -64
- data/lib/cpee/processtransformation/bpel/Repository/booking/report.wsdl +0 -71
- data/lib/cpee/processtransformation/bpel/bpel2wee.rb +0 -34
- data/lib/cpee/processtransformation/bpel/bpelserver.ru +0 -64
- data/lib/cpee/processtransformation/bpel/bpelserver.xml +0 -70
- data/lib/cpee/processtransformation/bpel/lib/BPEL_Transform.rb +0 -367
- data/lib/cpee/processtransformation/bpmn2.rb +0 -297
- data/lib/cpee/processtransformation/cpee.rb +0 -119
- data/lib/cpee/processtransformation/structures.rb +0 -465
- data/lib/cpee/processtransformation/target.rb +0 -50
- data/log/azure.rb +0 -10
- data/log/azure_logger.rb +0 -136
- data/log/chain.xml +0 -27
- data/log/elasticsearch.rb +0 -15
- data/log/elasticsearch_logging.rb +0 -377
- data/log/legacy/test_es.rb +0 -26
- data/log/legacy/test_split.rb +0 -211
- data/log/log.xml +0 -13
- data/log/non_tamp.rb +0 -156
- data/log/sic.rb +0 -64
- data/log/template.xes_xml +0 -23
- data/log/template.xes_yaml +0 -28
- data/log/trace.yaml +0 -17717
- data/log/trace_sic.yaml +0 -18343
- data/log/xes_xml.rb +0 -121
- data/log/xes_yaml.rb +0 -96
- data/server/handlerwrappers/soap.rb +0 -146
- data/server/resources/properties.schema.active +0 -139
- data/server/resources/properties.schema.finished +0 -139
- data/server/resources/properties.schema.inactive +0 -136
- data/server/transformation_dslx.xsl +0 -790
- data/test/callback.rb +0 -9
@@ -1,139 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
This file is part of CPEE.
|
3
|
-
|
4
|
-
CPEE is free software: you can redistribute it and/or modify it under the terms
|
5
|
-
of the GNU General Public License as published by the Free Software Foundation,
|
6
|
-
either version 3 of the License, or (at your option) any later version.
|
7
|
-
|
8
|
-
CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
|
9
|
-
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
10
|
-
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
11
|
-
|
12
|
-
You should have received a copy of the GNU General Public License along with
|
13
|
-
CPEE (file COPYING in the main directory). If not, see
|
14
|
-
<http://www.gnu.org/licenses/>.
|
15
|
-
-->
|
16
|
-
|
17
|
-
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
18
|
-
<attributes type="complex" modifiable="false" mutable="false">
|
19
|
-
<zeroOrMore>
|
20
|
-
<element><anyName/><text/></element>
|
21
|
-
</zeroOrMore>
|
22
|
-
</attributes>
|
23
|
-
<handlerwrapper type="simple" modifiable="false" mutable="false">
|
24
|
-
<data type="string">
|
25
|
-
<param name="pattern">[A-Z][a-zA-Z]*</param>
|
26
|
-
</data>
|
27
|
-
</handlerwrapper>
|
28
|
-
<dsl type="simple" modifiable="false" mutable="false">
|
29
|
-
<text/>
|
30
|
-
</dsl>
|
31
|
-
<dslx type="arbitrary" modifiable="false" mutable="false"/>
|
32
|
-
<description type="arbitrary" modifiable="false" mutable="false"/>
|
33
|
-
<transformation type="complex" modifiable="false" mutable="false">
|
34
|
-
<element name='description'>
|
35
|
-
<attribute name='type'>
|
36
|
-
<choice>
|
37
|
-
<value>copy</value>
|
38
|
-
<value>rest</value>
|
39
|
-
<value>xslt</value>
|
40
|
-
<value>clean</value>
|
41
|
-
<value>none</value>
|
42
|
-
</choice>
|
43
|
-
</attribute>
|
44
|
-
<data type="anyURI"/>
|
45
|
-
</element>
|
46
|
-
<element name='dataelements'>
|
47
|
-
<attribute name='type'>
|
48
|
-
<choice>
|
49
|
-
<value>rest</value>
|
50
|
-
<value>xslt</value>
|
51
|
-
<value>clean</value>
|
52
|
-
<value>none</value>
|
53
|
-
</choice>
|
54
|
-
</attribute>
|
55
|
-
<data type="anyURI"/>
|
56
|
-
</element>
|
57
|
-
<element name='endpoints'>
|
58
|
-
<attribute name='type'>
|
59
|
-
<choice>
|
60
|
-
<value>rest</value>
|
61
|
-
<value>xslt</value>
|
62
|
-
<value>clean</value>
|
63
|
-
<value>none</value>
|
64
|
-
</choice>
|
65
|
-
</attribute>
|
66
|
-
<data type="anyURI"/>
|
67
|
-
</element>
|
68
|
-
</transformation>
|
69
|
-
<state type="state" modifiable="false" mutable="false">
|
70
|
-
<ready>
|
71
|
-
<ready putable="true"/>
|
72
|
-
<running putable="true"/>
|
73
|
-
<simulating putable="true"/>
|
74
|
-
<replaying putable="true"/>
|
75
|
-
<abandoned putable="true"/>
|
76
|
-
</ready>
|
77
|
-
<running>
|
78
|
-
<stopping putable="true"/>
|
79
|
-
<finishing putable="false"/>
|
80
|
-
<finished putable="false"/>
|
81
|
-
</running>
|
82
|
-
<simulating>
|
83
|
-
<ready putable="false"/>
|
84
|
-
<stopped putable="false"/>
|
85
|
-
</simulating>
|
86
|
-
<replaying>
|
87
|
-
<stopping putable="true"/>
|
88
|
-
<finishing putable="false"/>
|
89
|
-
<finished putable="false"/>
|
90
|
-
</replaying>
|
91
|
-
<stopping>
|
92
|
-
<stopped putable="false"/>
|
93
|
-
</stopping>
|
94
|
-
<stopped>
|
95
|
-
<abandoned putable="true"/>
|
96
|
-
<stopped putable="true"/>
|
97
|
-
<running putable="true"/>
|
98
|
-
<simulating putable="true"/>
|
99
|
-
<replaying putable="true"/>
|
100
|
-
</stopped>
|
101
|
-
<abandoned/>
|
102
|
-
<finished/>
|
103
|
-
</state>
|
104
|
-
<status type="complex" modifiable="false" mutable="false">
|
105
|
-
<optional>
|
106
|
-
<element name='id'>
|
107
|
-
<data type="integer"/>
|
108
|
-
</element>
|
109
|
-
<element name='message'>
|
110
|
-
<data type="string"/>
|
111
|
-
</element>
|
112
|
-
</optional>
|
113
|
-
</status>
|
114
|
-
<positions type="complex" modifiable="false" mutable="false">
|
115
|
-
<zeroOrMore>
|
116
|
-
<element>
|
117
|
-
<anyName/>
|
118
|
-
<optional>
|
119
|
-
<attribute name='passthrough'>
|
120
|
-
<data type="string"/>
|
121
|
-
</attribute>
|
122
|
-
</optional>
|
123
|
-
<data type="string">
|
124
|
-
<param name="pattern">(at|after)(;[A-Za-z0-9]+)?</param>
|
125
|
-
</data>
|
126
|
-
</element>
|
127
|
-
</zeroOrMore>
|
128
|
-
</positions>
|
129
|
-
<dataelements type="complex" modifiable="false" mutable="false">
|
130
|
-
<zeroOrMore>
|
131
|
-
<element><anyName/><text/></element>
|
132
|
-
</zeroOrMore>
|
133
|
-
</dataelements>
|
134
|
-
<endpoints type="complex" modifiable="false" mutable="false">
|
135
|
-
<zeroOrMore>
|
136
|
-
<element><anyName/><text/></element>
|
137
|
-
</zeroOrMore>
|
138
|
-
</endpoints>
|
139
|
-
</properties>
|
@@ -1,136 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
This file is part of CPEE.
|
3
|
-
|
4
|
-
CPEE is free software: you can redistribute it and/or modify it under the terms
|
5
|
-
of the GNU General Public License as published by the Free Software Foundation,
|
6
|
-
either version 3 of the License, or (at your option) any later version.
|
7
|
-
|
8
|
-
CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
|
9
|
-
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
10
|
-
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
11
|
-
|
12
|
-
You should have received a copy of the GNU General Public License along with
|
13
|
-
CPEE (file COPYING in the main directory). If not, see
|
14
|
-
<http://www.gnu.org/licenses/>.
|
15
|
-
-->
|
16
|
-
|
17
|
-
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
18
|
-
<attributes type="complex" modifiable="true">
|
19
|
-
<zeroOrMore>
|
20
|
-
<element><anyName/><text/></element>
|
21
|
-
</zeroOrMore>
|
22
|
-
</attributes>
|
23
|
-
<handlerwrapper type="simple" modifiable="true">
|
24
|
-
<data type="string">
|
25
|
-
<param name="pattern">[A-Z][a-zA-Z]*</param>
|
26
|
-
</data>
|
27
|
-
</handlerwrapper>
|
28
|
-
<dsl type="simple" modifiable="false" mutable="false">
|
29
|
-
<text/>
|
30
|
-
</dsl>
|
31
|
-
<dslx type="arbitrary" modifiable="false" mutable="false"/>
|
32
|
-
<description type="arbitrary" modifiable="true"/>
|
33
|
-
<transformation type="complex" modifiable="true">
|
34
|
-
<element name='description'>
|
35
|
-
<attribute name='type'>
|
36
|
-
<choice>
|
37
|
-
<value>copy</value>
|
38
|
-
<value>rest</value>
|
39
|
-
<value>xslt</value>
|
40
|
-
<value>clean</value>
|
41
|
-
<value>none</value>
|
42
|
-
</choice>
|
43
|
-
</attribute>
|
44
|
-
<data type="anyURI"/>
|
45
|
-
</element>
|
46
|
-
<element name='dataelements'>
|
47
|
-
<attribute name='type'>
|
48
|
-
<choice>
|
49
|
-
<value>rest</value>
|
50
|
-
<value>xslt</value>
|
51
|
-
<value>clean</value>
|
52
|
-
<value>none</value>
|
53
|
-
</choice>
|
54
|
-
</attribute>
|
55
|
-
<data type="anyURI"/>
|
56
|
-
</element>
|
57
|
-
<element name='endpoints'>
|
58
|
-
<attribute name='type'>
|
59
|
-
<choice>
|
60
|
-
<value>rest</value>
|
61
|
-
<value>xslt</value>
|
62
|
-
<value>clean</value>
|
63
|
-
<value>none</value>
|
64
|
-
</choice>
|
65
|
-
</attribute>
|
66
|
-
<data type="anyURI"/>
|
67
|
-
</element>
|
68
|
-
</transformation>
|
69
|
-
<state type="state" modifiable="true">
|
70
|
-
<ready>
|
71
|
-
<running putable="true"/>
|
72
|
-
<ready putable="true"/>
|
73
|
-
<simulating putable="true"/>
|
74
|
-
<replaying putable="true"/>
|
75
|
-
<abandoned putable="true"/>
|
76
|
-
</ready>
|
77
|
-
<running>
|
78
|
-
<stopping putable="true"/>
|
79
|
-
<finishing putable="false"/>
|
80
|
-
<finished putable="false"/>
|
81
|
-
</running>
|
82
|
-
<simulating>
|
83
|
-
<ready putable="false"/>
|
84
|
-
<stopped putable="false"/>
|
85
|
-
</simulating>
|
86
|
-
<replaying>
|
87
|
-
<stopping putable="true"/>
|
88
|
-
<finishing putable="false"/>
|
89
|
-
<finished putable="false"/>
|
90
|
-
</replaying>
|
91
|
-
<stopped>
|
92
|
-
<abandoned putable="true"/>
|
93
|
-
<stopped putable="true"/>
|
94
|
-
<running putable="true"/>
|
95
|
-
<simulating putable="true"/>
|
96
|
-
<replaying putable="true"/>
|
97
|
-
</stopped>
|
98
|
-
<abandoned/>
|
99
|
-
<finished/>
|
100
|
-
</state>
|
101
|
-
<status type="complex" modifiable="false" mutable="false">
|
102
|
-
<optional>
|
103
|
-
<element name='id'>
|
104
|
-
<data type="integer"/>
|
105
|
-
</element>
|
106
|
-
<element name='message'>
|
107
|
-
<data type="string"/>
|
108
|
-
</element>
|
109
|
-
</optional>
|
110
|
-
</status>
|
111
|
-
<positions type="complex" modifiable="true">
|
112
|
-
<zeroOrMore>
|
113
|
-
<element>
|
114
|
-
<anyName/>
|
115
|
-
<optional>
|
116
|
-
<attribute name='passthrough'>
|
117
|
-
<data type="string"/>
|
118
|
-
</attribute>
|
119
|
-
</optional>
|
120
|
-
<data type="string">
|
121
|
-
<param name="pattern">(at|after)(;[A-Za-z0-9]+)?</param>
|
122
|
-
</data>
|
123
|
-
</element>
|
124
|
-
</zeroOrMore>
|
125
|
-
</positions>
|
126
|
-
<dataelements type="complex" modifiable="true">
|
127
|
-
<zeroOrMore>
|
128
|
-
<element><anyName/><text/></element>
|
129
|
-
</zeroOrMore>
|
130
|
-
</dataelements>
|
131
|
-
<endpoints type="complex" modifiable="true">
|
132
|
-
<zeroOrMore>
|
133
|
-
<element><anyName/><text/></element>
|
134
|
-
</zeroOrMore>
|
135
|
-
</endpoints>
|
136
|
-
</properties>
|
@@ -1,790 +0,0 @@
|
|
1
|
-
<?xml version="1.0"?>
|
2
|
-
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://cpee.org/ns/description/1.0" xmlns:str="http://exslt.org/strings" version="1.0">
|
3
|
-
<xsl:output method="text"/>
|
4
|
-
<xsl:strip-space elements="*"/>
|
5
|
-
<xsl:variable name="myspacemultiplier">2</xsl:variable>
|
6
|
-
<xsl:template match="/">
|
7
|
-
<xsl:apply-templates select="//d:description"/>
|
8
|
-
</xsl:template>
|
9
|
-
<xsl:template match="//d:description">
|
10
|
-
<xsl:apply-templates>
|
11
|
-
<xsl:with-param name="myspace">
|
12
|
-
<xsl:value-of select="-1*$myspacemultiplier"/>
|
13
|
-
</xsl:with-param>
|
14
|
-
</xsl:apply-templates>
|
15
|
-
</xsl:template>
|
16
|
-
<xsl:template match="*">
|
17
|
-
<xsl:param name="myspace"/>
|
18
|
-
<xsl:call-template name="print-space">
|
19
|
-
<xsl:with-param name="i">1</xsl:with-param>
|
20
|
-
<xsl:with-param name="count">
|
21
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
22
|
-
</xsl:with-param>
|
23
|
-
</xsl:call-template>
|
24
|
-
<xsl:if test="name()='call' or name()='manipulate'">
|
25
|
-
<xsl:value-of select="name()"/>
|
26
|
-
<xsl:text> :</xsl:text>
|
27
|
-
<xsl:value-of select="@id"/>
|
28
|
-
</xsl:if>
|
29
|
-
<xsl:if test="name()='call'">
|
30
|
-
<xsl:text>, </xsl:text>
|
31
|
-
<xsl:choose>
|
32
|
-
<xsl:when test="count(str:tokenize(@endpoint,' ')) > 1">
|
33
|
-
<xsl:text>[</xsl:text>
|
34
|
-
<xsl:for-each select="str:tokenize(@endpoint,' ')">
|
35
|
-
<xsl:if test="position() >1">, </xsl:if>
|
36
|
-
<xsl:text>:</xsl:text>
|
37
|
-
<xsl:value-of select="."/>
|
38
|
-
</xsl:for-each>
|
39
|
-
<xsl:text>]</xsl:text>
|
40
|
-
</xsl:when>
|
41
|
-
<xsl:when test="count(str:tokenize(@endpoint,' ')) = 0">
|
42
|
-
<xsl:text>nil</xsl:text>
|
43
|
-
</xsl:when>
|
44
|
-
<xsl:otherwise>
|
45
|
-
<xsl:text>:</xsl:text>
|
46
|
-
<xsl:value-of select="@endpoint"/>
|
47
|
-
</xsl:otherwise>
|
48
|
-
</xsl:choose>
|
49
|
-
<xsl:text>, parameters: { </xsl:text>
|
50
|
-
<xsl:apply-templates select="d:parameters"/>
|
51
|
-
<xsl:text> }</xsl:text>
|
52
|
-
<xsl:if test="(d:finalize or d:code/d:finalize) and (d:finalize/text() or d:code/d:finalize/text())">
|
53
|
-
<xsl:text>, finalize: <<-END</xsl:text>
|
54
|
-
</xsl:if>
|
55
|
-
<xsl:if test="(d:update or d:code/d:update) and (d:update/text() or d:code/d:update/text())">
|
56
|
-
<xsl:text>, update: <<-END</xsl:text>
|
57
|
-
</xsl:if>
|
58
|
-
<xsl:if test="(d:prepare or d:code/d:prepare) and (d:prepare/text() or d:code/d:prepare/text())">
|
59
|
-
<xsl:text>, prepare: <<-END</xsl:text>
|
60
|
-
</xsl:if>
|
61
|
-
<xsl:if test="(d:rescue or d:code/d:rescue) and (d:rescue/text() or d:code/d:rescue/text())">
|
62
|
-
<xsl:text>, salvage: <<-END</xsl:text>
|
63
|
-
</xsl:if>
|
64
|
-
<xsl:apply-templates select="d:finalize | d:code/d:finalize" mode="part-of-call">
|
65
|
-
<xsl:with-param name="myspace">
|
66
|
-
<xsl:value-of select="$myspace"/>
|
67
|
-
</xsl:with-param>
|
68
|
-
</xsl:apply-templates>
|
69
|
-
<xsl:apply-templates select="d:update | d:code/d:update" mode="part-of-call">
|
70
|
-
<xsl:with-param name="myspace">
|
71
|
-
<xsl:value-of select="$myspace"/>
|
72
|
-
</xsl:with-param>
|
73
|
-
</xsl:apply-templates>
|
74
|
-
<xsl:apply-templates select="d:prepare | d:code/d:prepare" mode="part-of-call">
|
75
|
-
<xsl:with-param name="myspace">
|
76
|
-
<xsl:value-of select="$myspace"/>
|
77
|
-
</xsl:with-param>
|
78
|
-
</xsl:apply-templates>
|
79
|
-
<xsl:apply-templates select="d:rescue | d:code/d:rescue" mode="part-of-call">
|
80
|
-
<xsl:with-param name="myspace">
|
81
|
-
<xsl:value-of select="$myspace"/>
|
82
|
-
</xsl:with-param>
|
83
|
-
</xsl:apply-templates>
|
84
|
-
<xsl:call-template name="print-newline"/>
|
85
|
-
</xsl:if>
|
86
|
-
<xsl:if test="name()='manipulate'">
|
87
|
-
<xsl:if test="@label">
|
88
|
-
<xsl:text>, { :label => "</xsl:text>
|
89
|
-
<xsl:value-of select="@label"/>
|
90
|
-
<xsl:text>" }</xsl:text>
|
91
|
-
</xsl:if>
|
92
|
-
<xsl:call-template name="print-mcontent">
|
93
|
-
<xsl:with-param name="myspace">
|
94
|
-
<xsl:value-of select="$myspace"/>
|
95
|
-
</xsl:with-param>
|
96
|
-
</xsl:call-template>
|
97
|
-
<xsl:call-template name="print-newline"/>
|
98
|
-
</xsl:if>
|
99
|
-
<xsl:if test="name()='terminate'">
|
100
|
-
<xsl:text>terminate</xsl:text>
|
101
|
-
<xsl:call-template name="print-newline"/>
|
102
|
-
</xsl:if>
|
103
|
-
<xsl:if test="name()='stop'">
|
104
|
-
<xsl:text>stop :</xsl:text>
|
105
|
-
<xsl:value-of select="@id"/>
|
106
|
-
<xsl:call-template name="print-newline"/>
|
107
|
-
</xsl:if>
|
108
|
-
<xsl:if test="name()='escape'">
|
109
|
-
<xsl:text>escape</xsl:text>
|
110
|
-
<xsl:call-template name="print-newline"/>
|
111
|
-
</xsl:if>
|
112
|
-
<xsl:if test="name()='parallel'">
|
113
|
-
<xsl:text>parallel</xsl:text>
|
114
|
-
<xsl:if test="@wait">
|
115
|
-
<xsl:text> :wait => </xsl:text>
|
116
|
-
<xsl:value-of select="@wait"/>
|
117
|
-
</xsl:if>
|
118
|
-
<xsl:text> do</xsl:text>
|
119
|
-
<xsl:call-template name="print-newline"/>
|
120
|
-
<xsl:apply-templates>
|
121
|
-
<xsl:with-param name="myspace">
|
122
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
123
|
-
</xsl:with-param>
|
124
|
-
</xsl:apply-templates>
|
125
|
-
<xsl:call-template name="print-space">
|
126
|
-
<xsl:with-param name="i">1</xsl:with-param>
|
127
|
-
<xsl:with-param name="count">
|
128
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
129
|
-
</xsl:with-param>
|
130
|
-
</xsl:call-template>
|
131
|
-
<xsl:text>end</xsl:text>
|
132
|
-
<xsl:call-template name="print-newline"/>
|
133
|
-
</xsl:if>
|
134
|
-
<xsl:if test="name()='loop'">
|
135
|
-
<xsl:text>loop </xsl:text>
|
136
|
-
<xsl:if test="@mode='pre_test'">
|
137
|
-
<xsl:choose>
|
138
|
-
<xsl:when test="@language='application/x-ruby'">
|
139
|
-
<xsl:text>pre_test{</xsl:text>
|
140
|
-
<xsl:value-of select="@condition"/>
|
141
|
-
<xsl:text>} </xsl:text>
|
142
|
-
</xsl:when>
|
143
|
-
<xsl:otherwise>
|
144
|
-
<xsl:text>pre_test("</xsl:text>
|
145
|
-
<xsl:value-of select="str:replace(str:replace(@condition,'\','\\'),'"','\"')"/>
|
146
|
-
<xsl:text>")</xsl:text>
|
147
|
-
</xsl:otherwise>
|
148
|
-
</xsl:choose>
|
149
|
-
</xsl:if>
|
150
|
-
<xsl:if test="@mode='post_test'">
|
151
|
-
<xsl:choose>
|
152
|
-
<xsl:when test="@language='application/x-ruby'">
|
153
|
-
<xsl:text>post_test{</xsl:text>
|
154
|
-
<xsl:value-of select="@condition"/>
|
155
|
-
<xsl:text>} </xsl:text>
|
156
|
-
</xsl:when>
|
157
|
-
<xsl:otherwise>
|
158
|
-
<xsl:text>post_test("</xsl:text>
|
159
|
-
<xsl:value-of select="str:replace(str:replace(@condition,'\','\\'),'"','\"')"/>
|
160
|
-
<xsl:text>")</xsl:text>
|
161
|
-
</xsl:otherwise>
|
162
|
-
</xsl:choose>
|
163
|
-
</xsl:if>
|
164
|
-
<xsl:for-each select="@*[not(name()='language' or name()='mode' or name()='condition' or name()='svg-label')]">
|
165
|
-
<xsl:text>, :</xsl:text>
|
166
|
-
<xsl:value-of select="name(.)"/>
|
167
|
-
<xsl:text> => "</xsl:text>
|
168
|
-
<xsl:value-of select="."/>
|
169
|
-
<xsl:text>"</xsl:text>
|
170
|
-
</xsl:for-each>
|
171
|
-
<xsl:text> do</xsl:text>
|
172
|
-
<xsl:call-template name="print-newline"/>
|
173
|
-
<xsl:apply-templates>
|
174
|
-
<xsl:with-param name="myspace">
|
175
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
176
|
-
</xsl:with-param>
|
177
|
-
</xsl:apply-templates>
|
178
|
-
<xsl:call-template name="print-space">
|
179
|
-
<xsl:with-param name="i">1</xsl:with-param>
|
180
|
-
<xsl:with-param name="count">
|
181
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
182
|
-
</xsl:with-param>
|
183
|
-
</xsl:call-template>
|
184
|
-
<xsl:text>end</xsl:text>
|
185
|
-
<xsl:call-template name="print-newline"/>
|
186
|
-
</xsl:if>
|
187
|
-
<xsl:if test="name()='choose'">
|
188
|
-
<xsl:text>choose </xsl:text>
|
189
|
-
<xsl:choose>
|
190
|
-
<xsl:when test="@mode='exclusive'">
|
191
|
-
<xsl:text>:exclusive</xsl:text>
|
192
|
-
</xsl:when>
|
193
|
-
<xsl:otherwise>
|
194
|
-
<xsl:text>:inclusive</xsl:text>
|
195
|
-
</xsl:otherwise>
|
196
|
-
</xsl:choose>
|
197
|
-
<xsl:text> do</xsl:text>
|
198
|
-
<xsl:call-template name="print-newline"/>
|
199
|
-
<xsl:apply-templates>
|
200
|
-
<xsl:with-param name="myspace">
|
201
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
202
|
-
</xsl:with-param>
|
203
|
-
</xsl:apply-templates>
|
204
|
-
<xsl:call-template name="print-space">
|
205
|
-
<xsl:with-param name="i">1</xsl:with-param>
|
206
|
-
<xsl:with-param name="count">
|
207
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
208
|
-
</xsl:with-param>
|
209
|
-
</xsl:call-template>
|
210
|
-
<xsl:text>end</xsl:text>
|
211
|
-
<xsl:call-template name="print-newline"/>
|
212
|
-
</xsl:if>
|
213
|
-
<xsl:if test="name()='group'">
|
214
|
-
<xsl:apply-templates>
|
215
|
-
<xsl:with-param name="myspace">
|
216
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
217
|
-
</xsl:with-param>
|
218
|
-
</xsl:apply-templates>
|
219
|
-
<xsl:call-template name="print-newline"/>
|
220
|
-
</xsl:if>
|
221
|
-
<xsl:if test="name()='critical'">
|
222
|
-
<xsl:text>critical :</xsl:text>
|
223
|
-
<xsl:value-of select="@sid"/>
|
224
|
-
<xsl:text> do</xsl:text>
|
225
|
-
<xsl:call-template name="print-newline"/>
|
226
|
-
<xsl:apply-templates>
|
227
|
-
<xsl:with-param name="myspace">
|
228
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
229
|
-
</xsl:with-param>
|
230
|
-
</xsl:apply-templates>
|
231
|
-
<xsl:call-template name="print-space">
|
232
|
-
<xsl:with-param name="i">1</xsl:with-param>
|
233
|
-
<xsl:with-param name="count">
|
234
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
235
|
-
</xsl:with-param>
|
236
|
-
</xsl:call-template>
|
237
|
-
<xsl:text>end</xsl:text>
|
238
|
-
<xsl:call-template name="print-newline"/>
|
239
|
-
</xsl:if>
|
240
|
-
</xsl:template>
|
241
|
-
<xsl:template match="d:alternative">
|
242
|
-
<xsl:param name="myspace"/>
|
243
|
-
<xsl:call-template name="print-space">
|
244
|
-
<xsl:with-param name="i">1</xsl:with-param>
|
245
|
-
<xsl:with-param name="count">
|
246
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
247
|
-
</xsl:with-param>
|
248
|
-
</xsl:call-template>
|
249
|
-
<xsl:text>alternative </xsl:text>
|
250
|
-
<xsl:choose>
|
251
|
-
<xsl:when test="@language='application/x-ruby'">
|
252
|
-
<xsl:text>test{</xsl:text>
|
253
|
-
<xsl:value-of select="@condition"/>
|
254
|
-
<xsl:text>}</xsl:text>
|
255
|
-
</xsl:when>
|
256
|
-
<xsl:otherwise>
|
257
|
-
<xsl:text>test("</xsl:text>
|
258
|
-
<xsl:value-of select="str:replace(str:replace(@condition,'\','\\'),'"','\"')"/>
|
259
|
-
<xsl:text>")</xsl:text>
|
260
|
-
</xsl:otherwise>
|
261
|
-
</xsl:choose>
|
262
|
-
<xsl:for-each select="@*[not(name()='language' or name()='condition' or name()='svg-label')]">
|
263
|
-
<xsl:text>, :</xsl:text>
|
264
|
-
<xsl:value-of select="name(.)"/>
|
265
|
-
<xsl:text> => "</xsl:text>
|
266
|
-
<xsl:value-of select="."/>
|
267
|
-
<xsl:text>"</xsl:text>
|
268
|
-
</xsl:for-each>
|
269
|
-
<xsl:text> do</xsl:text>
|
270
|
-
<xsl:call-template name="print-newline"/>
|
271
|
-
<xsl:apply-templates>
|
272
|
-
<xsl:with-param name="myspace">
|
273
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
274
|
-
</xsl:with-param>
|
275
|
-
</xsl:apply-templates>
|
276
|
-
<xsl:call-template name="print-space">
|
277
|
-
<xsl:with-param name="i">1</xsl:with-param>
|
278
|
-
<xsl:with-param name="count">
|
279
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
280
|
-
</xsl:with-param>
|
281
|
-
</xsl:call-template>
|
282
|
-
<xsl:text>end</xsl:text>
|
283
|
-
<xsl:call-template name="print-newline"/>
|
284
|
-
</xsl:template>
|
285
|
-
<xsl:template match="d:otherwise">
|
286
|
-
<xsl:param name="myspace"/>
|
287
|
-
<xsl:if test="*">
|
288
|
-
<xsl:call-template name="print-space">
|
289
|
-
<xsl:with-param name="i">1</xsl:with-param>
|
290
|
-
<xsl:with-param name="count">
|
291
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
292
|
-
</xsl:with-param>
|
293
|
-
</xsl:call-template>
|
294
|
-
<xsl:text>otherwise </xsl:text>
|
295
|
-
<xsl:for-each select="@*[not(name()='language' or name()='condition' or name()='svg-label')]">
|
296
|
-
<xsl:if test="position() >1">, </xsl:if>
|
297
|
-
<xsl:text>:</xsl:text>
|
298
|
-
<xsl:value-of select="name(.)"/>
|
299
|
-
<xsl:text> => "</xsl:text>
|
300
|
-
<xsl:value-of select="."/>
|
301
|
-
<xsl:text>"</xsl:text>
|
302
|
-
</xsl:for-each>
|
303
|
-
<xsl:text> do</xsl:text>
|
304
|
-
<xsl:call-template name="print-newline"/>
|
305
|
-
<xsl:apply-templates>
|
306
|
-
<xsl:with-param name="myspace">
|
307
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
308
|
-
</xsl:with-param>
|
309
|
-
</xsl:apply-templates>
|
310
|
-
<xsl:call-template name="print-space">
|
311
|
-
<xsl:with-param name="i">1</xsl:with-param>
|
312
|
-
<xsl:with-param name="count">
|
313
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
314
|
-
</xsl:with-param>
|
315
|
-
</xsl:call-template>
|
316
|
-
<xsl:text>end</xsl:text>
|
317
|
-
<xsl:call-template name="print-newline"/>
|
318
|
-
</xsl:if>
|
319
|
-
</xsl:template>
|
320
|
-
<xsl:template match="d:parallel_branch">
|
321
|
-
<xsl:param name="myspace"/>
|
322
|
-
<xsl:call-template name="print-space">
|
323
|
-
<xsl:with-param name="i">1</xsl:with-param>
|
324
|
-
<xsl:with-param name="count">
|
325
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
326
|
-
</xsl:with-param>
|
327
|
-
</xsl:call-template>
|
328
|
-
<xsl:text>parallel_branch</xsl:text>
|
329
|
-
<xsl:if test="@pass">
|
330
|
-
<xsl:text> </xsl:text>
|
331
|
-
<xsl:value-of select="@pass"/>
|
332
|
-
</xsl:if>
|
333
|
-
<xsl:text> do</xsl:text>
|
334
|
-
<xsl:if test="@local">
|
335
|
-
<xsl:text> |</xsl:text>
|
336
|
-
<xsl:value-of select="@local"/>
|
337
|
-
<xsl:text>|</xsl:text>
|
338
|
-
</xsl:if>
|
339
|
-
<xsl:call-template name="print-newline"/>
|
340
|
-
<xsl:apply-templates>
|
341
|
-
<xsl:with-param name="myspace">
|
342
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
343
|
-
</xsl:with-param>
|
344
|
-
</xsl:apply-templates>
|
345
|
-
<xsl:call-template name="print-space">
|
346
|
-
<xsl:with-param name="i">1</xsl:with-param>
|
347
|
-
<xsl:with-param name="count">
|
348
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
349
|
-
</xsl:with-param>
|
350
|
-
</xsl:call-template>
|
351
|
-
<xsl:text>end</xsl:text>
|
352
|
-
<xsl:call-template name="print-newline"/>
|
353
|
-
</xsl:template>
|
354
|
-
<xsl:template match="d:parameters">
|
355
|
-
<xsl:apply-templates select="d:label" mode="parameter"/>
|
356
|
-
<xsl:apply-templates select="d:*[not(name()='label')]" mode="parameter"/>
|
357
|
-
</xsl:template>
|
358
|
-
<xsl:template match="d:label" mode="parameter">
|
359
|
-
<xsl:text>:</xsl:text>
|
360
|
-
<xsl:value-of select="name()"/>
|
361
|
-
<xsl:text> => "</xsl:text>
|
362
|
-
<xsl:value-of select="str:replace(str:replace(text(),'\','\\'),'"','\"')"/>
|
363
|
-
<xsl:text>"</xsl:text>
|
364
|
-
</xsl:template>
|
365
|
-
<xsl:template match="d:*[not(name()='label')]" mode="parameter">
|
366
|
-
<xsl:if test="count(preceding-sibling::*) > 0">, </xsl:if>
|
367
|
-
<xsl:text>:</xsl:text>
|
368
|
-
<xsl:value-of select="name()"/>
|
369
|
-
<xsl:text> => </xsl:text>
|
370
|
-
|
371
|
-
<xsl:choose>
|
372
|
-
<xsl:when test="count(*) > 0 and name()='arguments'">
|
373
|
-
<xsl:text>[</xsl:text>
|
374
|
-
<xsl:apply-templates select="d:*" mode="sub"/>
|
375
|
-
<xsl:text>]</xsl:text>
|
376
|
-
</xsl:when>
|
377
|
-
<xsl:when test="count(*) > 0 and name()='sensors'">
|
378
|
-
<xsl:text>[</xsl:text>
|
379
|
-
<xsl:apply-templates select="d:*" mode="plainmulti"/>
|
380
|
-
<xsl:text>]</xsl:text>
|
381
|
-
</xsl:when>
|
382
|
-
<xsl:when test="count(*) > 0 and name()='aggregators'">
|
383
|
-
<xsl:text>[</xsl:text>
|
384
|
-
<xsl:apply-templates select="d:*" mode="plainmulti"/>
|
385
|
-
<xsl:text>]</xsl:text>
|
386
|
-
</xsl:when>
|
387
|
-
<xsl:when test="count(*) > 0 and name()='costs'">
|
388
|
-
<xsl:text>[</xsl:text>
|
389
|
-
<xsl:apply-templates select="d:*" mode="plainmulti"/>
|
390
|
-
<xsl:text>]</xsl:text>
|
391
|
-
</xsl:when>
|
392
|
-
<xsl:when test="count(*) > 0 and name()='report'">
|
393
|
-
<xsl:apply-templates select="d:*" mode="plainmulti"/>
|
394
|
-
</xsl:when>
|
395
|
-
<xsl:when test="count(*) > 0 and not(name()='arguments')">
|
396
|
-
<xsl:text>{</xsl:text>
|
397
|
-
<xsl:apply-templates select="d:*" mode="parameter"/>
|
398
|
-
<xsl:text>}</xsl:text>
|
399
|
-
</xsl:when>
|
400
|
-
<xsl:when test="not(node())">
|
401
|
-
<xsl:text>nil</xsl:text>
|
402
|
-
</xsl:when>
|
403
|
-
<xsl:otherwise>
|
404
|
-
<xsl:value-of select="text()"/>
|
405
|
-
</xsl:otherwise>
|
406
|
-
</xsl:choose>
|
407
|
-
</xsl:template>
|
408
|
-
<xsl:template match="d:*" mode="plain">
|
409
|
-
<xsl:if test="count(preceding-sibling::*) > 0">, </xsl:if>
|
410
|
-
<xsl:text>:</xsl:text>
|
411
|
-
<xsl:value-of select="name()"/>
|
412
|
-
<xsl:text> => </xsl:text>
|
413
|
-
<xsl:choose>
|
414
|
-
<xsl:when test="count(*) > 0 and count(*) = count(*[name()=name(../*[1])])">
|
415
|
-
<xsl:text>[</xsl:text>
|
416
|
-
<xsl:apply-templates select="d:*" mode="plainmulti"/>
|
417
|
-
<xsl:text>]</xsl:text>
|
418
|
-
</xsl:when>
|
419
|
-
<xsl:when test="count(*) > 0">
|
420
|
-
<xsl:text>{</xsl:text>
|
421
|
-
<xsl:apply-templates select="d:*" mode="plain"/>
|
422
|
-
<xsl:text>}</xsl:text>
|
423
|
-
</xsl:when>
|
424
|
-
<xsl:when test="not(node())">
|
425
|
-
<xsl:text>nil</xsl:text>
|
426
|
-
</xsl:when>
|
427
|
-
<xsl:otherwise>
|
428
|
-
<xsl:choose>
|
429
|
-
<xsl:when test="substring(text(),1,1) = '!'">
|
430
|
-
<xsl:value-of select="substring(text(),2)"/>
|
431
|
-
</xsl:when>
|
432
|
-
<xsl:otherwise>
|
433
|
-
<xsl:text>"</xsl:text>
|
434
|
-
<xsl:value-of select="str:replace(str:replace(text(),'\','\\'),'"','\"')"/>
|
435
|
-
<xsl:text>"</xsl:text>
|
436
|
-
</xsl:otherwise>
|
437
|
-
</xsl:choose>
|
438
|
-
</xsl:otherwise>
|
439
|
-
</xsl:choose>
|
440
|
-
</xsl:template>
|
441
|
-
<xsl:template match="d:*" mode="plainmulti">
|
442
|
-
<xsl:if test="count(preceding-sibling::*) > 0">, </xsl:if>
|
443
|
-
<xsl:text>{ </xsl:text>
|
444
|
-
<xsl:text>:</xsl:text>
|
445
|
-
<xsl:value-of select="name()"/>
|
446
|
-
<xsl:text> => </xsl:text>
|
447
|
-
<xsl:choose>
|
448
|
-
<xsl:when test="count(*) > 0">
|
449
|
-
<xsl:text>{</xsl:text>
|
450
|
-
<xsl:apply-templates select="d:*" mode="plain"/>
|
451
|
-
<xsl:text>}</xsl:text>
|
452
|
-
</xsl:when>
|
453
|
-
<xsl:when test="not(node())">
|
454
|
-
<xsl:text>nil</xsl:text>
|
455
|
-
</xsl:when>
|
456
|
-
<xsl:otherwise>
|
457
|
-
<xsl:choose>
|
458
|
-
<xsl:when test="substring(text(),1,1) = '!'">
|
459
|
-
<xsl:value-of select="substring(text(),2)"/>
|
460
|
-
</xsl:when>
|
461
|
-
<xsl:otherwise>
|
462
|
-
<xsl:text>"</xsl:text>
|
463
|
-
<xsl:value-of select="str:replace(str:replace(text(),'\','\\'),'"','\"')"/>
|
464
|
-
<xsl:text>"</xsl:text>
|
465
|
-
</xsl:otherwise>
|
466
|
-
</xsl:choose>
|
467
|
-
</xsl:otherwise>
|
468
|
-
</xsl:choose>
|
469
|
-
<xsl:text> }</xsl:text>
|
470
|
-
</xsl:template>
|
471
|
-
<xsl:template name="format-name">
|
472
|
-
<xsl:param name="tname"/>
|
473
|
-
<xsl:choose>
|
474
|
-
<xsl:when test="contains($tname,'-')">
|
475
|
-
<xsl:text>'</xsl:text>
|
476
|
-
<xsl:value-of select="$tname"/>
|
477
|
-
<xsl:text>'</xsl:text>
|
478
|
-
</xsl:when>
|
479
|
-
<xsl:otherwise>
|
480
|
-
<xsl:value-of select="$tname"/>
|
481
|
-
</xsl:otherwise>
|
482
|
-
</xsl:choose>
|
483
|
-
</xsl:template>
|
484
|
-
<xsl:template match="d:*" mode="sub">
|
485
|
-
<xsl:if test="count(preceding-sibling::*) > 0">, </xsl:if>
|
486
|
-
<xsl:text>⭐(</xsl:text>
|
487
|
-
<xsl:text>:name => :</xsl:text>
|
488
|
-
<xsl:choose>
|
489
|
-
<xsl:when test="substring(name(),1,1) = '_'">
|
490
|
-
<xsl:call-template name="format-name">
|
491
|
-
<xsl:with-param name="tname">
|
492
|
-
<xsl:value-of select="substring(name(),2)"/>
|
493
|
-
</xsl:with-param>
|
494
|
-
</xsl:call-template>
|
495
|
-
</xsl:when>
|
496
|
-
<xsl:otherwise>
|
497
|
-
<xsl:call-template name="format-name">
|
498
|
-
<xsl:with-param name="tname">
|
499
|
-
<xsl:value-of select="name()"/>
|
500
|
-
</xsl:with-param>
|
501
|
-
</xsl:call-template>
|
502
|
-
</xsl:otherwise>
|
503
|
-
</xsl:choose>
|
504
|
-
<xsl:text>, :value => ->{ </xsl:text>
|
505
|
-
<xsl:choose>
|
506
|
-
<xsl:when test="not(node())">
|
507
|
-
<xsl:text>nil</xsl:text>
|
508
|
-
</xsl:when>
|
509
|
-
<xsl:when test="child::node()[not(self::text())]">
|
510
|
-
<!-- FUUUU, there is probably much more TODO. Updated Matthias und Juergen, we tested for ing-opcua/execute -->
|
511
|
-
<xsl:choose>
|
512
|
-
<xsl:when test="child::* and name(child::*)=concat(name(.),'_item') and count(child::*[not(name()=name(../child::*[1]))])=0">
|
513
|
-
<xsl:text>"[ </xsl:text>
|
514
|
-
<xsl:apply-templates select="*" mode="JSONArrayItem"/>
|
515
|
-
<xsl:text>]"</xsl:text>
|
516
|
-
</xsl:when>
|
517
|
-
<xsl:otherwise>
|
518
|
-
<xsl:text>"{ </xsl:text>
|
519
|
-
<xsl:apply-templates select="*" mode="JSONSUB"/>
|
520
|
-
<xsl:text>}"</xsl:text>
|
521
|
-
</xsl:otherwise>
|
522
|
-
</xsl:choose>
|
523
|
-
</xsl:when>
|
524
|
-
<xsl:otherwise>
|
525
|
-
<xsl:choose>
|
526
|
-
<xsl:when test="substring(text(),1,1) = '!'">
|
527
|
-
<xsl:value-of select="substring(text(),2)"/>
|
528
|
-
</xsl:when>
|
529
|
-
<xsl:otherwise>
|
530
|
-
<xsl:text>"</xsl:text>
|
531
|
-
<xsl:value-of select="str:replace(str:replace(text(),'\','\\'),'"','\"')"/>
|
532
|
-
<xsl:text>"</xsl:text>
|
533
|
-
</xsl:otherwise>
|
534
|
-
</xsl:choose>
|
535
|
-
</xsl:otherwise>
|
536
|
-
</xsl:choose>
|
537
|
-
<xsl:text> }</xsl:text>
|
538
|
-
<xsl:for-each select="@*">
|
539
|
-
<xsl:text>, :</xsl:text>
|
540
|
-
<xsl:value-of select="name()"/>
|
541
|
-
<xsl:text> => "</xsl:text>
|
542
|
-
<xsl:value-of select="string(.)"/>
|
543
|
-
<xsl:text>"</xsl:text>
|
544
|
-
</xsl:for-each>
|
545
|
-
<xsl:text>)</xsl:text>
|
546
|
-
</xsl:template>
|
547
|
-
|
548
|
-
<xsl:template match="d:finalize | d:update | d:prepare | d:rescue" mode="part-of-call">
|
549
|
-
<xsl:param name="myspace"/>
|
550
|
-
<xsl:call-template name="print-content">
|
551
|
-
<xsl:with-param name="myspace">
|
552
|
-
<xsl:value-of select="$myspace"/>
|
553
|
-
</xsl:with-param>
|
554
|
-
</xsl:call-template>
|
555
|
-
</xsl:template>
|
556
|
-
<xsl:template name="print-content">
|
557
|
-
<xsl:param name="myspace"/>
|
558
|
-
<xsl:if test="text()">
|
559
|
-
<xsl:for-each select="str:tokenize(text(), '
')">
|
560
|
-
<xsl:value-of select="concat('
',concat(str:padding($myspace+$myspacemultiplier+$myspacemultiplier),str:replace(str:replace(str:replace(string(.),'\','\\'),'"','\"'),'#','\#')))" />
|
561
|
-
</xsl:for-each>
|
562
|
-
<xsl:call-template name="print-newline"/>
|
563
|
-
<xsl:call-template name="print-space">
|
564
|
-
<xsl:with-param name="i">1</xsl:with-param>
|
565
|
-
<xsl:with-param name="count">
|
566
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
567
|
-
</xsl:with-param>
|
568
|
-
</xsl:call-template>
|
569
|
-
<xsl:text>END</xsl:text>
|
570
|
-
</xsl:if>
|
571
|
-
</xsl:template>
|
572
|
-
<xsl:template name="print-mcontent">
|
573
|
-
<xsl:param name="myspace"/>
|
574
|
-
<xsl:if test="text()">
|
575
|
-
<xsl:choose>
|
576
|
-
<xsl:when test="@language='application/x-ruby'">
|
577
|
-
<xsl:text> do </xsl:text>
|
578
|
-
<xsl:if test="@output">
|
579
|
-
<xsl:text>|</xsl:text>
|
580
|
-
<xsl:value-of select="@output"/>
|
581
|
-
<xsl:text>|</xsl:text>
|
582
|
-
</xsl:if>
|
583
|
-
</xsl:when>
|
584
|
-
<xsl:otherwise>
|
585
|
-
<xsl:text>, <<-END</xsl:text>
|
586
|
-
</xsl:otherwise>
|
587
|
-
</xsl:choose>
|
588
|
-
<xsl:for-each select="str:tokenize(text(), '
')">
|
589
|
-
<xsl:value-of select="concat('
',concat(str:padding($myspace+$myspacemultiplier+$myspacemultiplier),str:replace(str:replace(str:replace(string(.),'\','\\'),'"','\"'),'#','\#')))" />
|
590
|
-
</xsl:for-each>
|
591
|
-
<xsl:call-template name="print-newline"/>
|
592
|
-
<xsl:call-template name="print-space">
|
593
|
-
<xsl:with-param name="i">1</xsl:with-param>
|
594
|
-
<xsl:with-param name="count">
|
595
|
-
<xsl:value-of select="$myspace+$myspacemultiplier"/>
|
596
|
-
</xsl:with-param>
|
597
|
-
</xsl:call-template>
|
598
|
-
<xsl:choose>
|
599
|
-
<xsl:when test="@language='application/x-ruby'">
|
600
|
-
<xsl:text>end</xsl:text>
|
601
|
-
</xsl:when>
|
602
|
-
<xsl:otherwise>
|
603
|
-
<xsl:text>END</xsl:text>
|
604
|
-
</xsl:otherwise>
|
605
|
-
</xsl:choose>
|
606
|
-
</xsl:if>
|
607
|
-
</xsl:template>
|
608
|
-
<xsl:template name="print-space">
|
609
|
-
<xsl:param name="i"/>
|
610
|
-
<xsl:param name="count"/>
|
611
|
-
<xsl:if test="$i <= $count">
|
612
|
-
<xsl:text> </xsl:text>
|
613
|
-
<xsl:call-template name="print-space">
|
614
|
-
<xsl:with-param name="i">
|
615
|
-
<xsl:value-of select="$i + 1"/>
|
616
|
-
</xsl:with-param>
|
617
|
-
<xsl:with-param name="count">
|
618
|
-
<xsl:value-of select="$count"/>
|
619
|
-
</xsl:with-param>
|
620
|
-
</xsl:call-template>
|
621
|
-
</xsl:if>
|
622
|
-
</xsl:template>
|
623
|
-
<xsl:template name="print-newline">
|
624
|
-
<xsl:text>
|
625
|
-
</xsl:text>
|
626
|
-
</xsl:template>
|
627
|
-
|
628
|
-
<!-- JSON Element -->
|
629
|
-
<xsl:template match="*" mode="JSON">
|
630
|
-
<xsl:call-template name="JSONProperties"/>
|
631
|
-
<xsl:choose>
|
632
|
-
<xsl:when test="following-sibling::*">, </xsl:when>
|
633
|
-
<xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
|
634
|
-
</xsl:choose>
|
635
|
-
</xsl:template>
|
636
|
-
|
637
|
-
<xsl:template match="*" mode="JSONSUB">
|
638
|
-
<xsl:text>\"</xsl:text>
|
639
|
-
<xsl:value-of select="name()"/>
|
640
|
-
<xsl:text>\": </xsl:text>
|
641
|
-
<xsl:call-template name="JSONProperties">
|
642
|
-
<xsl:with-param name="parent" select="'Yes'"></xsl:with-param>
|
643
|
-
</xsl:call-template>
|
644
|
-
<xsl:choose>
|
645
|
-
<xsl:when test="following-sibling::*">, </xsl:when>
|
646
|
-
<xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
|
647
|
-
</xsl:choose>
|
648
|
-
</xsl:template>
|
649
|
-
|
650
|
-
<!-- JSON Array Element -->
|
651
|
-
<xsl:template match="*" mode="JSONArrayElement">
|
652
|
-
<xsl:call-template name="JSONProperties"/>
|
653
|
-
<xsl:choose>
|
654
|
-
<xsl:when test="following-sibling::*">, </xsl:when>
|
655
|
-
<xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
|
656
|
-
</xsl:choose>
|
657
|
-
</xsl:template>
|
658
|
-
<xsl:template match="*" mode="JSONArrayItem">
|
659
|
-
<xsl:call-template name="JSONProperties">
|
660
|
-
<xsl:with-param name="parent" select="'Yes'"></xsl:with-param>
|
661
|
-
</xsl:call-template>
|
662
|
-
<xsl:choose>
|
663
|
-
<xsl:when test="following-sibling::*">, </xsl:when>
|
664
|
-
<xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
|
665
|
-
</xsl:choose>
|
666
|
-
</xsl:template>
|
667
|
-
|
668
|
-
<!-- JSON Object Properties -->
|
669
|
-
<xsl:template name="JSONProperties">
|
670
|
-
<xsl:param name="parent"></xsl:param>
|
671
|
-
<xsl:variable name="childName" select="name(*[1])"/>
|
672
|
-
<xsl:choose>
|
673
|
-
<xsl:when test="not(*|@*)">
|
674
|
-
<xsl:choose>
|
675
|
-
<xsl:when test="$parent='Yes'">
|
676
|
-
<xsl:choose>
|
677
|
-
<xsl:when test="string(number(.)) = .">
|
678
|
-
<xsl:value-of select="."/>
|
679
|
-
</xsl:when>
|
680
|
-
<xsl:otherwise>
|
681
|
-
<xsl:choose>
|
682
|
-
<xsl:when test="substring(.,1,1) = '!'">
|
683
|
-
<xsl:text>#{</xsl:text>
|
684
|
-
<xsl:value-of select="str:replace(str:replace(substring(.,2),'\','\\'),'"','\\\"')"/>
|
685
|
-
<xsl:text>.to_json}</xsl:text>
|
686
|
-
</xsl:when>
|
687
|
-
<xsl:otherwise>
|
688
|
-
<xsl:text>\"</xsl:text>
|
689
|
-
<xsl:value-of select="str:replace(str:replace(.,'\','\\'),'"','\\\"')"/>
|
690
|
-
<xsl:text>\"</xsl:text>
|
691
|
-
</xsl:otherwise>
|
692
|
-
</xsl:choose>
|
693
|
-
</xsl:otherwise>
|
694
|
-
</xsl:choose>
|
695
|
-
</xsl:when>
|
696
|
-
<xsl:otherwise>
|
697
|
-
<xsl:text>\"</xsl:text>
|
698
|
-
<xsl:value-of select="name()"/>
|
699
|
-
<xsl:text>\": </xsl:text>
|
700
|
-
<xsl:choose>
|
701
|
-
<xsl:when test="string(number(.)) = .">
|
702
|
-
<xsl:value-of select="."/>
|
703
|
-
</xsl:when>
|
704
|
-
<xsl:otherwise>
|
705
|
-
<xsl:text>\"</xsl:text>
|
706
|
-
<xsl:choose>
|
707
|
-
<xsl:when test="substring(.,1,1) = '!'">
|
708
|
-
<xsl:text>#{</xsl:text>
|
709
|
-
<xsl:value-of select="str:replace(str:replace(substring(.,2),'\','\\'),'"','\\\"')"/>
|
710
|
-
<xsl:text>}</xsl:text>
|
711
|
-
</xsl:when>
|
712
|
-
<xsl:otherwise>
|
713
|
-
<xsl:value-of select="str:replace(str:replace(.,'\','\\'),'"','\\\"')"/>
|
714
|
-
</xsl:otherwise>
|
715
|
-
</xsl:choose>
|
716
|
-
<xsl:text>\"</xsl:text>
|
717
|
-
</xsl:otherwise>
|
718
|
-
</xsl:choose>
|
719
|
-
</xsl:otherwise>
|
720
|
-
</xsl:choose>
|
721
|
-
</xsl:when>
|
722
|
-
<xsl:when test="count(*[name()=$childName]) > 1">
|
723
|
-
<xsl:text>{ \"</xsl:text>
|
724
|
-
<xsl:value-of select="$childName"/>
|
725
|
-
<xsl:text>\": [ </xsl:text>
|
726
|
-
<xsl:apply-templates select="*" mode="JSONArrayElement"/>
|
727
|
-
<xsl:text>] }</xsl:text>
|
728
|
-
</xsl:when>
|
729
|
-
<xsl:otherwise>
|
730
|
-
<xsl:if test="text()[normalize-space(.)]">
|
731
|
-
<xsl:text>[ </xsl:text>
|
732
|
-
</xsl:if>
|
733
|
-
<xsl:text>{ </xsl:text>
|
734
|
-
<xsl:apply-templates select="@*" mode="JSONSUB"/>
|
735
|
-
<xsl:apply-templates select="*" mode="JSONSUB"/>
|
736
|
-
<xsl:text>}</xsl:text>
|
737
|
-
<xsl:if test="text()[normalize-space(.)]">
|
738
|
-
<xsl:text>, </xsl:text>
|
739
|
-
<xsl:text>\"</xsl:text>
|
740
|
-
<xsl:choose>
|
741
|
-
<xsl:when test="substring(.,1,1) = '!'">
|
742
|
-
<xsl:text>#{</xsl:text>
|
743
|
-
<xsl:value-of select="str:replace(str:replace(substring(.,2),'\','\\'),'"','\\\"')"/>
|
744
|
-
<xsl:text>}</xsl:text>
|
745
|
-
</xsl:when>
|
746
|
-
<xsl:otherwise>
|
747
|
-
<xsl:value-of select="str:replace(str:replace(.,'\','\\'),'"','\\\"')"/>
|
748
|
-
</xsl:otherwise>
|
749
|
-
</xsl:choose>
|
750
|
-
<xsl:text>\"</xsl:text>
|
751
|
-
<xsl:text>]</xsl:text>
|
752
|
-
</xsl:if>
|
753
|
-
</xsl:otherwise>
|
754
|
-
</xsl:choose>
|
755
|
-
</xsl:template>
|
756
|
-
|
757
|
-
<!-- JSON Attribute Property -->
|
758
|
-
<xsl:template match="@*" mode="JSONSUB">
|
759
|
-
<xsl:text>\"@</xsl:text>
|
760
|
-
<xsl:value-of select="name()"/>
|
761
|
-
<xsl:text>\": </xsl:text>
|
762
|
-
<xsl:choose>
|
763
|
-
<xsl:when test="number(.) = .">
|
764
|
-
<xsl:value-of select="."/>
|
765
|
-
</xsl:when>
|
766
|
-
<xsl:otherwise>
|
767
|
-
<xsl:text>\"</xsl:text>
|
768
|
-
<xsl:choose>
|
769
|
-
<xsl:when test="substring(.,1,1) = '!'">
|
770
|
-
<xsl:text>#{</xsl:text>
|
771
|
-
<xsl:value-of select="str:replace(str:replace(substring(.,2),'\','\\'),'"','\\\"')"/>
|
772
|
-
<xsl:text>}</xsl:text>
|
773
|
-
</xsl:when>
|
774
|
-
<xsl:otherwise>
|
775
|
-
<xsl:value-of select="str:replace(str:replace(.,'\','\\'),'"','\\\"')"/>
|
776
|
-
</xsl:otherwise>
|
777
|
-
</xsl:choose>
|
778
|
-
<xsl:text>\"</xsl:text>
|
779
|
-
</xsl:otherwise>
|
780
|
-
</xsl:choose>
|
781
|
-
<xsl:choose>
|
782
|
-
<xsl:when test="not(position() = last())">
|
783
|
-
<xsl:text>, </xsl:text>
|
784
|
-
</xsl:when>
|
785
|
-
<xsl:otherwise>
|
786
|
-
<xsl:text> </xsl:text>
|
787
|
-
</xsl:otherwise>
|
788
|
-
</xsl:choose>
|
789
|
-
</xsl:template>
|
790
|
-
</xsl:stylesheet>
|