diff options
author | Adrian Kummerländer | 2014-05-28 21:51:39 +0200 |
---|---|---|
committer | Adrian Kummerländer | 2014-05-28 21:51:39 +0200 |
commit | 5859cb6af4a5136a96971c47e41e6195007ef944 (patch) | |
tree | 77431a85377b3b3742bcdb6c30526d957f9f61c1 /src/function | |
parent | 802d416040aa31d72defa7a9227cd31b0885bc60 (diff) | |
download | InputXSLT-5859cb6af4a5136a96971c47e41e6195007ef944.tar InputXSLT-5859cb6af4a5136a96971c47e41e6195007ef944.tar.gz InputXSLT-5859cb6af4a5136a96971c47e41e6195007ef944.tar.bz2 InputXSLT-5859cb6af4a5136a96971c47e41e6195007ef944.tar.lz InputXSLT-5859cb6af4a5136a96971c47e41e6195007ef944.tar.xz InputXSLT-5859cb6af4a5136a96971c47e41e6195007ef944.tar.zst InputXSLT-5859cb6af4a5136a96971c47e41e6195007ef944.zip |
Implemented basic ErrorHandler
* InputXSLT::ErrorHandler is derived from xercesc::ErrorHandler and enables contextual printing of transformation errors
** currently this means that the error messages passed to std::cerr contain the full path of the offending transformation
* added input trimming to the external transform function
** calls to this function from inside a transformation may contain unnecessary whitespace characters which disrupt further processing
Diffstat (limited to 'src/function')
-rw-r--r-- | src/function/transform.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/function/transform.cc b/src/function/transform.cc index fd28b34..06e4c19 100644 --- a/src/function/transform.cc +++ b/src/function/transform.cc @@ -4,6 +4,8 @@ #include <xercesc/dom/DOMImplementation.hpp> #include <xercesc/dom/DOMElement.hpp> +#include <boost/algorithm/string.hpp> + #include "transformation_facade.h" #include "support/xerces_string_guard.h" #include "support/dom/result_node_facade.h" @@ -14,13 +16,13 @@ xercesc::DOMDocument* FunctionTransform::constructDocument( const InputXSLT::FilesystemContext& fsContext, const FunctionBase::parameter_tuple& parameters ) { - const std::string transformationPath( + const std::string transformationPath(boost::trim_copy( fsContext.resolve(std::get<0>(parameters)).string() - ); + )); - const std::string targetPath( + const std::string targetPath(boost::trim_copy( fsContext.resolve(std::get<1>(parameters)).string() - ); + )); const xalan::XObjectPtr& parameterObject( std::get<2>(parameters) |