diff options
author | Adrian Kummerlaender | 2014-07-08 15:05:25 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2014-07-08 15:05:25 +0200 |
commit | fcc2f8ee41d6793411a2321e6b0ac46cb5ba23ee (patch) | |
tree | 6ecce84e31c734293ad827278206981ef2c355a8 /src/support | |
parent | 716958c6acb77f4f63cc6f99d741fe0a901a25ba (diff) | |
download | InputXSLT-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/support')
-rw-r--r-- | src/support/include_entity_resolver.cc | 10 |
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 { |