diff options
Diffstat (limited to 'src/function')
-rw-r--r-- | src/function/transform.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/function/transform.cc b/src/function/transform.cc index fd28b34..7e8a844 100644 --- a/src/function/transform.cc +++ b/src/function/transform.cc @@ -38,17 +38,22 @@ xercesc::DOMDocument* FunctionTransform::constructDocument( domDocument->getDocumentElement() ); + ResultNodeFacade result(domDocument, rootNode, "result"); + result.setAttribute("name", targetPath); + InputXSLT::TransformationFacade transformation( transformationPath, this->include_resolver_ ); - if ( transformation.generate(targetPath, parameterObject) == 0 ) { - ResultNodeFacade result(domDocument, rootNode, "result"); + InputXSLT::TransformationFacade::return_type errors( + transformation.generate(targetPath, parameterObject) + ); - result.setAttribute("name", targetPath); - } else { - ResultNodeFacade result(domDocument, rootNode, "error"); + if ( errors ) { + for ( auto&& error : *errors ) { + result.setValueNode("error", error); + } } return domDocument; |