aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-07-08 15:05:25 +0200
committerAdrian Kummerlaender2014-07-08 15:05:25 +0200
commitfcc2f8ee41d6793411a2321e6b0ac46cb5ba23ee (patch)
tree6ecce84e31c734293ad827278206981ef2c355a8 /src
parent716958c6acb77f4f63cc6f99d741fe0a901a25ba (diff)
downloadInputXSLT-fcc2f8ee41d6793411a2321e6b0ac46cb5ba23ee.tar
InputXSLT-fcc2f8ee41d6793411a2321e6b0ac46cb5ba23ee.tar.gz
InputXSLT-fcc2f8ee41d6793411a2321e6b0ac46cb5ba23ee.tar.bz2
InputXSLT-fcc2f8ee41d6793411a2321e6b0ac46cb5ba23ee.tar.lz
InputXSLT-fcc2f8ee41d6793411a2321e6b0ac46cb5ba23ee.tar.xz
InputXSLT-fcc2f8ee41d6793411a2321e6b0ac46cb5ba23ee.tar.zst
InputXSLT-fcc2f8ee41d6793411a2321e6b0ac46cb5ba23ee.zip
Fixed entity resolution bug concerning non-include paths
* paths that can not be resolved against the include-path vector were passed on as they were instead of first removing the "file://" prefix * this caused all normal entity paths passed to "xsl:import" and "xsl:include" statements to be unresolvable
Diffstat (limited to 'src')
-rw-r--r--src/support/include_entity_resolver.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/support/include_entity_resolver.cc b/src/support/include_entity_resolver.cc
index 07577c1..818d307 100644
--- a/src/support/include_entity_resolver.cc
+++ b/src/support/include_entity_resolver.cc
@@ -30,6 +30,10 @@ boost::optional<boost::filesystem::path> extractFilePath(
}
}
+inline const XMLCh* shiftSystemIdPastPrefix(const XMLCh* const systemId) {
+ return systemId + 7;
+}
+
}
namespace InputXSLT {
@@ -37,7 +41,9 @@ namespace InputXSLT {
boost::filesystem::path IncludeEntityResolver::getPathFromSystemId(
const XMLCh* const systemId) {
return boost::filesystem::path(
- *XercesStringGuard<char>(systemId) + 7
+ *XercesStringGuard<char>(
+ shiftSystemIdPastPrefix(systemId)
+ )
);
}
@@ -60,7 +66,7 @@ xercesc::InputSource* IncludeEntityResolver::resolveEntity(
);
} else {
return new xercesc::LocalFileInputSource(
- *XercesStringGuard<XMLCh>(systemIdString)
+ shiftSystemIdPastPrefix(systemId)
);
}
} else {