SANTUARIO-560 - xml-security-c 2.0.2 fails to build with xalan 1.12

https://issues.apache.org/jira/browse/SANTUARIO-560


git-svn-id: https://svn.apache.org/repos/asf/santuario/xml-security-cpp/trunk@1894293 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/xsec/canon/XSECC14n20010315.cpp b/xsec/canon/XSECC14n20010315.cpp
index 53913f9..259ea85 100644
--- a/xsec/canon/XSECC14n20010315.cpp
+++ b/xsec/canon/XSECC14n20010315.cpp
@@ -55,6 +55,11 @@
 #include <xalanc/XPath/XPathEvaluator.hpp>
 #include <xalanc/XPath/NodeRefList.hpp>
 
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
+
 // Namespace definitions
 XALAN_USING_XALAN(XPathEvaluator)
 XALAN_USING_XALAN(XercesDOMSupport)
diff --git a/xsec/dsig/DSIGXPathHere.hpp b/xsec/dsig/DSIGXPathHere.hpp
index 64d15b5..d19d4b6 100644
--- a/xsec/dsig/DSIGXPathHere.hpp
+++ b/xsec/dsig/DSIGXPathHere.hpp
@@ -54,6 +54,11 @@
 #	pragma warning(default: 4267)
 #endif
 
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
+
 // Namespace usage
 
 XALAN_USING_XALAN(Function);
diff --git a/xsec/samples/simpleDecrypt.cpp b/xsec/samples/simpleDecrypt.cpp
index 9b8f085..bd5faf3 100644
--- a/xsec/samples/simpleDecrypt.cpp
+++ b/xsec/samples/simpleDecrypt.cpp
@@ -54,6 +54,12 @@
 
 #ifdef XSEC_HAVE_XALAN
 #include <xalanc/XalanTransformer/XalanTransformer.hpp>
+
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
+
 XALAN_USING_XALAN(XalanTransformer)
 #endif
 
diff --git a/xsec/samples/simpleEncrypt.cpp b/xsec/samples/simpleEncrypt.cpp
index a94112f..3fdcd96 100644
--- a/xsec/samples/simpleEncrypt.cpp
+++ b/xsec/samples/simpleEncrypt.cpp
@@ -48,6 +48,10 @@
 
 #ifdef XSEC_HAVE_XALAN
 #include <xalanc/XalanTransformer/XalanTransformer.hpp>
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
 XALAN_USING_XALAN(XalanTransformer)
 #endif
 
diff --git a/xsec/samples/simpleHMAC.cpp b/xsec/samples/simpleHMAC.cpp
index 7a551fd..745d00e 100644
--- a/xsec/samples/simpleHMAC.cpp
+++ b/xsec/samples/simpleHMAC.cpp
@@ -49,6 +49,10 @@
 
 #ifdef XSEC_HAVE_XALAN
 #include <xalanc/XalanTransformer/XalanTransformer.hpp>
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
 XALAN_USING_XALAN(XalanTransformer)
 #endif
 
diff --git a/xsec/samples/simpleValidate.cpp b/xsec/samples/simpleValidate.cpp
index c5a002d..8d8b51c 100644
--- a/xsec/samples/simpleValidate.cpp
+++ b/xsec/samples/simpleValidate.cpp
@@ -52,6 +52,10 @@
 
 #ifdef XSEC_HAVE_XALAN
 #include <xalanc/XalanTransformer/XalanTransformer.hpp>
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
 XALAN_USING_XALAN(XalanTransformer)
 #endif
 
diff --git a/xsec/tools/checksig/checksig.cpp b/xsec/tools/checksig/checksig.cpp
index f62ed38..e068f68 100644
--- a/xsec/tools/checksig/checksig.cpp
+++ b/xsec/tools/checksig/checksig.cpp
@@ -83,6 +83,11 @@
 #include <xalanc/XPath/XPathEvaluator.hpp>
 #include <xalanc/XalanTransformer/XalanTransformer.hpp>
 
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
+
 XALAN_USING_XALAN(XPathEvaluator)
 XALAN_USING_XALAN(XalanTransformer)
 
diff --git a/xsec/tools/cipher/cipher.cpp b/xsec/tools/cipher/cipher.cpp
index ba2e2a9..07b51b0 100644
--- a/xsec/tools/cipher/cipher.cpp
+++ b/xsec/tools/cipher/cipher.cpp
@@ -93,6 +93,11 @@
 #include <xalanc/XPath/XPathEvaluator.hpp>
 #include <xalanc/XalanTransformer/XalanTransformer.hpp>
 
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
+
 XALAN_USING_XALAN(XPathEvaluator)
 XALAN_USING_XALAN(XalanTransformer)
 
diff --git a/xsec/tools/siginf/siginf.cpp b/xsec/tools/siginf/siginf.cpp
index 19f890e..03b990d 100644
--- a/xsec/tools/siginf/siginf.cpp
+++ b/xsec/tools/siginf/siginf.cpp
@@ -86,6 +86,11 @@
 #include <xalanc/XPath/XPathEvaluator.hpp>
 #include <xalanc/XalanTransformer/XalanTransformer.hpp>
 
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
+
 XALAN_USING_XALAN(XPathEvaluator)
 XALAN_USING_XALAN(XalanTransformer)
 
diff --git a/xsec/tools/templatesign/templatesign.cpp b/xsec/tools/templatesign/templatesign.cpp
index 74b9b7f..4c47989 100644
--- a/xsec/tools/templatesign/templatesign.cpp
+++ b/xsec/tools/templatesign/templatesign.cpp
@@ -95,6 +95,11 @@
 #include <xalanc/XPath/XPathEvaluator.hpp>
 #include <xalanc/XalanTransformer/XalanTransformer.hpp>
 
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
+
 XALAN_USING_XALAN(XPathEvaluator)
 XALAN_USING_XALAN(XalanTransformer)
 
diff --git a/xsec/tools/txfmout/txfmout.cpp b/xsec/tools/txfmout/txfmout.cpp
index 453a671..f10b4d3 100644
--- a/xsec/tools/txfmout/txfmout.cpp
+++ b/xsec/tools/txfmout/txfmout.cpp
@@ -84,6 +84,11 @@
 #include <xalanc/XPath/XPathEvaluator.hpp>
 #include <xalanc/XalanTransformer/XalanTransformer.hpp>
 
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
+
 XALAN_USING_XALAN(XPathEvaluator)
 XALAN_USING_XALAN(XalanTransformer)
 
diff --git a/xsec/tools/xklient/xklient.cpp b/xsec/tools/xklient/xklient.cpp
index fbc7a1d..bc7f67e 100644
--- a/xsec/tools/xklient/xklient.cpp
+++ b/xsec/tools/xklient/xklient.cpp
@@ -122,6 +122,11 @@
 #include <xalanc/XPath/XPathEvaluator.hpp>
 #include <xalanc/XalanTransformer/XalanTransformer.hpp>
 
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
+
 XALAN_USING_XALAN(XPathEvaluator)
 XALAN_USING_XALAN(XalanTransformer)
 
diff --git a/xsec/tools/xtest/xtest.cpp b/xsec/tools/xtest/xtest.cpp
index 0508cf8..c5aed73 100644
--- a/xsec/tools/xtest/xtest.cpp
+++ b/xsec/tools/xtest/xtest.cpp
@@ -63,6 +63,11 @@
 #include <xalanc/XPath/XPathEvaluator.hpp>
 #include <xalanc/XalanTransformer/XalanTransformer.hpp>
 
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
+
 XALAN_USING_XALAN(XPathEvaluator)
 XALAN_USING_XALAN(XalanTransformer)
 
diff --git a/xsec/transformers/TXFMXPath.cpp b/xsec/transformers/TXFMXPath.cpp
index 9df19af..36c09f2 100644
--- a/xsec/transformers/TXFMXPath.cpp
+++ b/xsec/transformers/TXFMXPath.cpp
@@ -47,6 +47,11 @@
 #	pragma warning(default: 4267)
 #endif
 
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
+
 // Xalan namespace usage
 XALAN_USING_XALAN(XPathProcessorImpl)
 XALAN_USING_XALAN(XercesDOMSupport)
diff --git a/xsec/transformers/TXFMXPathFilter.cpp b/xsec/transformers/TXFMXPathFilter.cpp
index 49111d3..464f4ac 100644
--- a/xsec/transformers/TXFMXPathFilter.cpp
+++ b/xsec/transformers/TXFMXPathFilter.cpp
@@ -66,6 +66,11 @@
 #    pragma warning(default: 4267)
 #endif
 
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
+
 // Xalan namespace usage
 XALAN_USING_XALAN(XPathProcessorImpl)
 XALAN_USING_XALAN(XalanDOMString)
diff --git a/xsec/transformers/TXFMXSL.hpp b/xsec/transformers/TXFMXSL.hpp
index bbb9d20..afead98 100644
--- a/xsec/transformers/TXFMXSL.hpp
+++ b/xsec/transformers/TXFMXSL.hpp
@@ -43,6 +43,11 @@
 #include <xalanc/XPath/ElementPrefixResolverProxy.hpp>
 #include <xalanc/XalanTransformer/XalanTransformer.hpp>
 
+// If this isn't defined, we're on Xalan 1.12+ and require modern C++
+#ifndef XALAN_USING_XALAN
+# define XALAN_USING_XALAN(NAME) using xalanc :: NAME;
+#endif
+
 // Xalan Namespace usage
 XALAN_USING_XALAN(XercesDOMSupport)
 XALAN_USING_XALAN(XercesParserLiaison)