summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-25 20:36:03 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-04-25 20:36:03 (GMT)
commit00f5d8af3c8e42ba8a0d0c206d2c2e8f1867a61e (patch)
treeafa4183b1bb4ee777cad27475c3d7679822c8046 /src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp
parent4d6fb580b1c1378cb1441fff4adeca889cbba58e (diff)
downloaduscxml-00f5d8af3c8e42ba8a0d0c206d2c2e8f1867a61e.zip
uscxml-00f5d8af3c8e42ba8a0d0c206d2c2e8f1867a61e.tar.gz
uscxml-00f5d8af3c8e42ba8a0d0c206d2c2e8f1867a61e.tar.bz2
Refactored CMakeLists and updated W3C tests
Diffstat (limited to 'src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp')
-rw-r--r--src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp b/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp
index 6377af2..1af56b5 100644
--- a/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp
+++ b/src/uscxml/plugins/datamodel/xpath/XPathDataModel.cpp
@@ -380,19 +380,23 @@ void XPathDataModel::assign(const Element<std::string>& assignElem,
// test 326ff
XPathValue<std::string> key = _xpath.evaluate_expr(location, _doc);
+#if 0
if (key.type() == NODE_SET) {
- for (int i = 0; i < key.asNodeSet().size(); i++) {
- Node<std::string> node = key.asNodeSet()[i];
- if (node == _varResolver.resolveVariable("", "_ioprocessors").asNodeSet()[0])
- throw Event("error.execution", Event::PLATFORM);
- if (node == _varResolver.resolveVariable("", "_sessionid").asNodeSet()[0])
- throw Event("error.execution", Event::PLATFORM);
- if (node == _varResolver.resolveVariable("", "_name").asNodeSet()[0])
- throw Event("error.execution", Event::PLATFORM);
- if (node == _varResolver.resolveVariable("", "_event").asNodeSet()[0])
- throw Event("error.execution", Event::PLATFORM);
- }
+ try {
+ for (int i = 0; i < key.asNodeSet().size(); i++) {
+ Node<std::string> node = key.asNodeSet()[i];
+ if (node == _varResolver.resolveVariable("", "_ioprocessors").asNodeSet()[0])
+ throw Event("error.execution", Event::PLATFORM);
+ if (node == _varResolver.resolveVariable("", "_sessionid").asNodeSet()[0])
+ throw Event("error.execution", Event::PLATFORM);
+ if (node == _varResolver.resolveVariable("", "_name").asNodeSet()[0])
+ throw Event("error.execution", Event::PLATFORM);
+ if (node == _varResolver.resolveVariable("", "_event").asNodeSet()[0])
+ throw Event("error.execution", Event::PLATFORM);
+ }
+ } catch (Event e) {}
}
+#endif
NodeSet<std::string> nodeSet;
if (doc) {
if (doc.getDocumentElement()) {
@@ -495,7 +499,7 @@ void XPathDataModel::init(const Element<std::string>& dataElem,
// put data element into nodeset and bind to xpath variable
NodeSet<std::string> nodeSet;
-#if 1
+#if 0
nodeSet.push_back(container);
#else
Node<std::string> node = container.getFirstChild();