aboutsummaryrefslogtreecommitdiff
path: root/src/function
diff options
context:
space:
mode:
Diffstat (limited to 'src/function')
-rw-r--r--src/function/read_file.cc3
-rw-r--r--src/function/transform.cc4
-rw-r--r--src/function/transform.h6
3 files changed, 8 insertions, 5 deletions
diff --git a/src/function/read_file.cc b/src/function/read_file.cc
index 7603ad1..1ea76c7 100644
--- a/src/function/read_file.cc
+++ b/src/function/read_file.cc
@@ -14,7 +14,8 @@
namespace {
inline bool isXmlFile(const boost::filesystem::path& filePath) {
- return filePath.extension() == ".xml";
+ return filePath.extension() == ".xml" ||
+ filePath.extension() == ".xsl";
}
inline xercesc::DOMNode* readXmlFile(
diff --git a/src/function/transform.cc b/src/function/transform.cc
index 9f0e98a..62b89ba 100644
--- a/src/function/transform.cc
+++ b/src/function/transform.cc
@@ -30,7 +30,7 @@ namespace InputXSLT {
xercesc::DOMDocument* FunctionTransform::constructDocument(
const InputXSLT::FilesystemContext& fsContext,
- std::string transformationPath,
+ xalan::XSLTInputSource transformationSource,
std::string targetPath,
xalan::XObjectPtr parameterObject
) {
@@ -55,7 +55,7 @@ xercesc::DOMDocument* FunctionTransform::constructDocument(
if ( auto transformation = TransformationFacade::try_create(
handleErrors(result),
- fsContext.resolve(transformationPath).string(),
+ transformationSource,
this->include_resolver_
) ) {
try {
diff --git a/src/function/transform.h b/src/function/transform.h
index b841750..081fe90 100644
--- a/src/function/transform.h
+++ b/src/function/transform.h
@@ -1,13 +1,15 @@
#ifndef INPUTXSLT_SRC_FUNCTION_TRANSFORM_H_
#define INPUTXSLT_SRC_FUNCTION_TRANSFORM_H_
+#include <xalanc/XSLT/XSLTInputSource.hpp>
+
#include "base.h"
namespace InputXSLT {
class FunctionTransform : public FunctionBase<
FunctionTransform,
- std::string,
+ xalan::XSLTInputSource,
std::string,
xalan::XObjectPtr
> {
@@ -19,7 +21,7 @@ class FunctionTransform : public FunctionBase<
xercesc::DOMDocument* constructDocument(
const FilesystemContext&,
- std::string,
+ xalan::XSLTInputSource,
std::string,
xalan::XObjectPtr
);