aboutsummaryrefslogtreecommitdiff
path: root/src/function/read_xml_file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/function/read_xml_file.cc')
-rw-r--r--src/function/read_xml_file.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/function/read_xml_file.cc b/src/function/read_xml_file.cc
index 5f1d47d..b9246e6 100644
--- a/src/function/read_xml_file.cc
+++ b/src/function/read_xml_file.cc
@@ -38,10 +38,21 @@ xercesc::DOMDocument* FunctionReadXmlFile::constructDocument(
const FilesystemContext& fsContext,
const FunctionBase::parameter_tuple& parameters
) {
- const boost::filesystem::path filePath(
+ boost::filesystem::path filePath(
fsContext.resolve(std::get<0>(parameters))
);
+ if ( !(boost::filesystem::exists(filePath) &&
+ boost::filesystem::is_regular_file(filePath)) ) {
+ auto resolvedPath = this->include_resolver_->resolve(
+ std::get<0>(parameters)
+ );
+
+ if ( resolvedPath.first ) {
+ filePath = resolvedPath.second;
+ }
+ }
+
xercesc::DOMDocument* const domDocument(
xercesc::DOMImplementation::getImplementation()->createDocument(
nullptr,