aboutsummaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
Diffstat (limited to 'src/support')
-rw-r--r--src/support/dom/document_cache.cc8
-rw-r--r--src/support/dom/document_cache.h1
-rw-r--r--src/support/include_entity_resolver.cc2
3 files changed, 9 insertions, 2 deletions
diff --git a/src/support/dom/document_cache.cc b/src/support/dom/document_cache.cc
index 23805b5..c18bf96 100644
--- a/src/support/dom/document_cache.cc
+++ b/src/support/dom/document_cache.cc
@@ -11,9 +11,15 @@ namespace InputXSLT {
auto DomDocumentCache::createDocument() -> document_ptr {
return document_ptr(
+ xercesc::DOMImplementation::getImplementation()->createDocument()
+ );
+}
+
+auto DomDocumentCache::createDocument(const std::string& name) -> document_ptr {
+ return document_ptr(
xercesc::DOMImplementation::getImplementation()->createDocument(
nullptr,
- *XercesStringGuard<XMLCh>("content"),
+ *XercesStringGuard<XMLCh>(name),
nullptr
)
);
diff --git a/src/support/dom/document_cache.h b/src/support/dom/document_cache.h
index 3aeb332..f472249 100644
--- a/src/support/dom/document_cache.h
+++ b/src/support/dom/document_cache.h
@@ -27,6 +27,7 @@ class DomDocumentCache {
> document_ptr;
static document_ptr createDocument();
+ static document_ptr createDocument(const std::string&);
DomDocumentCache();
diff --git a/src/support/include_entity_resolver.cc b/src/support/include_entity_resolver.cc
index 818d307..b9e20f9 100644
--- a/src/support/include_entity_resolver.cc
+++ b/src/support/include_entity_resolver.cc
@@ -21,7 +21,7 @@ boost::optional<boost::filesystem::path> extractFilePath(
boost::filesystem::path(
rawPath.substr(
leadingDelimiter + 1,
- closingDelimiter - leadingDelimiter - 1
+ closingDelimiter - 1 - leadingDelimiter
)
)
);