aboutsummaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-07-13 21:47:16 +0200
committerAdrian Kummerlaender2014-07-13 21:47:16 +0200
commitf69c1e4e774ee6db9c9551ec7a6a32c840686f18 (patch)
treef01cd45d924ee9c45ee210ae0f163945dae45cc9 /src/support
parenta3fe119214fa61b571326348f3ed23ec7ffd77e6 (diff)
downloadInputXSLT-f69c1e4e774ee6db9c9551ec7a6a32c840686f18.tar
InputXSLT-f69c1e4e774ee6db9c9551ec7a6a32c840686f18.tar.gz
InputXSLT-f69c1e4e774ee6db9c9551ec7a6a32c840686f18.tar.bz2
InputXSLT-f69c1e4e774ee6db9c9551ec7a6a32c840686f18.tar.lz
InputXSLT-f69c1e4e774ee6db9c9551ec7a6a32c840686f18.tar.xz
InputXSLT-f69c1e4e774ee6db9c9551ec7a6a32c840686f18.tar.zst
InputXSLT-f69c1e4e774ee6db9c9551ec7a6a32c840686f18.zip
Fixed base path resolution of include path entities
* the base path of entities resolved through square bracket include paths was not resolved correctly due to missing extraction
Diffstat (limited to 'src/support')
-rw-r--r--src/support/include_entity_resolver.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/support/include_entity_resolver.cc b/src/support/include_entity_resolver.cc
index b9e20f9..deac1d5 100644
--- a/src/support/include_entity_resolver.cc
+++ b/src/support/include_entity_resolver.cc
@@ -40,11 +40,17 @@ namespace InputXSLT {
boost::filesystem::path IncludeEntityResolver::getPathFromSystemId(
const XMLCh* const systemId) {
- return boost::filesystem::path(
+ const std::string rawPath(
*XercesStringGuard<char>(
shiftSystemIdPastPrefix(systemId)
)
);
+
+ if ( auto extractedPath = extractFilePath(rawPath) ) {
+ return *extractedPath;
+ } else {
+ return boost::filesystem::path(rawPath);
+ }
}
IncludeEntityResolver::IncludeEntityResolver(