aboutsummaryrefslogtreecommitdiff
path: root/src/function
diff options
context:
space:
mode:
authorAdrian Kummerländer2014-05-04 20:26:29 +0200
committerAdrian Kummerländer2014-05-04 20:26:29 +0200
commita0ddbb0ccba20123fc4e8243d962f86232282612 (patch)
tree6b1c7994fb74f11e224b26f5d97c6031461b11ec /src/function
parent261170cc5b6661106877dc2611dab281f4d91348 (diff)
downloadInputXSLT-a0ddbb0ccba20123fc4e8243d962f86232282612.tar
InputXSLT-a0ddbb0ccba20123fc4e8243d962f86232282612.tar.gz
InputXSLT-a0ddbb0ccba20123fc4e8243d962f86232282612.tar.bz2
InputXSLT-a0ddbb0ccba20123fc4e8243d962f86232282612.tar.lz
InputXSLT-a0ddbb0ccba20123fc4e8243d962f86232282612.tar.xz
InputXSLT-a0ddbb0ccba20123fc4e8243d962f86232282612.tar.zst
InputXSLT-a0ddbb0ccba20123fc4e8243d962f86232282612.zip
Changed FilesystemContext constructor to accept xalan::Locator*
* all instantiations of a FilesystemContext are currently based on information provided by a xalan::Locator instance provided to the external function execute member method * this change hides the stylesheet path extraction from the actual function implementation
Diffstat (limited to 'src/function')
-rw-r--r--src/function/read_directory.cc10
-rw-r--r--src/function/read_file.cc10
-rw-r--r--src/function/read_xml_file.cc10
3 files changed, 3 insertions, 27 deletions
diff --git a/src/function/read_directory.cc b/src/function/read_directory.cc
index f8f99d6..09f8221 100644
--- a/src/function/read_directory.cc
+++ b/src/function/read_directory.cc
@@ -19,15 +19,7 @@ xalan::XObjectPtr FunctionReadDirectory::execute(
const xalan::XObjectPtr argument,
const xalan::Locator* locator
) const {
- const FilesystemContext fs_context(
- boost::filesystem::path(
- *XercesStringGuard<char>(
- xercesc::XMLString::transcode(
- locator->getSystemId() + 7
- )
- )
- ).parent_path().string()
- );
+ const FilesystemContext fs_context(locator);
const boost::filesystem::path directoryPath(
fs_context.resolve(argument->str())
diff --git a/src/function/read_file.cc b/src/function/read_file.cc
index 633559e..8fcc04b 100644
--- a/src/function/read_file.cc
+++ b/src/function/read_file.cc
@@ -34,15 +34,7 @@ xalan::XObjectPtr FunctionReadFile::execute(
const xalan::XObjectPtr argument,
const xalan::Locator* locator
) const {
- const FilesystemContext fs_context(
- boost::filesystem::path(
- *XercesStringGuard<char>(
- xercesc::XMLString::transcode(
- locator->getSystemId() + 7
- )
- )
- ).parent_path().string()
- );
+ const FilesystemContext fs_context(locator);
const boost::filesystem::path filePath(
fs_context.resolve(argument->str())
diff --git a/src/function/read_xml_file.cc b/src/function/read_xml_file.cc
index dc98fc7..0fa21fe 100644
--- a/src/function/read_xml_file.cc
+++ b/src/function/read_xml_file.cc
@@ -40,15 +40,7 @@ xalan::XObjectPtr FunctionReadXmlFile::execute(
const xalan::XObjectPtr argument,
const xalan::Locator* locator
) const {
- const FilesystemContext fs_context(
- boost::filesystem::path(
- *XercesStringGuard<char>(
- xercesc::XMLString::transcode(
- locator->getSystemId() + 7
- )
- )
- ).parent_path().string()
- );
+ const FilesystemContext fs_context(locator);
const boost::filesystem::path filePath(
fs_context.resolve(argument->str())