aboutsummaryrefslogtreecommitdiff
path: root/src/support/include_entity_resolver.h
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-06-25 20:23:35 +0200
committerAdrian Kummerlaender2014-06-25 20:23:35 +0200
commit7b872121000d4db4026d0c90fcb95a10f1e43694 (patch)
treed1cea19c4556b3574978f51bdf2bed2d36fbb73f /src/support/include_entity_resolver.h
parent0d670478b51c55e44f57995fe3ca8a4585723a6c (diff)
downloadInputXSLT-7b872121000d4db4026d0c90fcb95a10f1e43694.tar
InputXSLT-7b872121000d4db4026d0c90fcb95a10f1e43694.tar.gz
InputXSLT-7b872121000d4db4026d0c90fcb95a10f1e43694.tar.bz2
InputXSLT-7b872121000d4db4026d0c90fcb95a10f1e43694.tar.lz
InputXSLT-7b872121000d4db4026d0c90fcb95a10f1e43694.tar.xz
InputXSLT-7b872121000d4db4026d0c90fcb95a10f1e43694.tar.zst
InputXSLT-7b872121000d4db4026d0c90fcb95a10f1e43694.zip
Added support for resolving non-existing paths
* previous logic for resolving boost::filesystem::path parameters in the XObjectValue class actively tried to resolve existing files ** this contradicts the planned introduction of e.g. a external "write-file" function * callers of external functions with path arguments now have to enclose them in square brackets if include path resolution is required ** analog to the usage of the "xsl:import" tag * moved "getPathFromSystemId" from compilation local method into static method of IncludeEntityResolver * changed test cases accordingly
Diffstat (limited to 'src/support/include_entity_resolver.h')
-rw-r--r--src/support/include_entity_resolver.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/support/include_entity_resolver.h b/src/support/include_entity_resolver.h
index 32d9001..ea5fb7a 100644
--- a/src/support/include_entity_resolver.h
+++ b/src/support/include_entity_resolver.h
@@ -15,6 +15,8 @@ namespace InputXSLT {
class IncludeEntityResolver : public xercesc::EntityResolver {
public:
+ static boost::filesystem::path getPathFromSystemId(const XMLCh* const);
+
IncludeEntityResolver(const std::vector<std::string>&);
xercesc::InputSource* resolveEntity(
@@ -22,14 +24,16 @@ class IncludeEntityResolver : public xercesc::EntityResolver {
const XMLCh* const
);
- boost::filesystem::path resolve(
- const XMLCh* const) const;
boost::optional<boost::filesystem::path> resolve(
- const boost::filesystem::path&) const;
+ const std::string&) const;
private:
const std::vector<FilesystemContext> path_;
+ boost::optional<boost::filesystem::path> tryIncludePaths(
+ const boost::filesystem::path&) const;
+
+
};
}