aboutsummaryrefslogtreecommitdiff
path: root/src/function/base.h
diff options
context:
space:
mode:
authorAdrian Kummerländer2014-05-22 19:58:15 +0200
committerAdrian Kummerländer2014-05-22 19:58:15 +0200
commit4d0569669e01434b3bb9f689cd176f590344bea8 (patch)
tree131ea5f48f34bafd01ffa133971739f68e551556 /src/function/base.h
parentbbe16940e7a6f97128e99ad7642b964e48ecde2e (diff)
downloadInputXSLT-4d0569669e01434b3bb9f689cd176f590344bea8.tar
InputXSLT-4d0569669e01434b3bb9f689cd176f590344bea8.tar.gz
InputXSLT-4d0569669e01434b3bb9f689cd176f590344bea8.tar.bz2
InputXSLT-4d0569669e01434b3bb9f689cd176f590344bea8.tar.lz
InputXSLT-4d0569669e01434b3bb9f689cd176f590344bea8.tar.xz
InputXSLT-4d0569669e01434b3bb9f689cd176f590344bea8.tar.zst
InputXSLT-4d0569669e01434b3bb9f689cd176f590344bea8.zip
Added include path resolution to external file access functions
* if a given file can not be located relative to the transformation's location both "read-file" and "read-xml-file" will now try to resolve the path using the IncludeEntityResolver * all external functions based on the FunctionBase template are now provided with a pointer to a IncludeEntityResolver instance * it is determined by the external function implementation whether include path resolution will be used
Diffstat (limited to 'src/function/base.h')
-rw-r--r--src/function/base.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/function/base.h b/src/function/base.h
index cc207c3..3609201 100644
--- a/src/function/base.h
+++ b/src/function/base.h
@@ -10,9 +10,10 @@
#include "common.h"
#include "support/xalan_string.h"
+#include "support/filesystem_context.h"
+#include "support/include_entity_resolver.h"
#include "support/tuple/mapper.h"
#include "support/dom/document_cache.h"
-#include "support/filesystem_context.h"
namespace InputXSLT {
@@ -24,7 +25,8 @@ class FunctionBase : public xalan::Function {
public:
typedef std::tuple<Types...> parameter_tuple;
- FunctionBase():
+ FunctionBase(IncludeEntityResolver* resolver):
+ include_resolver_(resolver),
document_cache_(std::make_shared<DomDocumentCache>()) { }
virtual xalan::XObjectPtr execute(
@@ -73,6 +75,9 @@ class FunctionBase : public xalan::Function {
FunctionBase& operator=(const FunctionBase&) = delete;
bool operator==(const FunctionBase&) const = delete;
+ protected:
+ IncludeEntityResolver* const include_resolver_;
+
private:
std::shared_ptr<DomDocumentCache> document_cache_;