aboutsummaryrefslogtreecommitdiff
path: root/src/function
diff options
context:
space:
mode:
Diffstat (limited to 'src/function')
-rw-r--r--src/function/read_directory.cc2
-rw-r--r--src/function/transform.cc19
2 files changed, 10 insertions, 11 deletions
diff --git a/src/function/read_directory.cc b/src/function/read_directory.cc
index 884963e..d5357e8 100644
--- a/src/function/read_directory.cc
+++ b/src/function/read_directory.cc
@@ -29,7 +29,7 @@ xercesc::DOMDocument* FunctionReadDirectory::constructDocument(
if ( boost::filesystem::is_directory(directoryPath) ) {
result.setAttribute("result", "success");
- xercesc::DOMNode* const resultNode = result.getNode();
+ xercesc::DOMNode* const resultNode = result.getResultElement();
FilesystemContext::iterate(
directoryPath,
diff --git a/src/function/transform.cc b/src/function/transform.cc
index bc71125..1d22399 100644
--- a/src/function/transform.cc
+++ b/src/function/transform.cc
@@ -1,11 +1,11 @@
#include "transform.h"
+#include <xalanc/XercesParserLiaison/FormatterToXercesDOM.hpp>
+
#include <xercesc/dom/DOMDocument.hpp>
#include <xercesc/dom/DOMImplementation.hpp>
#include <xercesc/dom/DOMElement.hpp>
-#include <sstream>
-
#include "transformation_facade.h"
#include "support/xerces_string_guard.h"
#include "support/dom/result_node_facade.h"
@@ -43,11 +43,11 @@ xercesc::DOMDocument* FunctionTransform::constructDocument(
)
);
- xercesc::DOMNode* const rootNode(
+ xercesc::DOMElement* const rootElement(
domDocument->getDocumentElement()
);
- ResultNodeFacade result(domDocument, rootNode, "transformation");
+ ResultNodeFacade result(domDocument, rootElement, "transformation");
if ( auto transformation = TransformationFacade::try_create(
handleErrors(result),
@@ -56,17 +56,16 @@ xercesc::DOMDocument* FunctionTransform::constructDocument(
this->include_resolver_
) ) {
try {
- std::stringstream targetStream;
+ xalan::FormatterToXercesDOM formatter(
+ domDocument,
+ result.getResultElement()
+ );
transformation->generate(
- targetStream,
+ formatter,
parameterObject
);
- result.setContent(
- targetStream.str()
- );
-
result.setAttribute("result", "success");
}
catch (const ErrorCapacitor::exception& exception) {