aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-09-19 10:19:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-09-19 10:19:48 +0200
commita066f175060a6ada5c60c378ca4dab6e9b571e35 (patch)
treeee2d1d119306d9d9cba390e6e93543f11993af9f
parent169b95d1c079bcc12c2a9bc881ecf2cccf0b6029 (diff)
Don't use using namespace xercesc because of MSXML conflict
-rw-r--r--libxsd/xsd/cxx/parser/xerces/elements.txx6
-rw-r--r--libxsd/xsd/cxx/tree/serialization.txx10
-rw-r--r--libxsd/xsd/cxx/tree/types.txx9
-rw-r--r--libxsd/xsd/cxx/xml/dom/serialization-header.txx14
4 files changed, 31 insertions, 8 deletions
diff --git a/libxsd/xsd/cxx/parser/xerces/elements.txx b/libxsd/xsd/cxx/parser/xerces/elements.txx
index f41b074..bc67bc6 100644
--- a/libxsd/xsd/cxx/parser/xerces/elements.txx
+++ b/libxsd/xsd/cxx/parser/xerces/elements.txx
@@ -571,7 +571,11 @@ namespace xsd
XSD_AUTO_PTR<xercesc::SAX2XMLReader> document<C>::
create_sax_ (flags f, const properties<C>& p)
{
- using namespace xercesc;
+ // Cannot use 'using namespace' because of MSXML conflict.
+ //
+ using xercesc::XMLUni;
+ using xercesc::SAX2XMLReader;
+ using xercesc::XMLReaderFactory;
XSD_AUTO_PTR<SAX2XMLReader> sax (
XMLReaderFactory::createXMLReader ());
diff --git a/libxsd/xsd/cxx/tree/serialization.txx b/libxsd/xsd/cxx/tree/serialization.txx
index 055f603..ef0a44c 100644
--- a/libxsd/xsd/cxx/tree/serialization.txx
+++ b/libxsd/xsd/cxx/tree/serialization.txx
@@ -97,10 +97,16 @@ namespace xsd
if (!x.null_content () && x.dom_content ().present ())
{
- // Clone the contents of the element.
+ // Cannot use 'using namespace' because of MSXML conflict.
//
- using namespace xercesc;
+ using xercesc::DOMAttr;
+ using xercesc::DOMNode;
+ using xercesc::DOMElement;
+ using xercesc::DOMDocument;
+ using xercesc::DOMNamedNodeMap;
+ // Clone the contents of the element.
+ //
DOMDocument& doc (*e.getOwnerDocument ());
const DOMElement& se (x.dom_content ().get ());
DOMNamedNodeMap& sa (*se.getAttributes ());
diff --git a/libxsd/xsd/cxx/tree/types.txx b/libxsd/xsd/cxx/tree/types.txx
index 8696171..a5ef95d 100644
--- a/libxsd/xsd/cxx/tree/types.txx
+++ b/libxsd/xsd/cxx/tree/types.txx
@@ -319,7 +319,10 @@ namespace xsd
std::basic_string<C> base64_binary<C, B>::
encode () const
{
- using namespace xercesc;
+ // Cannot use 'using namespace' because of MSXML conflict.
+ //
+ using xercesc::Base64;
+
std::basic_string<C> str;
XMLSize_t n;
@@ -357,7 +360,9 @@ namespace xsd
void base64_binary<C, B>::
decode (const XMLCh* src)
{
- using namespace xercesc;
+ // Cannot use 'using namespace' because of MSXML conflict.
+ //
+ using xercesc::Base64;
xml::std_memory_manager mm;
XMLSize_t size;
diff --git a/libxsd/xsd/cxx/xml/dom/serialization-header.txx b/libxsd/xsd/cxx/xml/dom/serialization-header.txx
index 6e58cfd..14a6d95 100644
--- a/libxsd/xsd/cxx/xml/dom/serialization-header.txx
+++ b/libxsd/xsd/cxx/xml/dom/serialization-header.txx
@@ -120,11 +120,19 @@ namespace xsd
void
clear (xercesc::DOMElement& e)
{
- using namespace xercesc;
+ // Cannot use 'using namespace' because of MSXML conflict.
+ //
+ using xercesc::XMLUni;
+ using xercesc::XMLString;
+ using xercesc::SchemaSymbols;
+
+ using xercesc::DOMNode;
+ using xercesc::DOMAttr;
+ using xercesc::DOMNamedNodeMap;
// Remove child nodes.
//
- while (xercesc::DOMNode* n = e.getFirstChild ())
+ while (DOMNode* n = e.getFirstChild ())
{
e.removeChild (n);
n->release ();
@@ -149,7 +157,7 @@ namespace xsd
if (ns != 0)
{
- if (XMLString::equals (ns, xercesc::XMLUni::fgXMLNSURIName))
+ if (XMLString::equals (ns, XMLUni::fgXMLNSURIName))
continue;
if (XMLString::equals (ns, SchemaSymbols::fgURI_XSI))