summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-03-31 00:41:48 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-03-31 00:41:48 (GMT)
commitf64620e28a55dbddaeeefef2e7b8a6a433f21c82 (patch)
tree1c0ffed51ba906a881bdd8aeb44ee973bc43a223 /src/uscxml/plugins
parent5cdc1f8ec070fc3b8d03bde36a1854e7291790a2 (diff)
downloaduscxml-f64620e28a55dbddaeeefef2e7b8a6a433f21c82.zip
uscxml-f64620e28a55dbddaeeefef2e7b8a6a433f21c82.tar.gz
uscxml-f64620e28a55dbddaeeefef2e7b8a6a433f21c82.tar.bz2
Implemented fromDOM and various bug fisex for official tests
Diffstat (limited to 'src/uscxml/plugins')
-rw-r--r--src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
index 447c52f..c0e87d7 100644
--- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
+++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp
@@ -43,13 +43,29 @@ void USCXMLInvoker::cancel(const std::string sendId) {
}
void USCXMLInvoker::invoke(const InvokeRequest& req) {
- _invokedInterpreter = Interpreter::fromURI(req.src);
+ if (req.src.length() > 0) {
+ _invokedInterpreter = Interpreter::fromURI(req.src);
+ } else if (req.dom) {
+ _invokedInterpreter = Interpreter::fromDOM(req.dom);
+ } else {
+ LOG(ERROR) << "Cannot invoke nested SCXML interpreter, neither src attribute nor DOM is given";
+ }
DataModel dataModel(_invokedInterpreter->getDataModel());
if (dataModel) {
}
if (_invokedInterpreter) {
_invokedInterpreter->setParentQueue(this);
+ // transfer namespace prefixes
+ _invokedInterpreter->_nsURL = _parentInterpreter->_nsURL;
+ _invokedInterpreter->_xpathPrefix = _parentInterpreter->_xpathPrefix;
+ _invokedInterpreter->_nsToPrefix = _parentInterpreter->_nsToPrefix;
+ std::map<std::string, std::string>::iterator nsIter = _parentInterpreter->_nsToPrefix.begin();
+ while(nsIter != _parentInterpreter->_nsToPrefix.end()) {
+ _invokedInterpreter->_nsContext.addNamespaceDeclaration(nsIter->first, nsIter->second);
+ nsIter++;
+ }
+ _invokedInterpreter->_xmlNSPrefix = _parentInterpreter->_xmlNSPrefix;
_invokedInterpreter->start();
}
}