aboutsummaryrefslogtreecommitdiff
path: root/src/function/transform.cc
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-06-17 21:28:04 +0200
committerAdrian Kummerlaender2014-06-17 21:28:04 +0200
commit0d670478b51c55e44f57995fe3ca8a4585723a6c (patch)
tree8014505de42d1743599d8076c503e9f3c6e22e8f /src/function/transform.cc
parent741a70f5fecc38033832728f4ecc62a6abe328b2 (diff)
downloadInputXSLT-0d670478b51c55e44f57995fe3ca8a4585723a6c.tar
InputXSLT-0d670478b51c55e44f57995fe3ca8a4585723a6c.tar.gz
InputXSLT-0d670478b51c55e44f57995fe3ca8a4585723a6c.tar.bz2
InputXSLT-0d670478b51c55e44f57995fe3ca8a4585723a6c.tar.lz
InputXSLT-0d670478b51c55e44f57995fe3ca8a4585723a6c.tar.xz
InputXSLT-0d670478b51c55e44f57995fe3ca8a4585723a6c.tar.zst
InputXSLT-0d670478b51c55e44f57995fe3ca8a4585723a6c.zip
Added context awareness to XObjectValue casting logic
* added support for defining boost::filesystem::path as a external function parameter ** boost::filesystem::path parameters are resolved against the appropriate FilesystemContext and IncludeEntityResolver instances * xalan::XSLTInputSource parameter source paths are also resolved * removed need for passing a reference FilesystemContext to "constructDocument" methods ** they now only accept the parameters of the external function implemented by them ** all path resolution logic is wrapped by the newly created XObjectValue class * converted XObjectValue namespace into class ** the "get" template method is now a template member method ** this was needed to enable value casting logic to access the appropriate FilesystemContext and IncludeEntityResolver instances * this commit marks the next step towards the goals defined in 741a70f
Diffstat (limited to 'src/function/transform.cc')
-rw-r--r--src/function/transform.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/function/transform.cc b/src/function/transform.cc
index 62b89ba..3ab6475 100644
--- a/src/function/transform.cc
+++ b/src/function/transform.cc
@@ -29,10 +29,9 @@ inline std::function<void(const ErrorCapacitor::error_cache&)> handleErrors(
namespace InputXSLT {
xercesc::DOMDocument* FunctionTransform::constructDocument(
- const InputXSLT::FilesystemContext& fsContext,
- xalan::XSLTInputSource transformationSource,
- std::string targetPath,
- xalan::XObjectPtr parameterObject
+ xalan::XSLTInputSource transformationSource,
+ boost::filesystem::path targetPath,
+ xalan::XObjectPtr parameterObject
) {
xercesc::DOMDocument* const domDocument(
xercesc::DOMImplementation::getImplementation()->createDocument(
@@ -50,7 +49,7 @@ xercesc::DOMDocument* FunctionTransform::constructDocument(
result.setAttribute(
"target",
- boost::filesystem::path(targetPath).filename().string()
+ targetPath.filename().string()
);
if ( auto transformation = TransformationFacade::try_create(
@@ -60,7 +59,7 @@ xercesc::DOMDocument* FunctionTransform::constructDocument(
) ) {
try {
transformation->generate(
- fsContext.resolve(targetPath).string(),
+ targetPath.string(),
parameterObject
);