diff options
Diffstat (limited to 'libxsd/xsd/cxx/xml/dom')
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/auto-ptr.hxx | 4 | ||||
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/bits/error-handler-proxy.hxx | 1 | ||||
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/bits/error-handler-proxy.txx | 1 | ||||
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/elements.hxx | 1 | ||||
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/elements.txx | 1 | ||||
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/parsing-header.hxx | 1 | ||||
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/parsing-source.hxx | 2 | ||||
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/parsing-source.txx | 37 | ||||
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/serialization-header.hxx | 1 | ||||
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/serialization-header.txx | 5 | ||||
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/serialization-source.hxx | 1 | ||||
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/serialization-source.txx | 34 | ||||
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/wildcard-source.hxx | 1 | ||||
-rw-r--r-- | libxsd/xsd/cxx/xml/dom/wildcard-source.txx | 1 |
14 files changed, 49 insertions, 42 deletions
diff --git a/libxsd/xsd/cxx/xml/dom/auto-ptr.hxx b/libxsd/xsd/cxx/xml/dom/auto-ptr.hxx index cf5bcb5..256f824 100644 --- a/libxsd/xsd/cxx/xml/dom/auto-ptr.hxx +++ b/libxsd/xsd/cxx/xml/dom/auto-ptr.hxx @@ -1,5 +1,4 @@ // file : xsd/cxx/xml/dom/auto-ptr.hxx -// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_CXX_XML_DOM_AUTO_PTR_HXX @@ -54,8 +53,11 @@ namespace xsd unique_ptr (unique_ptr&& p): base (std::move (p)) {} template <class T1> unique_ptr (unique_ptr<T1>&& p): base (std::move (p)) {} + +#if !defined(__cplusplus) || __cplusplus < 201703L template <class T1> unique_ptr (std::auto_ptr<T1>&& p): base (std::move (p)) {} +#endif unique_ptr& operator= (unique_ptr&& p) { diff --git a/libxsd/xsd/cxx/xml/dom/bits/error-handler-proxy.hxx b/libxsd/xsd/cxx/xml/dom/bits/error-handler-proxy.hxx index 19af014..5154b62 100644 --- a/libxsd/xsd/cxx/xml/dom/bits/error-handler-proxy.hxx +++ b/libxsd/xsd/cxx/xml/dom/bits/error-handler-proxy.hxx @@ -1,5 +1,4 @@ // file : xsd/cxx/xml/dom/bits/error-handler-proxy.hxx -// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_CXX_XML_DOM_BITS_ERROR_HANDLER_PROXY_HXX diff --git a/libxsd/xsd/cxx/xml/dom/bits/error-handler-proxy.txx b/libxsd/xsd/cxx/xml/dom/bits/error-handler-proxy.txx index 4dd76bb..a1f83ff 100644 --- a/libxsd/xsd/cxx/xml/dom/bits/error-handler-proxy.txx +++ b/libxsd/xsd/cxx/xml/dom/bits/error-handler-proxy.txx @@ -1,5 +1,4 @@ // file : xsd/cxx/xml/dom/bits/error-handler-proxy.txx -// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #include <xsd/cxx/xml/string.hxx> diff --git a/libxsd/xsd/cxx/xml/dom/elements.hxx b/libxsd/xsd/cxx/xml/dom/elements.hxx index bf1ffe2..1244395 100644 --- a/libxsd/xsd/cxx/xml/dom/elements.hxx +++ b/libxsd/xsd/cxx/xml/dom/elements.hxx @@ -1,5 +1,4 @@ // file : xsd/cxx/xml/dom/elements.hxx -// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_CXX_XML_DOM_ELEMENTS_HXX diff --git a/libxsd/xsd/cxx/xml/dom/elements.txx b/libxsd/xsd/cxx/xml/dom/elements.txx index 7d8cf67..46e4866 100644 --- a/libxsd/xsd/cxx/xml/dom/elements.txx +++ b/libxsd/xsd/cxx/xml/dom/elements.txx @@ -1,5 +1,4 @@ // file : xsd/cxx/xml/dom/elements.txx -// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #include <xsd/cxx/xml/string.hxx> diff --git a/libxsd/xsd/cxx/xml/dom/parsing-header.hxx b/libxsd/xsd/cxx/xml/dom/parsing-header.hxx index 4f5dc20..b7bf344 100644 --- a/libxsd/xsd/cxx/xml/dom/parsing-header.hxx +++ b/libxsd/xsd/cxx/xml/dom/parsing-header.hxx @@ -1,5 +1,4 @@ // file : xsd/cxx/xml/dom/parsing-header.hxx -// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_CXX_XML_DOM_PARSING_HEADER_HXX diff --git a/libxsd/xsd/cxx/xml/dom/parsing-source.hxx b/libxsd/xsd/cxx/xml/dom/parsing-source.hxx index 69282e1..e4cb37e 100644 --- a/libxsd/xsd/cxx/xml/dom/parsing-source.hxx +++ b/libxsd/xsd/cxx/xml/dom/parsing-source.hxx @@ -1,5 +1,4 @@ // file : xsd/cxx/xml/dom/parsing-source.hxx -// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_CXX_XML_DOM_PARSING_SOURCE_HXX @@ -9,6 +8,7 @@ #include <xercesc/dom/DOMNode.hpp> #include <xercesc/dom/DOMAttr.hpp> +#include <xercesc/dom/DOMText.hpp> #include <xercesc/dom/DOMElement.hpp> #include <xercesc/dom/DOMDocument.hpp> #include <xercesc/dom/DOMNamedNodeMap.hpp> diff --git a/libxsd/xsd/cxx/xml/dom/parsing-source.txx b/libxsd/xsd/cxx/xml/dom/parsing-source.txx index 0bc8f00..2a2d6e2 100644 --- a/libxsd/xsd/cxx/xml/dom/parsing-source.txx +++ b/libxsd/xsd/cxx/xml/dom/parsing-source.txx @@ -1,5 +1,4 @@ // file : xsd/cxx/xml/dom/parsing-source.txx -// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #include <xercesc/dom/DOMLSParser.hpp> @@ -106,7 +105,10 @@ namespace xsd const properties<C>& prop, unsigned long flags) { - using namespace xercesc; + // Note: explicitly qualifying everything with xerces:: to avoid + // conflicts with MSXML. + // + using xercesc::XMLUni; // Instantiate the DOM parser. // @@ -116,13 +118,14 @@ namespace xsd // Get an implementation of the Load-Store (LS) interface. // - DOMImplementation* impl ( - DOMImplementationRegistry::getDOMImplementation (ls_id)); + xercesc::DOMImplementation* impl ( + xercesc::DOMImplementationRegistry::getDOMImplementation (ls_id)); - XSD_DOM_AUTO_PTR<DOMLSParser> parser ( - impl->createLSParser (DOMImplementationLS::MODE_SYNCHRONOUS, 0)); + XSD_DOM_AUTO_PTR<xercesc::DOMLSParser> parser ( + impl->createLSParser ( + xercesc::DOMImplementationLS::MODE_SYNCHRONOUS, 0)); - DOMConfiguration* conf (parser->getDomConfig ()); + xercesc::DOMConfiguration* conf (parser->getDomConfig ()); // Discard comment nodes in the document. // @@ -217,7 +220,7 @@ namespace xsd xercesc::Wrapper4InputSource wrap (&is, false); - XSD_DOM_AUTO_PTR<DOMDocument> doc; + XSD_DOM_AUTO_PTR<xercesc::DOMDocument> doc; try { doc.reset (parser->parse (&wrap)); @@ -250,7 +253,10 @@ namespace xsd const properties<C>& prop, unsigned long flags) { - using namespace xercesc; + // Note: explicitly qualifying everything with xerces:: to avoid + // conflicts with MSXML. + // + using xercesc::XMLUni; // Instantiate the DOM parser. // @@ -260,13 +266,14 @@ namespace xsd // Get an implementation of the Load-Store (LS) interface. // - DOMImplementation* impl ( - DOMImplementationRegistry::getDOMImplementation (ls_id)); + xercesc::DOMImplementation* impl ( + xercesc::DOMImplementationRegistry::getDOMImplementation (ls_id)); - XSD_DOM_AUTO_PTR<DOMLSParser> parser ( - impl->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0)); + XSD_DOM_AUTO_PTR<xercesc::DOMLSParser> parser ( + impl->createLSParser( + xercesc::DOMImplementationLS::MODE_SYNCHRONOUS, 0)); - DOMConfiguration* conf (parser->getDomConfig ()); + xercesc::DOMConfiguration* conf (parser->getDomConfig ()); // Discard comment nodes in the document. // @@ -360,7 +367,7 @@ namespace xsd bits::error_handler_proxy<C> ehp (eh); conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp); - XSD_DOM_AUTO_PTR<DOMDocument> doc; + XSD_DOM_AUTO_PTR<xercesc::DOMDocument> doc; try { doc.reset (parser->parseURI (string (uri).c_str ())); diff --git a/libxsd/xsd/cxx/xml/dom/serialization-header.hxx b/libxsd/xsd/cxx/xml/dom/serialization-header.hxx index a4948aa..8d3d6e9 100644 --- a/libxsd/xsd/cxx/xml/dom/serialization-header.hxx +++ b/libxsd/xsd/cxx/xml/dom/serialization-header.hxx @@ -1,5 +1,4 @@ // file : xsd/cxx/xml/dom/serialization-header.hxx -// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_CXX_XML_DOM_SERIALIZATION_HEADER_HXX diff --git a/libxsd/xsd/cxx/xml/dom/serialization-header.txx b/libxsd/xsd/cxx/xml/dom/serialization-header.txx index a08d292..4b9ebdd 100644 --- a/libxsd/xsd/cxx/xml/dom/serialization-header.txx +++ b/libxsd/xsd/cxx/xml/dom/serialization-header.txx @@ -1,5 +1,4 @@ // file : xsd/cxx/xml/dom/serialization-header.txx -// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #include <vector> @@ -175,7 +174,9 @@ namespace xsd atts.push_back (a); } - for (std::vector<DOMAttr*>::iterator i (atts.begin ()), + // Qualify DOMAttr to work around MSVC 16.11 /std:c++20 issue. + // + for (std::vector<xercesc::DOMAttr*>::iterator i (atts.begin ()), end (atts.end ()); i != end; ++i) { e.removeAttributeNode (*i); diff --git a/libxsd/xsd/cxx/xml/dom/serialization-source.hxx b/libxsd/xsd/cxx/xml/dom/serialization-source.hxx index 14c822c..a25e2ca 100644 --- a/libxsd/xsd/cxx/xml/dom/serialization-source.hxx +++ b/libxsd/xsd/cxx/xml/dom/serialization-source.hxx @@ -1,5 +1,4 @@ // file : xsd/cxx/xml/dom/serialization-source.hxx -// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_CXX_XML_DOM_SERIALIZATION_SOURCE_HXX diff --git a/libxsd/xsd/cxx/xml/dom/serialization-source.txx b/libxsd/xsd/cxx/xml/dom/serialization-source.txx index 177c066..e663d7b 100644 --- a/libxsd/xsd/cxx/xml/dom/serialization-source.txx +++ b/libxsd/xsd/cxx/xml/dom/serialization-source.txx @@ -1,5 +1,4 @@ // file : xsd/cxx/xml/dom/serialization-source.txx -// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #include <xercesc/util/XMLUni.hpp> // xercesc::fg* @@ -110,7 +109,10 @@ namespace xsd add_namespaces (xercesc::DOMElement& el, const namespace_infomap<C>& map) { - using namespace xercesc; + // Note: explicitly qualifying everything with xerces:: to avoid + // conflicts with MSXML. + // + using xercesc::XMLUni; typedef std::basic_string<C> string; typedef namespace_infomap<C> infomap; @@ -160,14 +162,14 @@ namespace xsd // if (!i->second.name.empty ()) el.setAttributeNS ( - xercesc::XMLUni::fgXMLNSURIName, + XMLUni::fgXMLNSURIName, xml::string (xmlns_prefix).c_str (), xml::string (i->second.name).c_str ()); } else { el.setAttributeNS ( - xercesc::XMLUni::fgXMLNSURIName, + XMLUni::fgXMLNSURIName, xml::string (xmlns_prefix + colon + i->first).c_str (), xml::string (i->second.name).c_str ()); } @@ -237,7 +239,8 @@ namespace xsd const namespace_infomap<C>& map, unsigned long) { - using namespace xercesc; + // Note: explicitly qualifying everything with xerces:: to avoid + // conflicts with MSXML. typedef std::basic_string<C> string; typedef namespace_infomap<C> infomap; @@ -269,10 +272,10 @@ namespace xsd xercesc::chLatin_S, xercesc::chNull}; - DOMImplementation* impl ( - DOMImplementationRegistry::getDOMImplementation (ls)); + xercesc::DOMImplementation* impl ( + xercesc::DOMImplementationRegistry::getDOMImplementation (ls)); - XSD_DOM_AUTO_PTR<DOMDocument> doc ( + XSD_DOM_AUTO_PTR<xercesc::DOMDocument> doc ( impl->createDocument ( (ns.empty () ? 0 : xml::string (ns).c_str ()), xml::string ((prefix.empty () @@ -294,21 +297,24 @@ namespace xsd xercesc::DOMErrorHandler& eh, unsigned long flags) { - using namespace xercesc; + // Note: explicitly qualifying everything with xerces:: to avoid + // conflicts with MSXML. + // + using xercesc::XMLUni; const XMLCh ls[] = {xercesc::chLatin_L, xercesc::chLatin_S, xercesc::chNull}; - DOMImplementation* impl ( - DOMImplementationRegistry::getDOMImplementation (ls)); + xercesc::DOMImplementation* impl ( + xercesc::DOMImplementationRegistry::getDOMImplementation (ls)); bits::error_handler_proxy<C> ehp (eh); - XSD_DOM_AUTO_PTR<DOMLSSerializer> writer ( + XSD_DOM_AUTO_PTR<xercesc::DOMLSSerializer> writer ( impl->createLSSerializer ()); - DOMConfiguration* conf (writer->getDomConfig ()); + xercesc::DOMConfiguration* conf (writer->getDomConfig ()); conf->setParameter (XMLUni::fgDOMErrorHandler, &ehp); @@ -335,7 +341,7 @@ namespace xsd conf->canSetParameter (XMLUni::fgDOMXMLDeclaration, false)) conf->setParameter (XMLUni::fgDOMXMLDeclaration, false); - XSD_DOM_AUTO_PTR<DOMLSOutput> out (impl->createLSOutput ()); + XSD_DOM_AUTO_PTR<xercesc::DOMLSOutput> out (impl->createLSOutput ()); out->setEncoding (xml::string (encoding).c_str ()); out->setByteStream (&target); diff --git a/libxsd/xsd/cxx/xml/dom/wildcard-source.hxx b/libxsd/xsd/cxx/xml/dom/wildcard-source.hxx index 9c9c6a9..66c0ae6 100644 --- a/libxsd/xsd/cxx/xml/dom/wildcard-source.hxx +++ b/libxsd/xsd/cxx/xml/dom/wildcard-source.hxx @@ -1,5 +1,4 @@ // file : xsd/cxx/xml/dom/wildcard-source.hxx -// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_CXX_XML_DOM_WILDCARD_SOURCE_HXX diff --git a/libxsd/xsd/cxx/xml/dom/wildcard-source.txx b/libxsd/xsd/cxx/xml/dom/wildcard-source.txx index 0f6ccc9..5249235 100644 --- a/libxsd/xsd/cxx/xml/dom/wildcard-source.txx +++ b/libxsd/xsd/cxx/xml/dom/wildcard-source.txx @@ -1,5 +1,4 @@ // file : xsd/cxx/xml/dom/wildcard-source.txx -// copyright : Copyright (c) 2005-2017 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #include <xercesc/util/XMLUniDefs.hpp> // chLatin_L, etc |