From: Scott Cantor Date: Wed, 18 Apr 2007 03:45:03 +0000 (+0000) Subject: Stop defaulting in xercesc namespace. X-Git-Tag: 1.0-alpha1~69 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=commitdiff_plain;h=fbb50076025b3885017ebae06b5e67af42303e96 Stop defaulting in xercesc namespace. --- diff --git a/xmltooling/AbstractAttributeExtensibleXMLObject.h b/xmltooling/AbstractAttributeExtensibleXMLObject.h index a18b953..dc3a36c 100644 --- a/xmltooling/AbstractAttributeExtensibleXMLObject.h +++ b/xmltooling/AbstractAttributeExtensibleXMLObject.h @@ -72,14 +72,14 @@ namespace xmltooling { * * @param attribute the DOM attribute node being unmarshalled */ - void unmarshallExtensionAttribute(const DOMAttr* attribute); + void unmarshallExtensionAttribute(const xercesc::DOMAttr* attribute); /** * Assists in the marshalling of extension attributes. * * @param domElement the DOM element against which to marshall the attributes */ - void marshallExtensionAttributes(DOMElement* domElement) const; + void marshallExtensionAttributes(xercesc::DOMElement* domElement) const; private: /** Map of arbitrary attributes. */ diff --git a/xmltooling/AbstractDOMCachingXMLObject.h b/xmltooling/AbstractDOMCachingXMLObject.h index 9ceda44..9bb7cca 100644 --- a/xmltooling/AbstractDOMCachingXMLObject.h +++ b/xmltooling/AbstractDOMCachingXMLObject.h @@ -41,13 +41,13 @@ namespace xmltooling { public: virtual ~AbstractDOMCachingXMLObject(); - DOMElement* getDOM() const { + xercesc::DOMElement* getDOM() const { return m_dom; } - void setDOM(DOMElement* dom, bool bindDocument=false) const; + void setDOM(xercesc::DOMElement* dom, bool bindDocument=false) const; - void setDocument(DOMDocument* doc) const { + void setDocument(xercesc::DOMDocument* doc) const { if (m_document) m_document->release(); m_document=doc; @@ -76,11 +76,11 @@ namespace xmltooling { * @param doc the document to clone into, or NULL, in which case a new document is created * @return the cloned DOM */ - DOMElement* cloneDOM(DOMDocument* doc=NULL) const; + xercesc::DOMElement* cloneDOM(xercesc::DOMDocument* doc=NULL) const; private: - mutable DOMElement* m_dom; - mutable DOMDocument* m_document; + mutable xercesc::DOMElement* m_dom; + mutable xercesc::DOMDocument* m_document; }; }; diff --git a/xmltooling/AbstractSimpleElement.h b/xmltooling/AbstractSimpleElement.h index 3777676..461b1cc 100644 --- a/xmltooling/AbstractSimpleElement.h +++ b/xmltooling/AbstractSimpleElement.h @@ -40,7 +40,7 @@ namespace xmltooling { { public: virtual ~AbstractSimpleElement() { - XMLString::release(&m_value); + xercesc::XMLString::release(&m_value); } bool hasChildren() const { @@ -68,7 +68,7 @@ namespace xmltooling { /** Copy constructor. */ AbstractSimpleElement(const AbstractSimpleElement& src) - : AbstractXMLObject(src), m_value(XMLString::replicate(src.m_value)) {} + : AbstractXMLObject(src), m_value(xercesc::XMLString::replicate(src.m_value)) {} private: XMLCh* m_value; diff --git a/xmltooling/AbstractXMLObject.h b/xmltooling/AbstractXMLObject.h index 576a7d0..1095988 100644 --- a/xmltooling/AbstractXMLObject.h +++ b/xmltooling/AbstractXMLObject.h @@ -47,8 +47,8 @@ namespace xmltooling { public: virtual ~AbstractXMLObject() { delete m_typeQname; - XMLString::release(&m_schemaLocation); - XMLString::release(&m_noNamespaceSchemaLocation); + xercesc::XMLString::release(&m_schemaLocation); + xercesc::XMLString::release(&m_noNamespaceSchemaLocation); } void detach(); diff --git a/xmltooling/ElementProxy.h b/xmltooling/ElementProxy.h index bdadb4d..e5a5d77 100644 --- a/xmltooling/ElementProxy.h +++ b/xmltooling/ElementProxy.h @@ -27,8 +27,6 @@ #include #include -using namespace xercesc; - namespace xmltooling { /** diff --git a/xmltooling/XMLObject.h b/xmltooling/XMLObject.h index 6dd887f..b311cb5 100644 --- a/xmltooling/XMLObject.h +++ b/xmltooling/XMLObject.h @@ -31,8 +31,6 @@ #include #include -using namespace xercesc; - #ifndef XMLTOOLING_NO_XMLSEC namespace xmlsignature { class XMLTOOL_API Signature; @@ -198,7 +196,7 @@ namespace xmltooling { * * @return the DOM representation of this XMLObject */ - virtual DOMElement* getDOM() const=0; + virtual xercesc::DOMElement* getDOM() const=0; /** * Sets the DOM representation of this XMLObject. @@ -206,7 +204,7 @@ namespace xmltooling { * @param dom DOM representation of this XMLObject * @param bindDocument true if the object should take ownership of the associated Document */ - virtual void setDOM(DOMElement* dom, bool bindDocument=false) const=0; + virtual void setDOM(xercesc::DOMElement* dom, bool bindDocument=false) const=0; /** * Assigns ownership of a DOM document to the XMLObject. @@ -214,7 +212,7 @@ namespace xmltooling { * * @param doc DOM document bound to this object */ - virtual void setDocument(DOMDocument* doc) const=0; + virtual void setDocument(xercesc::DOMDocument* doc) const=0; /** * Releases the DOM representation of this XMLObject, if there is one. @@ -271,8 +269,8 @@ namespace xmltooling { * @throws MarshallingException thrown if there is a problem marshalling the given object * @throws SignatureException thrown if a problem occurs during signature creation */ - virtual DOMElement* marshall( - DOMDocument* document=NULL + virtual xercesc::DOMElement* marshall( + xercesc::DOMDocument* document=NULL #ifndef XMLTOOLING_NO_XMLSEC ,const std::vector* sigs=NULL ,const Credential* credential=NULL @@ -293,8 +291,8 @@ namespace xmltooling { * @throws MarshallingException thrown if the given XMLObject can not be marshalled. * @throws SignatureException thrown if a problem occurs during signature creation */ - virtual DOMElement* marshall( - DOMElement* parentElement + virtual xercesc::DOMElement* marshall( + xercesc::DOMElement* parentElement #ifndef XMLTOOLING_NO_XMLSEC ,const std::vector* sigs=NULL ,const Credential* credential=NULL @@ -313,7 +311,7 @@ namespace xmltooling { * * @throws UnmarshallingException thrown if an error occurs unmarshalling the DOM element into the XMLObject */ - virtual XMLObject* unmarshall(DOMElement* element, bool bindDocument=false)=0; + virtual XMLObject* unmarshall(xercesc::DOMElement* element, bool bindDocument=false)=0; protected: XMLObject() {} diff --git a/xmltooling/XMLObjectBuilder.h b/xmltooling/XMLObjectBuilder.h index ada70a8..b096920 100644 --- a/xmltooling/XMLObjectBuilder.h +++ b/xmltooling/XMLObjectBuilder.h @@ -76,7 +76,7 @@ namespace xmltooling { * @param bindDocument true iff the XMLObject should take ownership of the DOM Document * @return the unmarshalled XMLObject */ - XMLObject* buildFromElement(DOMElement* element, bool bindDocument=false) const { + XMLObject* buildFromElement(xercesc::DOMElement* element, bool bindDocument=false) const { std::auto_ptr ret( buildObject(element->getNamespaceURI(),element->getLocalName(),element->getPrefix(),XMLHelper::getXSIType(element)) ); @@ -91,7 +91,7 @@ namespace xmltooling { * @param bindDocument true iff the XMLObject should take ownership of the DOM Document * @return the unmarshalled XMLObject */ - XMLObject* buildFromDocument(DOMDocument* doc, bool bindDocument=true) const { + XMLObject* buildFromDocument(xercesc::DOMDocument* doc, bool bindDocument=true) const { return buildFromElement(doc->getDocumentElement(),bindDocument); } @@ -102,7 +102,7 @@ namespace xmltooling { * @param bindDocument true iff the new XMLObject should take ownership of the DOM Document * @return the unmarshalled object or NULL if no builder is available */ - static XMLObject* buildOneFromElement(DOMElement* element, bool bindDocument=false) { + static XMLObject* buildOneFromElement(xercesc::DOMElement* element, bool bindDocument=false) { const XMLObjectBuilder* b=getBuilder(element); return b ? b->buildFromElement(element,bindDocument) : NULL; } @@ -125,7 +125,7 @@ namespace xmltooling { * @param element the element for which to locate a builder * @return the builder or NULL */ - static const XMLObjectBuilder* getBuilder(const DOMElement* element); + static const XMLObjectBuilder* getBuilder(const xercesc::DOMElement* element); /** * Retrieves the default XMLObjectBuilder for DOM elements diff --git a/xmltooling/XMLToolingConfig.h b/xmltooling/XMLToolingConfig.h index 92062e8..2523c54 100644 --- a/xmltooling/XMLToolingConfig.h +++ b/xmltooling/XMLToolingConfig.h @@ -240,17 +240,17 @@ namespace xmltooling { /** * Manages factories for KeyInfoResolver plugins. */ - PluginManager KeyInfoResolverManager; + PluginManager KeyInfoResolverManager; /** * Manages factories for CredentialResolver plugins. */ - PluginManager CredentialResolverManager; + PluginManager CredentialResolverManager; /** * Manages factories for TrustEngine plugins. */ - PluginManager TrustEngineManager; + PluginManager TrustEngineManager; /** * Maps an XML Signature/Encryption algorithm identifier to a library-specific @@ -282,7 +282,7 @@ namespace xmltooling { /** * Manages factories for StorageService plugins. */ - PluginManager StorageServiceManager; + PluginManager StorageServiceManager; }; }; diff --git a/xmltooling/base.h b/xmltooling/base.h index 3b2529f..f8eacaf 100644 --- a/xmltooling/base.h +++ b/xmltooling/base.h @@ -83,117 +83,119 @@ #ifndef NULL #define NULL 0 #endif -#define UNICODE_LITERAL_1(a) {chLatin_##a, chNull} -#define UNICODE_LITERAL_2(a,b) {chLatin_##a, chLatin_##b, chNull} -#define UNICODE_LITERAL_3(a,b,c) {chLatin_##a, chLatin_##b, chLatin_##c, chNull} -#define UNICODE_LITERAL_4(a,b,c,d) {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chNull} -#define UNICODE_LITERAL_5(a,b,c,d,e) {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chNull} -#define UNICODE_LITERAL_6(a,b,c,d,e,f) {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chNull} +#define UNICODE_LITERAL_1(a) {xercesc::chLatin_##a, xercesc::chNull} +#define UNICODE_LITERAL_2(a,b) {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chNull} +#define UNICODE_LITERAL_3(a,b,c) {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chNull} +#define UNICODE_LITERAL_4(a,b,c,d) {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chNull} +#define UNICODE_LITERAL_5(a,b,c,d,e) \ + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chNull} +#define UNICODE_LITERAL_6(a,b,c,d,e,f) \ + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chNull} #define UNICODE_LITERAL_7(a,b,c,d,e,f,g) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chNull} #define UNICODE_LITERAL_8(a,b,c,d,e,f,g,h) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chNull} #define UNICODE_LITERAL_9(a,b,c,d,e,f,g,h,i) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, xercesc::chNull} #define UNICODE_LITERAL_10(a,b,c,d,e,f,g,h,i,j) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chNull} #define UNICODE_LITERAL_11(a,b,c,d,e,f,g,h,i,j,k) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chNull} #define UNICODE_LITERAL_12(a,b,c,d,e,f,g,h,i,j,k,l) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chNull} #define UNICODE_LITERAL_13(a,b,c,d,e,f,g,h,i,j,k,l,m) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chNull} #define UNICODE_LITERAL_14(a,b,c,d,e,f,g,h,i,j,k,l,m,n) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chNull} #define UNICODE_LITERAL_15(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chNull} #define UNICODE_LITERAL_16(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chNull} #define UNICODE_LITERAL_17(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chNull} #define UNICODE_LITERAL_18(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, xercesc::chNull} #define UNICODE_LITERAL_19(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chNull} #define UNICODE_LITERAL_20(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chNull} #define UNICODE_LITERAL_21(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chLatin_##u, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chNull} #define UNICODE_LITERAL_22(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chLatin_##u, chLatin_##v, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chNull} #define UNICODE_LITERAL_23(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chLatin_##u, chLatin_##v, chLatin_##w, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chNull} #define UNICODE_LITERAL_24(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chLatin_##u, chLatin_##v, chLatin_##w, chLatin_##x, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chNull} #define UNICODE_LITERAL_25(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chLatin_##u, chLatin_##v, chLatin_##w, chLatin_##x, chLatin_##y, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chNull} #define UNICODE_LITERAL_26(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chLatin_##u, chLatin_##v, chLatin_##w, chLatin_##x, chLatin_##y, chLatin_##z, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, xercesc::chNull} #define UNICODE_LITERAL_27(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chLatin_##u, chLatin_##v, chLatin_##w, chLatin_##x, chLatin_##y, chLatin_##z, \ - chLatin_##aa, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ + xercesc::chLatin_##aa, xercesc::chNull} #define UNICODE_LITERAL_28(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chLatin_##u, chLatin_##v, chLatin_##w, chLatin_##x, chLatin_##y, chLatin_##z, \ - chLatin_##aa, chLatin_##bb, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ + xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chNull} #define UNICODE_LITERAL_29(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chLatin_##u, chLatin_##v, chLatin_##w, chLatin_##x, chLatin_##y, chLatin_##z, \ - chLatin_##aa, chLatin_##bb, chLatin_##cc, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ + xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chNull} #define UNICODE_LITERAL_30(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chLatin_##u, chLatin_##v, chLatin_##w, chLatin_##x, chLatin_##y, chLatin_##z, \ - chLatin_##aa, chLatin_##bb, chLatin_##cc, chLatin_##dd, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ + xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chNull} #define UNICODE_LITERAL_31(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chLatin_##u, chLatin_##v, chLatin_##w, chLatin_##x, chLatin_##y, chLatin_##z, \ - chLatin_##aa, chLatin_##bb, chLatin_##cc, chLatin_##dd, chLatin_##ee, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ + xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chNull} #define UNICODE_LITERAL_32(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chLatin_##u, chLatin_##v, chLatin_##w, chLatin_##x, chLatin_##y, chLatin_##z, \ - chLatin_##aa, chLatin_##bb, chLatin_##cc, chLatin_##dd, chLatin_##ee, chLatin_##ff, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ + xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chNull} #define UNICODE_LITERAL_33(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chLatin_##u, chLatin_##v, chLatin_##w, chLatin_##x, chLatin_##y, chLatin_##z, \ - chLatin_##aa, chLatin_##bb, chLatin_##cc, chLatin_##dd, chLatin_##ee, chLatin_##ff, chLatin_##gg, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ + xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chNull} #define UNICODE_LITERAL_34(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,bb,cc,dd,ee,ff,gg,hh) \ - {chLatin_##a, chLatin_##b, chLatin_##c, chLatin_##d, chLatin_##e, chLatin_##f, chLatin_##g, chLatin_##h, chLatin_##i, \ - chLatin_##j, chLatin_##k, chLatin_##l, chLatin_##m, chLatin_##n, chLatin_##o, chLatin_##p, chLatin_##q, chLatin_##r, \ - chLatin_##s, chLatin_##t, chLatin_##u, chLatin_##v, chLatin_##w, chLatin_##x, chLatin_##y, chLatin_##z, \ - chLatin_##aa, chLatin_##bb, chLatin_##cc, chLatin_##dd, chLatin_##ee, chLatin_##ff, chLatin_##gg, chLatin_##hh, chNull} + {xercesc::chLatin_##a, xercesc::chLatin_##b, xercesc::chLatin_##c, xercesc::chLatin_##d, xercesc::chLatin_##e, xercesc::chLatin_##f, xercesc::chLatin_##g, xercesc::chLatin_##h, xercesc::chLatin_##i, \ + xercesc::chLatin_##j, xercesc::chLatin_##k, xercesc::chLatin_##l, xercesc::chLatin_##m, xercesc::chLatin_##n, xercesc::chLatin_##o, xercesc::chLatin_##p, xercesc::chLatin_##q, xercesc::chLatin_##r, \ + xercesc::chLatin_##s, xercesc::chLatin_##t, xercesc::chLatin_##u, xercesc::chLatin_##v, xercesc::chLatin_##w, xercesc::chLatin_##x, xercesc::chLatin_##y, xercesc::chLatin_##z, \ + xercesc::chLatin_##aa, xercesc::chLatin_##bb, xercesc::chLatin_##cc, xercesc::chLatin_##dd, xercesc::chLatin_##ee, xercesc::chLatin_##ff, xercesc::chLatin_##gg, xercesc::chLatin_##hh, xercesc::chNull} #endif /* DOXYGEN_SKIP */ /** @@ -490,16 +492,16 @@ void set##proper(const XMLCh* value) { \ if (value) { \ switch (*value) { \ - case chLatin_t: \ + case xercesc::chLatin_t: \ proper(xmlconstants::XML_BOOL_TRUE); \ break; \ - case chLatin_f: \ + case xercesc::chLatin_f: \ proper(xmlconstants::XML_BOOL_FALSE); \ break; \ - case chDigit_1: \ + case xercesc::chDigit_1: \ proper(xmlconstants::XML_BOOL_ONE); \ break; \ - case chDigit_0: \ + case xercesc::chDigit_0: \ proper(xmlconstants::XML_BOOL_ZERO); \ break; \ default: \ @@ -589,7 +591,7 @@ XMLCh* m_##proper; \ public: \ pair get##proper() const { \ - return make_pair((m_##proper!=NULL),(m_##proper!=NULL ? XMLString::parseInt(m_##proper): 0)); \ + return make_pair((m_##proper!=NULL),(m_##proper!=NULL ? xercesc::XMLString::parseInt(m_##proper): 0)); \ } \ void set##proper(const XMLCh* proper) { \ m_##proper = prepareForAssignment(m_##proper,proper); \ @@ -1087,7 +1089,7 @@ #define DECL_INTEGER_CONTENT(proper) \ XMLTOOLING_DOXYGEN(Returns proper in integer form after a NULL indicator.) \ std::pair get##proper() const { \ - return std::make_pair((getTextContent()!=NULL), (getTextContent()!=NULL ? XMLString::parseInt(getTextContent()) : NULL)); \ + return std::make_pair((getTextContent()!=NULL), (getTextContent()!=NULL ? xercesc::XMLString::parseInt(getTextContent()) : NULL)); \ } \ XMLTOOLING_DOXYGEN(Sets proper.) \ void set##proper(int proper) { \ @@ -1226,7 +1228,7 @@ return new cname##Impl(nsURI,localName,prefix,schemaType); \ } -#else /* !HAVE_COVARIANT_RETURNS */ +#else /* !HAVE_COVARIANT_RETURNS */ /** * Begins the declaration of an XMLObjectBuilder specialization. diff --git a/xmltooling/encryption/Decrypter.h b/xmltooling/encryption/Decrypter.h index e23156a..4ae0885 100644 --- a/xmltooling/encryption/Decrypter.h +++ b/xmltooling/encryption/Decrypter.h @@ -93,7 +93,7 @@ namespace xmlencryption { * @param key the decryption key to use (it will not be freed internally) * @return the decrypted DOM fragment */ - DOMDocumentFragment* decryptData(const EncryptedData& encryptedData, XSECCryptoKey* key); + xercesc::DOMDocumentFragment* decryptData(const EncryptedData& encryptedData, XSECCryptoKey* key); /** * Decrypts the supplied information and returns the resulting as a DOM @@ -110,7 +110,7 @@ namespace xmlencryption { * @param recipient identifier of decrypting entity for use in identifying multi-cast keys * @return the decrypted DOM fragment */ - DOMDocumentFragment* decryptData(const EncryptedData& encryptedData, const XMLCh* recipient=NULL); + xercesc::DOMDocumentFragment* decryptData(const EncryptedData& encryptedData, const XMLCh* recipient=NULL); /** * Decrypts the supplied information and returns the resulting key. diff --git a/xmltooling/encryption/Encrypter.h b/xmltooling/encryption/Encrypter.h index 1bf6945..3495904 100644 --- a/xmltooling/encryption/Encrypter.h +++ b/xmltooling/encryption/Encrypter.h @@ -142,7 +142,9 @@ namespace xmlencryption { * @param kencParams key encryption settings, or NULL * @return a stand-alone EncryptedData object, unconnected to the source DOM */ - EncryptedData* encryptElement(DOMElement* element, EncryptionParams& encParams, KeyEncryptionParams* kencParams=NULL); + EncryptedData* encryptElement( + xercesc::DOMElement* element, EncryptionParams& encParams, KeyEncryptionParams* kencParams=NULL + ); /** * Encrypts the supplied element's children and returns the resulting object. @@ -159,7 +161,9 @@ namespace xmlencryption { * @param kencParams key encryption settings, or NULL * @return a stand-alone EncryptedData object, unconnected to the source DOM */ - EncryptedData* encryptElementContent(DOMElement* element, EncryptionParams& encParams, KeyEncryptionParams* kencParams=NULL); + EncryptedData* encryptElementContent( + xercesc::DOMElement* element, EncryptionParams& encParams, KeyEncryptionParams* kencParams=NULL + ); /** * Encrypts the supplied input stream and returns the resulting object. @@ -187,7 +191,9 @@ namespace xmlencryption { * @param compact true iff the encrypted representation should be made as small as possible * @return a stand-alone EncryptedKey object, unconnected to any DOM */ - EncryptedKey* encryptKey(const unsigned char* keyBuffer, unsigned int keyBufferSize, KeyEncryptionParams& kencParams, bool compact=false); + EncryptedKey* encryptKey( + const unsigned char* keyBuffer, unsigned int keyBufferSize, KeyEncryptionParams& kencParams, bool compact=false + ); private: void checkParams(EncryptionParams& encParams, KeyEncryptionParams* kencParams); diff --git a/xmltooling/exceptions.cpp b/xmltooling/exceptions.cpp index 37a09c1..91f4ffa 100644 --- a/xmltooling/exceptions.cpp +++ b/xmltooling/exceptions.cpp @@ -243,11 +243,11 @@ string XMLToolingException::toQueryString() const XMLToolingException* XMLToolingException::fromStream(std::istream& in) { - static const XMLCh exception[] = { chLatin_e, chLatin_x, chLatin_c, chLatin_e, chLatin_p, chLatin_t, chLatin_i, chLatin_o, chLatin_n, chNull }; - static const XMLCh message[] = { chLatin_m, chLatin_e, chLatin_s, chLatin_s, chLatin_a, chLatin_g, chLatin_e, chNull }; - static const XMLCh name[] = { chLatin_n, chLatin_a, chLatin_m, chLatin_e, chNull }; - static const XMLCh param[] = { chLatin_p, chLatin_a, chLatin_r, chLatin_a, chLatin_m, chNull }; - static const XMLCh type[] = { chLatin_t, chLatin_y, chLatin_p, chLatin_e, chNull }; + static const XMLCh exception[] = UNICODE_LITERAL_9(e,x,c,e,p,t,i,o,n); + static const XMLCh message[] = UNICODE_LITERAL_7(m,e,s,s,a,g,e); + static const XMLCh name[] = UNICODE_LITERAL_4(n,a,m,e); + static const XMLCh param[] = UNICODE_LITERAL_5(p,a,r,a,m); + static const XMLCh type[] = UNICODE_LITERAL_4(t,y,p,e); DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in); diff --git a/xmltooling/impl/AnyElement.h b/xmltooling/impl/AnyElement.h index 09cf6c2..5fad8ec 100644 --- a/xmltooling/impl/AnyElement.h +++ b/xmltooling/impl/AnyElement.h @@ -62,9 +62,9 @@ namespace xmltooling { IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end()); - void marshallAttributes(DOMElement* domElement) const; - void processChildElement(XMLObject* childXMLObject, const DOMElement* childRoot); - void processAttribute(const DOMAttr* attribute); + void marshallAttributes(xercesc::DOMElement* domElement) const; + void processChildElement(XMLObject* childXMLObject, const xercesc::DOMElement* childRoot); + void processAttribute(const xercesc::DOMAttr* attribute); }; /// @endcond diff --git a/xmltooling/impl/UnknownElement.h b/xmltooling/impl/UnknownElement.h index e9aee3c..ed24fae 100644 --- a/xmltooling/impl/UnknownElement.h +++ b/xmltooling/impl/UnknownElement.h @@ -57,26 +57,26 @@ namespace xmltooling { throw XMLObjectException("Direct access to content is not permitted."); } - DOMElement* marshall( - DOMDocument* document=NULL + xercesc::DOMElement* marshall( + xercesc::DOMDocument* document=NULL #ifndef XMLTOOLING_NO_XMLSEC ,const std::vector* sigs=NULL ,const Credential* credential=NULL #endif ) const; - DOMElement* marshall( - DOMElement* parentElement + xercesc::DOMElement* marshall( + xercesc::DOMElement* parentElement #ifndef XMLTOOLING_NO_XMLSEC ,const std::vector* sigs=NULL ,const Credential* credential=NULL #endif ) const; - XMLObject* unmarshall(DOMElement* element, bool bindDocument=false); + XMLObject* unmarshall(xercesc::DOMElement* element, bool bindDocument=false); protected: - void setDocumentElement(DOMDocument* document, DOMElement* element) const { - DOMElement* documentRoot = document->getDocumentElement(); + void setDocumentElement(xercesc::DOMDocument* document, xercesc::DOMElement* element) const { + xercesc::DOMElement* documentRoot = document->getDocumentElement(); if (documentRoot) document->replaceChild(element, documentRoot); else diff --git a/xmltooling/internal.h b/xmltooling/internal.h index 02b2ada..3a86e3b 100644 --- a/xmltooling/internal.h +++ b/xmltooling/internal.h @@ -40,6 +40,8 @@ #include "XMLToolingConfig.h" #include "util/ParserPool.h" +using namespace xercesc; + #include #ifndef XMLTOOLING_NO_XMLSEC #include @@ -75,7 +77,7 @@ namespace xmltooling { /// @cond OFF - class XMLToolingInternalConfig : public xmltooling::XMLToolingConfig + class XMLToolingInternalConfig : public XMLToolingConfig { public: XMLToolingInternalConfig() : m_lock(NULL), m_parserPool(NULL), m_validatingPool(NULL) { diff --git a/xmltooling/io/AbstractXMLObjectMarshaller.h b/xmltooling/io/AbstractXMLObjectMarshaller.h index 2eaedaf..a6f7d4c 100644 --- a/xmltooling/io/AbstractXMLObjectMarshaller.h +++ b/xmltooling/io/AbstractXMLObjectMarshaller.h @@ -40,16 +40,16 @@ namespace xmltooling { public: virtual ~AbstractXMLObjectMarshaller() {} - DOMElement* marshall( - DOMDocument* document=NULL + xercesc::DOMElement* marshall( + xercesc::DOMDocument* document=NULL #ifndef XMLTOOLING_NO_XMLSEC ,const std::vector* sigs=NULL ,const Credential* credential=NULL #endif ) const; - DOMElement* marshall( - DOMElement* parentElement + xercesc::DOMElement* marshall( + xercesc::DOMElement* parentElement #ifndef XMLTOOLING_NO_XMLSEC ,const std::vector* sigs=NULL ,const Credential* credential=NULL @@ -66,8 +66,8 @@ namespace xmltooling { * @param document the document * @param element the Element that will serve as the Document Element */ - void setDocumentElement(DOMDocument* document, DOMElement* element) const { - DOMElement* documentRoot = document->getDocumentElement(); + void setDocumentElement(xercesc::DOMDocument* document, xercesc::DOMElement* element) const { + xercesc::DOMElement* documentRoot = document->getDocumentElement(); if (documentRoot) document->replaceChild(element, documentRoot); else @@ -87,7 +87,7 @@ namespace xmltooling { * @throws SignatureException thrown if a problem occurs during signature creation */ void marshallInto( - DOMElement* targetElement, const std::vector* sigs, const Credential* credential=NULL + xercesc::DOMElement* targetElement, const std::vector* sigs, const Credential* credential=NULL ) const; #else /** @@ -98,7 +98,7 @@ namespace xmltooling { * * @throws MarshallingException thrown if there is a problem marshalling the object */ - void marshallInto(DOMElement* targetElement) const; + void marshallInto(xercesc::DOMElement* targetElement) const; #endif /** @@ -109,14 +109,14 @@ namespace xmltooling { * @throws MarshallingException thrown if the type on the XMLObject is doesn't contain * a local name, prefix, and namespace URI */ - void marshallElementType(DOMElement* domElement) const; + void marshallElementType(xercesc::DOMElement* domElement) const; /** * Creates the xmlns attributes for any namespaces set on the XMLObject. * * @param domElement the DOM element the namespaces will be added to */ - void marshallNamespaces(DOMElement* domElement) const; + void marshallNamespaces(xercesc::DOMElement* domElement) const; #ifndef XMLTOOLING_NO_XMLSEC /** @@ -127,7 +127,7 @@ namespace xmltooling { * * @throws MarshallingException thrown if there is a problem marshalling a child element */ - void marshallContent(DOMElement* domElement, const Credential* credential) const; + void marshallContent(xercesc::DOMElement* domElement, const Credential* credential) const; #else /** * Marshalls the text content and/or child elements of the XMLObject. @@ -136,7 +136,7 @@ namespace xmltooling { * * @throws MarshallingException thrown if there is a problem marshalling a child element */ - void marshallContent(DOMElement* domElement) const; + void marshallContent(xercesc::DOMElement* domElement) const; #endif /** @@ -146,7 +146,7 @@ namespace xmltooling { * * @throws MarshallingException thrown if there is a problem marshalling an attribute */ - virtual void marshallAttributes(DOMElement* domElement) const {} + virtual void marshallAttributes(xercesc::DOMElement* domElement) const {} }; }; diff --git a/xmltooling/io/AbstractXMLObjectUnmarshaller.h b/xmltooling/io/AbstractXMLObjectUnmarshaller.h index 50f78d3..09a4cc8 100644 --- a/xmltooling/io/AbstractXMLObjectUnmarshaller.h +++ b/xmltooling/io/AbstractXMLObjectUnmarshaller.h @@ -40,7 +40,7 @@ namespace xmltooling { public: virtual ~AbstractXMLObjectUnmarshaller() {} - XMLObject* unmarshall(DOMElement* element, bool bindDocument=false); + XMLObject* unmarshall(xercesc::DOMElement* element, bool bindDocument=false); protected: AbstractXMLObjectUnmarshaller() {} @@ -55,7 +55,7 @@ namespace xmltooling { * * @throws UnmarshallingException thrown if there is a problem unmarshalling an attribute */ - virtual void unmarshallAttributes(const DOMElement* domElement); + virtual void unmarshallAttributes(const xercesc::DOMElement* domElement); /** * Unmarshalls a given Element's child nodes. The resulting XMLObject children and content @@ -65,7 +65,7 @@ namespace xmltooling { * * @throws UnmarshallingException thrown if an error occurs unmarshalling the child elements */ - virtual void unmarshallContent(const DOMElement* domElement); + virtual void unmarshallContent(const xercesc::DOMElement* domElement); /** * Called after a child element has been unmarshalled so that it can be added to the parent XMLObject. @@ -75,7 +75,7 @@ namespace xmltooling { * * @throws UnmarshallingException thrown if there is a problem adding the child to the parent */ - virtual void processChildElement(XMLObject* child, const DOMElement* childRoot); + virtual void processChildElement(XMLObject* child, const xercesc::DOMElement* childRoot); /** * Called after an attribute has been unmarshalled so that it can be added to the XMLObject. @@ -84,7 +84,7 @@ namespace xmltooling { * * @throws UnmarshallingException thrown if there is a problem adding the attribute to the XMLObject */ - virtual void processAttribute(const DOMAttr* attribute); + virtual void processAttribute(const xercesc::DOMAttr* attribute); }; }; diff --git a/xmltooling/security/AbstractPKIXTrustEngine.h b/xmltooling/security/AbstractPKIXTrustEngine.h index 1fb9346..a1f77e2 100644 --- a/xmltooling/security/AbstractPKIXTrustEngine.h +++ b/xmltooling/security/AbstractPKIXTrustEngine.h @@ -49,7 +49,7 @@ namespace xmltooling { * * @param e DOM to supply configuration for provider */ - AbstractPKIXTrustEngine(const DOMElement* e=NULL) : OpenSSLTrustEngine(e) {} + AbstractPKIXTrustEngine(const xercesc::DOMElement* e=NULL) : OpenSSLTrustEngine(e) {} /** * Checks that either the name of the peer with the given credentials or the names diff --git a/xmltooling/security/ChainingTrustEngine.h b/xmltooling/security/ChainingTrustEngine.h index 65f972b..be2c586 100644 --- a/xmltooling/security/ChainingTrustEngine.h +++ b/xmltooling/security/ChainingTrustEngine.h @@ -45,7 +45,7 @@ namespace xmltooling { * * @param e DOM to supply configuration for provider */ - ChainingTrustEngine(const DOMElement* e=NULL); + ChainingTrustEngine(const xercesc::DOMElement* e=NULL); /** * Destructor will delete any embedded engines. diff --git a/xmltooling/security/OpenSSLTrustEngine.h b/xmltooling/security/OpenSSLTrustEngine.h index a44cd56..fc17190 100644 --- a/xmltooling/security/OpenSSLTrustEngine.h +++ b/xmltooling/security/OpenSSLTrustEngine.h @@ -49,7 +49,7 @@ namespace xmltooling { * * @param e DOM to supply configuration for provider */ - OpenSSLTrustEngine(const DOMElement* e=NULL) : X509TrustEngine(e) {} + OpenSSLTrustEngine(const xercesc::DOMElement* e=NULL) : X509TrustEngine(e) {} public: virtual ~OpenSSLTrustEngine() {} diff --git a/xmltooling/security/TrustEngine.h b/xmltooling/security/TrustEngine.h index cf4c257..0af444c 100644 --- a/xmltooling/security/TrustEngine.h +++ b/xmltooling/security/TrustEngine.h @@ -57,7 +57,7 @@ namespace xmltooling { * * @param e DOM to supply configuration for provider */ - TrustEngine(const DOMElement* e=NULL); + TrustEngine(const xercesc::DOMElement* e=NULL); /** Custom KeyInfoResolver instance. */ KeyInfoResolver* m_keyInfoResolver; diff --git a/xmltooling/security/X509TrustEngine.h b/xmltooling/security/X509TrustEngine.h index 097e630..2501ace 100644 --- a/xmltooling/security/X509TrustEngine.h +++ b/xmltooling/security/X509TrustEngine.h @@ -45,7 +45,7 @@ namespace xmltooling { * * @param e DOM to supply configuration for provider */ - X509TrustEngine(const DOMElement* e=NULL) : TrustEngine(e) {} + X509TrustEngine(const xercesc::DOMElement* e=NULL) : TrustEngine(e) {} public: virtual ~X509TrustEngine() {} diff --git a/xmltooling/unicode.h b/xmltooling/unicode.h index 8e1e300..199efa1 100644 --- a/xmltooling/unicode.h +++ b/xmltooling/unicode.h @@ -29,8 +29,6 @@ #include #include -using namespace xercesc; - namespace xmltooling { #ifdef HAVE_GOOD_STL @@ -73,41 +71,51 @@ namespace xmltooling { */ class XMLTOOL_API auto_ptr_char { + MAKE_NONCOPYABLE(auto_ptr_char); public: /** * Constructor transcodes a 16-bit Unicode string into the local code page (NOT UTF-8) and wraps the result. * @param src the 16-bit string to transcode and wrap * @param trim trims leading/trailing whitespace from the result (defaults to true) */ - auto_ptr_char(const XMLCh* src, bool trim=true) : m_buf(XMLString::transcode(src)) {if (trim && m_buf) XMLString::trim(m_buf);} + auto_ptr_char(const XMLCh* src, bool trim=true) : m_buf(xercesc::XMLString::transcode(src)) { + if (trim && m_buf) xercesc::XMLString::trim(m_buf); + } /** * Constructor copies a local code page (NOT UTF-8) string and wraps the result. * @param src the local string to copy and wrap * @param trim trims leading/trailing whitespace from the result (defaults to true) */ - auto_ptr_char(const char* src, bool trim=true) : m_buf(XMLString::replicate(src)) {if (trim && m_buf) XMLString::trim(m_buf);} + auto_ptr_char(const char* src, bool trim=true) : m_buf(xercesc::XMLString::replicate(src)) { + if (trim && m_buf) xercesc::XMLString::trim(m_buf); + } /** * Destructor frees the wrapped buffer using the Xerces memory manager. */ - ~auto_ptr_char() { XMLString::release(&m_buf); } + ~auto_ptr_char() { + xercesc::XMLString::release(&m_buf); + } /** * Returns the wrapped buffer. * @return a null-terminated local code page string */ - const char* get() const { return m_buf; } + const char* get() const { + return m_buf; + } /** * Returns the wrapped buffer and transfers ownership of it to the caller. * @return a null-terminated local code page string */ - char* release() { char* temp=m_buf; m_buf=NULL; return temp; } + char* release() { + char* temp=m_buf; m_buf=NULL; return temp; + } private: char* m_buf; - MAKE_NONCOPYABLE(auto_ptr_char); }; /** @@ -119,41 +127,51 @@ namespace xmltooling { */ class XMLTOOL_API auto_ptr_XMLCh { + MAKE_NONCOPYABLE(auto_ptr_XMLCh); public: /** * Constructor transcodes a local code page (NOT UTF-8) string into 16-bit Unicode and wraps the result. * @param src the local string to transcode and wrap * @param trim trims leading/trailing whitespace from the result (defaults to true) */ - auto_ptr_XMLCh(const char* src, bool trim=true) : m_buf(XMLString::transcode(src)) {if (trim && m_buf) XMLString::trim(m_buf);} + auto_ptr_XMLCh(const char* src, bool trim=true) : m_buf(xercesc::XMLString::transcode(src)) { + if (trim && m_buf) xercesc::XMLString::trim(m_buf); + } /** * Constructor copies a 16-bit Unicode string and wraps the result. * @param src the Unicode string to copy and wrap * @param trim trims leading/trailing whitespace from the result (defaults to true) */ - auto_ptr_XMLCh(const XMLCh* src, bool trim=true) : m_buf(XMLString::replicate(src)) {if (trim && m_buf) XMLString::trim(m_buf);} + auto_ptr_XMLCh(const XMLCh* src, bool trim=true) : m_buf(xercesc::XMLString::replicate(src)) { + if (trim && m_buf) xercesc::XMLString::trim(m_buf); + } /** * Destructor frees the wrapped buffer using the Xerces memory manager. */ - ~auto_ptr_XMLCh() { XMLString::release(&m_buf); } + ~auto_ptr_XMLCh() { + xercesc::XMLString::release(&m_buf); + } /** * Returns the wrapped buffer. * @return a null-terminated Unicode string */ - const XMLCh* get() const { return m_buf; } + const XMLCh* get() const { + return m_buf; + } /** * Returns the wrapped buffer and transfers ownership of it to the caller. * @return a null-terminated Unicode string */ - XMLCh* release() { XMLCh* temp=m_buf; m_buf=NULL; return temp; } + XMLCh* release() { + XMLCh* temp=m_buf; m_buf=NULL; return temp; + } private: XMLCh* m_buf; - MAKE_NONCOPYABLE(auto_ptr_XMLCh); }; }; diff --git a/xmltooling/util/DateTime.h b/xmltooling/util/DateTime.h index 1aeaa8e..dead345 100644 --- a/xmltooling/util/DateTime.h +++ b/xmltooling/util/DateTime.h @@ -161,7 +161,7 @@ namespace xmltooling inline void DateTime::setBuffer(const XMLCh* const aString) { reset(); - fEnd = XMLString::stringLen(aString); + fEnd = xercesc::XMLString::stringLen(aString); if (fEnd > 0) { if (fEnd > fBufferMaxLen) { delete[] fBuffer; @@ -174,7 +174,7 @@ namespace xmltooling inline void DateTime::reset() { - for ( int i=0; i < XMLDateTime::TOTAL_SIZE; i++ ) + for ( int i=0; i < xercesc::XMLDateTime::TOTAL_SIZE; i++ ) fValue[i] = 0; fMiliSecond = 0; @@ -188,7 +188,7 @@ namespace xmltooling inline void DateTime::copy(const DateTime& rhs) { - for ( int i = 0; i < XMLDateTime::TOTAL_SIZE; i++ ) + for ( int i = 0; i < xercesc::XMLDateTime::TOTAL_SIZE; i++ ) fValue[i] = rhs.fValue[i]; fMiliSecond = rhs.fMiliSecond; @@ -216,16 +216,16 @@ namespace xmltooling inline bool DateTime::isNormalized() const { - return (fValue[XMLDateTime::utc] == XMLDateTime::UTC_STD ? true : false); + return (fValue[xercesc::XMLDateTime::utc] == xercesc::XMLDateTime::UTC_STD ? true : false); } inline int DateTime::getRetVal(int c1, int c2) { - if ((c1 == XMLDateTime::LESS_THAN && c2 == XMLDateTime::GREATER_THAN) || - (c1 == XMLDateTime::GREATER_THAN && c2 == XMLDateTime::LESS_THAN)) - return XMLDateTime::INDETERMINATE; + if ((c1 == xercesc::XMLDateTime::LESS_THAN && c2 == xercesc::XMLDateTime::GREATER_THAN) || + (c1 == xercesc::XMLDateTime::GREATER_THAN && c2 == xercesc::XMLDateTime::LESS_THAN)) + return xercesc::XMLDateTime::INDETERMINATE; - return (c1 != XMLDateTime::INDETERMINATE) ? c1 : c2; + return (c1 != xercesc::XMLDateTime::INDETERMINATE) ? c1 : c2; } } diff --git a/xmltooling/util/ParserPool.h b/xmltooling/util/ParserPool.h index 2b68438..00ebbd3 100644 --- a/xmltooling/util/ParserPool.h +++ b/xmltooling/util/ParserPool.h @@ -33,8 +33,6 @@ #include #include -using namespace xercesc; - #if defined (_MSC_VER) #pragma warning( push ) #pragma warning( disable : 4250 4251 ) @@ -45,7 +43,7 @@ namespace xmltooling { /** * A thread-safe pool of DOMBuilders that share characteristics */ - class XMLTOOL_API ParserPool : public DOMEntityResolver, DOMErrorHandler + class XMLTOOL_API ParserPool : public xercesc::DOMEntityResolver, xercesc::DOMErrorHandler { MAKE_NONCOPYABLE(ParserPool); public: @@ -64,7 +62,7 @@ namespace xmltooling { * @return new XML document * */ - DOMDocument* newDocument(); + xercesc::DOMDocument* newDocument(); /** * Parses a document using a pooled parser with the proper settings @@ -73,7 +71,7 @@ namespace xmltooling { * @return The DOM document resulting from the parse * @throws XMLParserException thrown if there was a problem reading, parsing, or validating the XML */ - DOMDocument* parse(DOMInputSource& domsrc); + xercesc::DOMDocument* parse(xercesc::DOMInputSource& domsrc); /** * Parses a document using a pooled parser with the proper settings @@ -82,7 +80,7 @@ namespace xmltooling { * @return The DOM document resulting from the parse * @throws XMLParserException thrown if there was a problem reading, parsing, or validating the XML */ - DOMDocument* parse(std::istream& is); + xercesc::DOMDocument* parse(std::istream& is); /** * Load an OASIS catalog file to map schema namespace URIs to filenames. @@ -110,17 +108,17 @@ namespace xmltooling { /** * Supplies all external entities (primarily schemas) to the parser */ - DOMInputSource* resolveEntity(const XMLCh* const publicId, const XMLCh* const systemId, const XMLCh* const baseURI); + xercesc::DOMInputSource* resolveEntity(const XMLCh* const publicId, const XMLCh* const systemId, const XMLCh* const baseURI); /** * Handles parsing errors */ - bool handleError(const DOMError& e); + bool handleError(const xercesc::DOMError& e); private: - DOMBuilder* createBuilder(); - DOMBuilder* checkoutBuilder(); - void checkinBuilder(DOMBuilder* builder); + xercesc::DOMBuilder* createBuilder(); + xercesc::DOMBuilder* checkoutBuilder(); + void checkinBuilder(xercesc::DOMBuilder* builder); #ifdef HAVE_GOOD_STL xstring m_schemaLocations; @@ -130,14 +128,14 @@ namespace xmltooling { std::map m_schemaLocMap; #endif bool m_namespaceAware,m_schemaAware; - std::stack m_pool; + std::stack m_pool; Mutex* m_lock; }; /** * A parser source that wraps a C++ input stream */ - class XMLTOOL_API StreamInputSource : public InputSource + class XMLTOOL_API StreamInputSource : public xercesc::InputSource { MAKE_NONCOPYABLE(StreamInputSource); public: @@ -147,15 +145,15 @@ namespace xmltooling { * @param is reference to an input stream * @param systemId optional system identifier to attach to the stream */ - StreamInputSource(std::istream& is, const char* systemId=NULL) : InputSource(systemId), m_is(is) {} + StreamInputSource(std::istream& is, const char* systemId=NULL) : xercesc::InputSource(systemId), m_is(is) {} /// @cond off - virtual BinInputStream* makeStream() const { return new StreamBinInputStream(m_is); } + virtual xercesc::BinInputStream* makeStream() const { return new StreamBinInputStream(m_is); } /// @endcond /** * A Xerces input stream that wraps a C++ input stream */ - class XMLTOOL_API StreamBinInputStream : public BinInputStream + class XMLTOOL_API StreamBinInputStream : public xercesc::BinInputStream { public: /** diff --git a/xmltooling/util/XMLHelper.h b/xmltooling/util/XMLHelper.h index 66ce0ab..a3b587b 100644 --- a/xmltooling/util/XMLHelper.h +++ b/xmltooling/util/XMLHelper.h @@ -28,8 +28,6 @@ #include -using namespace xercesc; - namespace xmltooling { /** @@ -94,7 +92,7 @@ namespace xmltooling { * @param e the DOM element * @return true if there is a type, false if not */ - static bool hasXSIType(const DOMElement* e); + static bool hasXSIType(const xercesc::DOMElement* e); /** * Gets the XSI type for a given element if it has one. @@ -102,7 +100,7 @@ namespace xmltooling { * @param e the element * @return the type or null */ - static QName* getXSIType(const DOMElement* e); + static QName* getXSIType(const xercesc::DOMElement* e); /** * Gets the ID attribute of a DOM element. @@ -110,7 +108,7 @@ namespace xmltooling { * @param domElement the DOM element * @return the ID attribute or null if there isn't one */ - static DOMAttr* getIdAttribute(const DOMElement* domElement); + static xercesc::DOMAttr* getIdAttribute(const xercesc::DOMElement* domElement); /** * Attempts to locate an XMLObject from this point downward in the tree whose @@ -129,7 +127,7 @@ namespace xmltooling { * @param domNode the DOM node * @return the QName for the element or null if the element was null */ - static QName* getNodeQName(const DOMNode* domNode); + static QName* getNodeQName(const xercesc::DOMNode* domNode); /** * Constructs a QName from an attribute's value. @@ -137,7 +135,7 @@ namespace xmltooling { * @param attribute the attribute with a QName value * @return a QName from an attribute's value, or null if the given attribute is null */ - static QName* getAttributeValueAsQName(const DOMAttr* attribute); + static QName* getAttributeValueAsQName(const xercesc::DOMAttr* attribute); /** * Appends the child Element to the parent Element, @@ -147,7 +145,7 @@ namespace xmltooling { * @param childElement the child Element * @return the child Element that was added (may be an imported copy) */ - static DOMElement* appendChildElement(DOMElement* parentElement, DOMElement* childElement); + static xercesc::DOMElement* appendChildElement(xercesc::DOMElement* parentElement, xercesc::DOMElement* childElement); /** * Checks the qualified name of a node. @@ -157,8 +155,8 @@ namespace xmltooling { * @param local local name to compare with * @return true iff the node's qualified name matches the other parameters */ - static bool isNodeNamed(const DOMNode* n, const XMLCh* ns, const XMLCh* local) { - return (n && XMLString::equals(local,n->getLocalName()) && XMLString::equals(ns,n->getNamespaceURI())); + static bool isNodeNamed(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* local) { + return (n && xercesc::XMLString::equals(local,n->getLocalName()) && xercesc::XMLString::equals(ns,n->getNamespaceURI())); } /** @@ -168,7 +166,7 @@ namespace xmltooling { * @param localName local name to compare with or NULL for any match * @return the first matching child node of type Element, or NULL */ - static DOMElement* getFirstChildElement(const DOMNode* n, const XMLCh* localName=NULL); + static xercesc::DOMElement* getFirstChildElement(const xercesc::DOMNode* n, const XMLCh* localName=NULL); /** * Returns the last matching child element of the node if any. @@ -177,7 +175,7 @@ namespace xmltooling { * @param localName local name to compare with or NULL for any match * @return the last matching child node of type Element, or NULL */ - static DOMElement* getLastChildElement(const DOMNode* n, const XMLCh* localName=NULL); + static xercesc::DOMElement* getLastChildElement(const xercesc::DOMNode* n, const XMLCh* localName=NULL); /** * Returns the next matching sibling element of the node if any. @@ -186,7 +184,7 @@ namespace xmltooling { * @param localName local name to compare with or NULL for any match * @return the next matching sibling node of type Element, or NULL */ - static DOMElement* getNextSiblingElement(const DOMNode* n, const XMLCh* localName=NULL); + static xercesc::DOMElement* getNextSiblingElement(const xercesc::DOMNode* n, const XMLCh* localName=NULL); /** * Returns the previous matching sibling element of the node if any. @@ -195,7 +193,7 @@ namespace xmltooling { * @param localName local name to compare with or NULL for any match * @return the previous matching sibling node of type Element, or NULL */ - static DOMElement* getPreviousSiblingElement(const DOMNode* n, const XMLCh* localName=NULL); + static xercesc::DOMElement* getPreviousSiblingElement(const xercesc::DOMNode* n, const XMLCh* localName=NULL); /** * Returns the first matching child element of the node if any. @@ -205,7 +203,7 @@ namespace xmltooling { * @param localName local name to compare with * @return the first matching child node of type Element, or NULL */ - static DOMElement* getFirstChildElement(const DOMNode* n, const XMLCh* ns, const XMLCh* localName); + static xercesc::DOMElement* getFirstChildElement(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* localName); /** * Returns the last matching child element of the node if any. @@ -215,7 +213,7 @@ namespace xmltooling { * @param localName local name to compare with * @return the last matching child node of type Element, or NULL */ - static DOMElement* getLastChildElement(const DOMNode* n, const XMLCh* ns, const XMLCh* localName); + static xercesc::DOMElement* getLastChildElement(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* localName); /** * Returns the next matching sibling element of the node if any. @@ -225,7 +223,7 @@ namespace xmltooling { * @param localName local name to compare with * @return the next matching sibling node of type Element, or NULL */ - static DOMElement* getNextSiblingElement(const DOMNode* n, const XMLCh* ns, const XMLCh* localName); + static xercesc::DOMElement* getNextSiblingElement(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* localName); /** * Returns the previous matching sibling element of the node if any. @@ -235,7 +233,7 @@ namespace xmltooling { * @param localName local name to compare with * @return the previous matching sibling node of type Element, or NULL */ - static DOMElement* getPreviousSiblingElement(const DOMNode* n, const XMLCh* ns, const XMLCh* localName); + static xercesc::DOMElement* getPreviousSiblingElement(const xercesc::DOMNode* n, const XMLCh* ns, const XMLCh* localName); /** * Returns the content of the first Text node found in the element, if any. @@ -245,7 +243,7 @@ namespace xmltooling { * @param e element to examine * @return the content of the first Text node found, or NULL */ - static const XMLCh* getTextContent(const DOMElement* e); + static const XMLCh* getTextContent(const xercesc::DOMElement* e); /** * Serializes the DOM node provided into a buffer using UTF-8 encoding and @@ -254,7 +252,7 @@ namespace xmltooling { * @param n node to serialize * @param buf buffer to serialize element into */ - static void serialize(const DOMNode* n, std::string& buf); + static void serialize(const xercesc::DOMNode* n, std::string& buf); /** * Serializes the DOM node provided to a stream using UTF-8 encoding and @@ -264,7 +262,7 @@ namespace xmltooling { * @param out stream to serialize element into * @return reference to output stream */ - static std::ostream& serialize(const DOMNode* n, std::ostream& out); + static std::ostream& serialize(const xercesc::DOMNode* n, std::ostream& out); }; /** @@ -275,7 +273,7 @@ namespace xmltooling { * @param ostr stream to serialize element into * @return reference to output stream */ - extern XMLTOOL_API std::ostream& operator<<(std::ostream& ostr, const DOMNode& n); + extern XMLTOOL_API std::ostream& operator<<(std::ostream& ostr, const xercesc::DOMNode& n); /** * Marshalls and serializes the XMLObject provided to a stream using UTF-8 encoding and diff --git a/xmltoolingtest/XMLObjectBaseTestCase.h b/xmltoolingtest/XMLObjectBaseTestCase.h index 3eebe23..d0b3b89 100644 --- a/xmltoolingtest/XMLObjectBaseTestCase.h +++ b/xmltoolingtest/XMLObjectBaseTestCase.h @@ -35,6 +35,7 @@ #endif using namespace xmltooling; +using namespace xercesc; using namespace std; extern string data_path; @@ -122,14 +123,14 @@ public: } protected: - void marshallAttributes(DOMElement* domElement) const { + void marshallAttributes(xercesc::DOMElement* domElement) const { if(getId()) { domElement->setAttributeNS(NULL, SimpleXMLObject::ID_ATTRIB_NAME, getId()); domElement->setIdAttributeNS(NULL, SimpleXMLObject::ID_ATTRIB_NAME); } } - void processChildElement(XMLObject* childXMLObject, const DOMElement* root) { + void processChildElement(XMLObject* childXMLObject, const xercesc::DOMElement* root) { SimpleXMLObject* simple=dynamic_cast(childXMLObject); if (simple) { getSimpleXMLObjects().push_back(simple); @@ -147,7 +148,7 @@ protected: throw UnmarshallingException("Unknown child element cannot be added to parent object."); } - void processAttribute(const DOMAttr* attribute) { + void processAttribute(const xercesc::DOMAttr* attribute) { if (XMLHelper::isNodeNamed(attribute, NULL, SimpleXMLObject::ID_ATTRIB_NAME)) setId(attribute->getValue()); else