aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-10-29 16:11:34 +0100
committerAdrian Kummerlaender2014-10-29 16:11:34 +0100
commit71a637be86177e82a8fc0c654639c2fa83c13f5d (patch)
treea29f49ff9c37f83569f03833d58e2908ba9e06ad /src
parent1276ea17e58f886d34423eefae92e0b0aa477b9a (diff)
downloadInputXSLT-71a637be86177e82a8fc0c654639c2fa83c13f5d.tar
InputXSLT-71a637be86177e82a8fc0c654639c2fa83c13f5d.tar.gz
InputXSLT-71a637be86177e82a8fc0c654639c2fa83c13f5d.tar.bz2
InputXSLT-71a637be86177e82a8fc0c654639c2fa83c13f5d.tar.lz
InputXSLT-71a637be86177e82a8fc0c654639c2fa83c13f5d.tar.xz
InputXSLT-71a637be86177e82a8fc0c654639c2fa83c13f5d.tar.zst
InputXSLT-71a637be86177e82a8fc0c654639c2fa83c13f5d.zip
Activated namespace comprehension for all `XercesDOMParser` instances
* this is possibly a breaking change for all applications built on either `FunctionExternalCommand` or `FunctionReadFile` ** e.g. meta datasource XPath queries in _StaticXSLT_ will have to be changed to accomodate this * the reason for doing this was to fix the behaviour when reading namespaced XML files ** e.g. XSL stylesheets could only be queried with a clunky XPath expression such as `$transformation/self::*[name() = 'xsl:stylesheet']` instead of simply `$transformation/self::xsl:stylesheet` *** this was caused by the now activated namespace comprehension in `xercesc::XercesDOMParser` which is disabled by default *** it caused all local node names to be converted into their namespace prefixed version, e.g. `local-name()` returned `xsl:stylesheet` instead of `stylesheet`
Diffstat (limited to 'src')
-rw-r--r--src/function/base.h2
-rw-r--r--src/function/external_command.cc1
-rw-r--r--src/function/read_file.cc1
3 files changed, 2 insertions, 2 deletions
diff --git a/src/function/base.h b/src/function/base.h
index 5c2d317..e2239e7 100644
--- a/src/function/base.h
+++ b/src/function/base.h
@@ -56,7 +56,6 @@ class FunctionBase : public xalan::Function {
xalan::XalanDocument* const domDocument(
this->callConstructDocument(
parameters,
- locator,
typename IndexSequence<maximum_parameter_count>::type()
)
);
@@ -117,7 +116,6 @@ class FunctionBase : public xalan::Function {
template <std::size_t... Index>
inline xalan::XalanDocument* callConstructDocument(
const XObjectArgVectorType& parameters,
- const xalan::Locator*,
Sequence<Index...>
) const {
const FilesystemContext context;
diff --git a/src/function/external_command.cc b/src/function/external_command.cc
index 7fbc1d9..e60737d 100644
--- a/src/function/external_command.cc
+++ b/src/function/external_command.cc
@@ -52,6 +52,7 @@ inline boost::optional<xercesc::DOMNode*> importDocumentElement(
xercesc::DOMDocument* const domDocument
) {
xercesc::XercesDOMParser parser;
+ parser.setDoNamespaces(true);
parser.parse(xalan::XSLTInputSource(*outputStream));
if ( parser.getErrorCount() == 0 ) {
diff --git a/src/function/read_file.cc b/src/function/read_file.cc
index fe9eea5..bbc8315 100644
--- a/src/function/read_file.cc
+++ b/src/function/read_file.cc
@@ -25,6 +25,7 @@ boost::optional<xercesc::DOMNode*> readXmlFile(
);
xercesc::XercesDOMParser parser;
+ parser.setDoNamespaces(true);
parser.parse(file);
if ( parser.getErrorCount() == 0 ) {