diff --git a/examples/DOM/DOMWriter.cpp b/examples/DOM/DOMWriter.cpp index 72a2b63d..ec31400a 100644 --- a/examples/DOM/DOMWriter.cpp +++ b/examples/DOM/DOMWriter.cpp @@ -21,13 +21,13 @@ int main(int argc, char* argv[]) { // narrow SAX2DOM::Parser domParser; - SAX::CatchErrorHandler eh; + Arabica::SAX::CatchErrorHandler eh; domParser.setErrorHandler(eh); for(int i = 1; i < argc; ++i) { std::string file(argv[i]); - SAX::InputSource is; + Arabica::SAX::InputSource is; is.setSystemId(file); if(file != "-") @@ -59,7 +59,7 @@ int main(int argc, char* argv[]) { // wide SAX2DOM::Parser domParser; - SAX::wInputSource is; + Arabica::SAX::wInputSource is; is.setSystemId(L"stdin"); is.setByteStream(std::cin); diff --git a/examples/SAX/SimpleHandler.cpp b/examples/SAX/SimpleHandler.cpp index dcd54a58..9809c0af 100644 --- a/examples/SAX/SimpleHandler.cpp +++ b/examples/SAX/SimpleHandler.cpp @@ -7,9 +7,9 @@ ////////////////////////////////////////////// // EntityResolver -SAX::InputSource SimpleHandler::resolveEntity(const std::string& publicId, const std::string& systemId) +Arabica::SAX::InputSource SimpleHandler::resolveEntity(const std::string& publicId, const std::string& systemId) { - return SAX::InputSource(); + return Arabica::SAX::InputSource(); } // resolveEntity ////////////////////////////////////////////// @@ -57,7 +57,7 @@ void SimpleHandler::endPrefixMapping(const std::string& prefix) } // startPrefixMapping void SimpleHandler::startElement(const std::string& namespaceURI, const std::string& localName, - const std::string& qName, const SAX::Attributes& atts) + const std::string& qName, const Arabica::SAX::Attributes& atts) { if(localName.length()) std::cout << "Start Element: " << namespaceURI << ":" << localName << std::endl; @@ -93,17 +93,17 @@ void SimpleHandler::skippedEntity(const std::string& name) ///////////////////////////////////////////////////// // ErrorHandler -void SimpleHandler::warning(const SAX::SAXParseException& exception) +void SimpleHandler::warning(const Arabica::SAX::SAXParseException& exception) { std::cerr << "WARNING: " << exception.what() << std::endl; } // warning -void SimpleHandler::error(const SAX::SAXParseException& exception) +void SimpleHandler::error(const Arabica::SAX::SAXParseException& exception) { std::cerr << "ERROR : " << exception.what() << std::endl; } // error -void SimpleHandler::fatalError(const SAX::SAXParseException& exception) +void SimpleHandler::fatalError(const Arabica::SAX::SAXParseException& exception) { std::cerr << "FATAL : " << exception.what() << std::endl; } // fatalError diff --git a/examples/SAX/SimpleHandler.hpp b/examples/SAX/SimpleHandler.hpp index d874f2f7..6ec48ac6 100644 --- a/examples/SAX/SimpleHandler.hpp +++ b/examples/SAX/SimpleHandler.hpp @@ -13,12 +13,12 @@ #include #include -class SimpleHandler : public SAX::EntityResolver, - public SAX::DTDHandler, - public SAX::ContentHandler, - public SAX::ErrorHandler, - public SAX::LexicalHandler, - public SAX::DeclHandler +class SimpleHandler : public Arabica::SAX::EntityResolver, + public Arabica::SAX::DTDHandler, + public Arabica::SAX::ContentHandler, + public Arabica::SAX::ErrorHandler, + public Arabica::SAX::LexicalHandler, + public Arabica::SAX::DeclHandler { public: SimpleHandler() { } @@ -26,7 +26,7 @@ public: ////////////////////////////////////////////// // EntityResolver - virtual SAX::InputSource resolveEntity(const std::string& publicId, const std::string& systemId); + virtual Arabica::SAX::InputSource resolveEntity(const std::string& publicId, const std::string& systemId); ////////////////////////////////////////////// // DTDHandler @@ -56,9 +56,9 @@ public: ///////////////////////////////////////////////////// // ErrorHandler - virtual void warning(const SAX::SAXParseException&); - virtual void error(const SAX::SAXParseException&); - virtual void fatalError(const SAX::SAXParseException& exception); + virtual void warning(const Arabica::SAX::SAXParseException&); + virtual void error(const Arabica::SAX::SAXParseException&); + virtual void fatalError(const Arabica::SAX::SAXParseException& exception); /////////////////////////////////////////////////////// // LexicalHandler diff --git a/examples/SAX/pyx.cpp b/examples/SAX/pyx.cpp index 4ad42e00..d626f3ff 100644 --- a/examples/SAX/pyx.cpp +++ b/examples/SAX/pyx.cpp @@ -19,18 +19,18 @@ #include #include -class SAX2PYX : public SAX::DefaultHandler +class SAX2PYX : public Arabica::SAX::DefaultHandler { public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, - const std::string& qName, const SAX::Attributes& atts); + const std::string& qName, const Arabica::SAX::Attributes& atts); virtual void endElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName); virtual void characters(const std::string& ch); virtual void processingInstruction(const std::string& target, const std::string& data); - virtual void warning(const SAX::SAXParseException& e) { fatalError(e); } - virtual void error(const SAX::SAXParseException& e) { fatalError(e); } + virtual void warning(const Arabica::SAX::SAXParseException& e) { fatalError(e); } + virtual void error(const Arabica::SAX::SAXParseException& e) { fatalError(e); } private: std::string escape(const std::string& str) const; @@ -50,12 +50,12 @@ int main(int argc, char* argv[]) { try { - SAX::XMLReader myParser; + Arabica::SAX::XMLReader myParser; myParser.setContentHandler(handler); myParser.setErrorHandler(handler); myParser.setFeature("prohibit-dtd", false); - SAX::InputSource is(argv[i]); + Arabica::SAX::InputSource is(argv[i]); myParser.parse(is); } // try catch(std::runtime_error& e) @@ -69,7 +69,7 @@ int main(int argc, char* argv[]) void SAX2PYX::startElement(const std::string&, const std::string& localName, - const std::string&, const SAX::Attributes& atts) + const std::string&, const Arabica::SAX::Attributes& atts) { std::cout << '(' << localName << std::endl; diff --git a/examples/SAX/wrapper.cpp b/examples/SAX/wrapper.cpp index aaf6171a..36f3d63c 100644 --- a/examples/SAX/wrapper.cpp +++ b/examples/SAX/wrapper.cpp @@ -19,12 +19,12 @@ int main(int argc, char* argv[]) } // if(argc == 0) SimpleHandler myHandler; - SAX::FeatureNames fNames; - SAX::PropertyNames pNames; + Arabica::SAX::FeatureNames fNames; + Arabica::SAX::PropertyNames pNames; for(int i = 1; i < argc; ++i) { - SAX::XMLReader parser; + Arabica::SAX::XMLReader parser; try { @@ -33,7 +33,7 @@ int main(int argc, char* argv[]) parser.setFeature(fNames.namespaces, true); parser.setFeature(fNames.namespace_prefixes, true); } - catch(SAX::SAXException& e) + catch(Arabica::SAX::SAXException& e) { std::cerr << e.what() << std::endl; } @@ -49,12 +49,12 @@ int main(int argc, char* argv[]) if(file != "-") { - SAX::InputSource is(file); + Arabica::SAX::InputSource is(file); parser.parse(is); } else { - SAX::InputSource is; + Arabica::SAX::InputSource is; is.setSystemId("stdin"); is.setByteStream(std::cin); diff --git a/examples/SAX/writer.cpp b/examples/SAX/writer.cpp index 328b5e85..161d62a1 100644 --- a/examples/SAX/writer.cpp +++ b/examples/SAX/writer.cpp @@ -19,10 +19,10 @@ int main(int argc, char* argv[]) } // if(argc < 2) { // narrow - SAX::FeatureNames fNames; - SAX::XMLReader parser; - SAX::Writer writer(std::cout, 4); - SAX::CatchErrorHandler eh; + Arabica::SAX::FeatureNames fNames; + Arabica::SAX::XMLReader parser; + Arabica::SAX::Writer writer(std::cout, 4); + Arabica::SAX::CatchErrorHandler eh; writer.setParent(parser); writer.setErrorHandler(eh); @@ -30,7 +30,7 @@ int main(int argc, char* argv[]) for(int i = 1; i < argc; ++i) { std::string file(argv[i]); - SAX::InputSource is; + Arabica::SAX::InputSource is; is.setSystemId(file); if(file != "-") diff --git a/examples/SAX/xmlbase.cpp b/examples/SAX/xmlbase.cpp index fadd6c9b..ab523699 100644 --- a/examples/SAX/xmlbase.cpp +++ b/examples/SAX/xmlbase.cpp @@ -18,19 +18,19 @@ #include #include -class hrefPrinter : public SAX::DefaultHandler +class hrefPrinter : public Arabica::SAX::DefaultHandler { public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, - const std::string& qName, const SAX::Attributes& atts); + const std::string& qName, const Arabica::SAX::Attributes& atts); virtual void endElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName); - virtual void warning(const SAX::SAXParseException& e) { fatalError(e); } - virtual void error(const SAX::SAXParseException& e) { fatalError(e); } + virtual void warning(const Arabica::SAX::SAXParseException& e) { fatalError(e); } + virtual void error(const Arabica::SAX::SAXParseException& e) { fatalError(e); } private: - SAX::XMLBaseSupport xmlbaseTracker_; + Arabica::SAX::XMLBaseSupport xmlbaseTracker_; }; // class SimpleHandler int main(int argc, char* argv[]) @@ -47,11 +47,11 @@ int main(int argc, char* argv[]) { try { - SAX::XMLReader myParser; + Arabica::SAX::XMLReader myParser; myParser.setContentHandler(handler); myParser.setErrorHandler(handler); - SAX::InputSource is(argv[i]); + Arabica::SAX::InputSource is(argv[i]); myParser.parse(is); } // try catch(std::runtime_error& e) @@ -65,7 +65,7 @@ int main(int argc, char* argv[]) void hrefPrinter::startElement(const std::string&, const std::string& localName, - const std::string&, const SAX::Attributes& atts) + const std::string&, const Arabica::SAX::Attributes& atts) { xmlbaseTracker_.startElement(atts); diff --git a/examples/XPath/xgrep.cpp b/examples/XPath/xgrep.cpp index dad50422..eab351b3 100644 --- a/examples/XPath/xgrep.cpp +++ b/examples/XPath/xgrep.cpp @@ -33,13 +33,13 @@ int main(int argc, char* argv[]) SAX2DOM::Parser domParser; - SAX::CatchErrorHandler eh; + Arabica::SAX::CatchErrorHandler eh; domParser.setErrorHandler(eh); for(int i = 2; i < argc; ++i) { std::string file(argv[i]); - SAX::InputSource is; + Arabica::SAX::InputSource is; is.setSystemId(file); if(file != "-") diff --git a/examples/XSLT/mangle.cpp b/examples/XSLT/mangle.cpp index 03bb6cf2..3d861bd2 100755 --- a/examples/XSLT/mangle.cpp +++ b/examples/XSLT/mangle.cpp @@ -33,7 +33,7 @@ int main(int argc, const char* argv[]) std::ostringstream errors; try { - SAX::InputSource source(argv[2]); + Arabica::SAX::InputSource source(argv[2]); std::auto_ptr stylesheet = compiler.compile(source); if(stylesheet.get() == 0) { @@ -64,7 +64,7 @@ int main(int argc, const char* argv[]) DOM::Document buildDOM(const std::string& filename) { - SAX::InputSource is(filename); + Arabica::SAX::InputSource is(filename); SAX2DOM::Parser parser; parser.parse(is); diff --git a/include/DOM/DualMode/DualMode.hpp b/include/DOM/DualMode/DualMode.hpp index 67d22277..73c3fcd8 100644 --- a/include/DOM/DualMode/DualMode.hpp +++ b/include/DOM/DualMode/DualMode.hpp @@ -8,7 +8,7 @@ namespace DualMode { template, - class SAX_parser = SAX::XMLReader > + class SAX_parser = Arabica::SAX::XMLReader > class Parser : public SAX2DOM::Parser { typedef SAX2DOM::Parser BaseT; diff --git a/include/DOM/SAX2DOM/SAX2DOM.hpp b/include/DOM/SAX2DOM/SAX2DOM.hpp index b1bb4416..5e89dc43 100644 --- a/include/DOM/SAX2DOM/SAX2DOM.hpp +++ b/include/DOM/SAX2DOM/SAX2DOM.hpp @@ -20,18 +20,18 @@ namespace SAX2DOM template, - class SAX_parser = SAX::XMLReader > -class Parser : protected SAX::basic_DefaultHandler + class SAX_parser = Arabica::SAX::XMLReader > +class Parser : protected Arabica::SAX::basic_DefaultHandler { - typedef SAX::basic_EntityResolver EntityResolverT; - typedef SAX::basic_ErrorHandler ErrorHandlerT; - typedef SAX::basic_LexicalHandler LexicalHandlerT; - typedef SAX::basic_DeclHandler DeclHandlerT; - typedef SAX::basic_InputSource InputSourceT; + typedef Arabica::SAX::basic_EntityResolver EntityResolverT; + typedef Arabica::SAX::basic_ErrorHandler ErrorHandlerT; + typedef Arabica::SAX::basic_LexicalHandler LexicalHandlerT; + typedef Arabica::SAX::basic_DeclHandler DeclHandlerT; + typedef Arabica::SAX::basic_InputSource InputSourceT; typedef SimpleDOM::EntityImpl EntityT; typedef SimpleDOM::NotationImpl NotationT; typedef SimpleDOM::ElementImpl ElementT; - typedef typename SAX::basic_ErrorHandler::SAXParseExceptionT SAXParseExceptionT; + typedef typename Arabica::SAX::basic_ErrorHandler::SAXParseExceptionT SAXParseExceptionT; public: Parser() : @@ -39,7 +39,7 @@ class Parser : protected SAX::basic_DefaultHandler errorHandler_(0), documentType_(0) { - SAX::FeatureNames fNames; + Arabica::SAX::FeatureNames fNames; features_.insert(std::make_pair(fNames.namespaces, true)); features_.insert(std::make_pair(fNames.namespace_prefixes, true)); features_.insert(std::make_pair(fNames.validation, false)); @@ -64,7 +64,7 @@ class Parser : protected SAX::basic_DefaultHandler { typename Features::const_iterator f = features_.find(name); if(f == features_.end()) - throw SAX::SAXNotRecognizedException(std::string("Feature not recognized ") + string_adaptorT::asStdString(name)); + throw Arabica::SAX::SAXNotRecognizedException(std::string("Feature not recognized ") + string_adaptorT::asStdString(name)); return f->second; } // getFeature @@ -76,7 +76,7 @@ class Parser : protected SAX::basic_DefaultHandler bool parse(InputSourceT& source) { - SAX::PropertyNames pNames; + Arabica::SAX::PropertyNames pNames; DOM::DOMImplementation di = SimpleDOM::DOMImplementation::getDOMImplementation(); document_ = di.createDocument(string_adaptorT::construct_from_utf8(""), string_adaptorT::construct_from_utf8(""), 0); @@ -151,7 +151,7 @@ class Parser : protected SAX::basic_DefaultHandler EntityResolverT* entityResolver_; ErrorHandlerT* errorHandler_; - SAX::AttributeTypes attributeTypes_; + Arabica::SAX::AttributeTypes attributeTypes_; protected: template @@ -165,7 +165,7 @@ class Parser : protected SAX::basic_DefaultHandler parser.setProperty(propertyName, *(interfaceT*)this); #endif } // try - catch(SAX::SAXException&) { } + catch(Arabica::SAX::SAXException&) { } } // setParserProperty void setParserFeatures(SAX_parser& parser) const @@ -174,7 +174,7 @@ class Parser : protected SAX::basic_DefaultHandler try { parser.setFeature(f->first, f->second); } - catch(const SAX::SAXException&) { } + catch(const Arabica::SAX::SAXException&) { } } // setParserFeatures /////////////////////////////////////////////////////////// @@ -185,7 +185,7 @@ class Parser : protected SAX::basic_DefaultHandler } // endDocument virtual void startElement(const stringT& namespaceURI, const stringT& localName, - const stringT& qName, const SAX::basic_Attributes& atts) + const stringT& qName, const Arabica::SAX::basic_Attributes& atts) { if(currentNode_ == 0) return; diff --git a/include/SAX/AttributeList.hpp b/include/SAX/AttributeList.hpp index 04ca95ea..b0186b43 100644 --- a/include/SAX/AttributeList.hpp +++ b/include/SAX/AttributeList.hpp @@ -8,6 +8,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -189,7 +191,8 @@ typedef basic_AttributeList AttributeList; typedef basic_AttributeList wAttributeList; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/Attributes.hpp b/include/SAX/Attributes.hpp index 85cbc4fa..fa85a152 100644 --- a/include/SAX/Attributes.hpp +++ b/include/SAX/Attributes.hpp @@ -8,6 +8,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -230,7 +232,8 @@ typedef basic_Attributes Attributes; typedef basic_Attributes wAttributes; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/ContentHandler.hpp b/include/SAX/ContentHandler.hpp index 2c4c8e16..ac8258e0 100644 --- a/include/SAX/ContentHandler.hpp +++ b/include/SAX/ContentHandler.hpp @@ -8,6 +8,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -337,7 +339,8 @@ typedef basic_ContentHandler ContentHandler; typedef basic_ContentHandler wContentHandler; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/DTDHandler.hpp b/include/SAX/DTDHandler.hpp index 6a0046fd..dd470999 100644 --- a/include/SAX/DTDHandler.hpp +++ b/include/SAX/DTDHandler.hpp @@ -8,6 +8,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -124,7 +126,8 @@ typedef basic_DTDHandler DTDHandler; typedef basic_DTDHandler wDTDHandler; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/DocumentHandler.hpp b/include/SAX/DocumentHandler.hpp index 878fd5f0..40ea7c25 100644 --- a/include/SAX/DocumentHandler.hpp +++ b/include/SAX/DocumentHandler.hpp @@ -5,6 +5,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -72,7 +74,8 @@ typedef basic_DocumentHandler DocumentHandler; typedef basic_DocumentHandler wDocumentHandler; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/EntityResolver.hpp b/include/SAX/EntityResolver.hpp index b6bdd0df..d83cee66 100644 --- a/include/SAX/EntityResolver.hpp +++ b/include/SAX/EntityResolver.hpp @@ -10,6 +10,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -114,7 +116,8 @@ typedef basic_EntityResolver EntityResolver; typedef basic_EntityResolver wEntityResolver; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/ErrorHandler.hpp b/include/SAX/ErrorHandler.hpp index 48d07b72..1107b7bb 100644 --- a/include/SAX/ErrorHandler.hpp +++ b/include/SAX/ErrorHandler.hpp @@ -10,6 +10,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -120,7 +122,8 @@ typedef basic_ErrorHandler ErrorHandler; typedef basic_ErrorHandler wErrorHandler; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif //end of file diff --git a/include/SAX/HandlerBase.hpp b/include/SAX/HandlerBase.hpp index 0ede8a37..9287e6c5 100644 --- a/include/SAX/HandlerBase.hpp +++ b/include/SAX/HandlerBase.hpp @@ -15,6 +15,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -287,7 +289,8 @@ typedef basic_HandlerBase HandlerBase; typedef basic_HandlerBase wHandlerBase; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/IStreamHandle.hpp b/include/SAX/IStreamHandle.hpp index b6dc701e..11cdbf8d 100644 --- a/include/SAX/IStreamHandle.hpp +++ b/include/SAX/IStreamHandle.hpp @@ -21,6 +21,7 @@ #define ISTREAMHANDLE_POSTCONDITION(x) do {} while (false) #endif +namespace Arabica { namespace SAX { /** Reference-counting pointer to std::istream. @@ -445,6 +446,7 @@ void IStreamHandle::removeRef() } } // namespace SAX +} // namespace Arabica #endif /* SAX_ISTREAMHANDLE_H */ diff --git a/include/SAX/InputSource.hpp b/include/SAX/InputSource.hpp index bcb59867..7cbff258 100644 --- a/include/SAX/InputSource.hpp +++ b/include/SAX/InputSource.hpp @@ -10,6 +10,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -334,7 +336,8 @@ typedef basic_InputSource InputSource; typedef basic_InputSource wInputSource; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // #define InputSourceH // end of file diff --git a/include/SAX/Locator.hpp b/include/SAX/Locator.hpp index 5af98e45..6c3dd75f 100644 --- a/include/SAX/Locator.hpp +++ b/include/SAX/Locator.hpp @@ -8,6 +8,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -127,7 +129,8 @@ typedef basic_Locator Locator; typedef basic_Locator wLocator; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/Parser.hpp b/include/SAX/Parser.hpp index 06a7b817..b07fdc07 100644 --- a/include/SAX/Parser.hpp +++ b/include/SAX/Parser.hpp @@ -12,6 +12,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -161,7 +163,8 @@ typedef basic_Parser Parser; typedef basic_Parser wParser; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/ParserConfig.hpp b/include/SAX/ParserConfig.hpp index ce04404d..fb90fa78 100644 --- a/include/SAX/ParserConfig.hpp +++ b/include/SAX/ParserConfig.hpp @@ -61,6 +61,8 @@ #ifndef NO_DEFAULT_PARSER #ifdef DEF_SAX_P +namespace Arabica +{ namespace SAX { #ifdef HAVE_BOOST @@ -74,6 +76,7 @@ namespace SAX #endif class XMLReader : public DEF_SAX_P { }; } // namespace SAX +} // namespace Arabica #else #error "No default parser defined." #endif diff --git a/include/SAX/SAXException.hpp b/include/SAX/SAXException.hpp index 53f182f0..7d4edb54 100644 --- a/include/SAX/SAXException.hpp +++ b/include/SAX/SAXException.hpp @@ -8,6 +8,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -60,6 +62,7 @@ private: bool operator==(const SAXException&); }; // class SAXException -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // SAXExceptionH diff --git a/include/SAX/SAXNotRecognizedException.hpp b/include/SAX/SAXNotRecognizedException.hpp index b0be05ba..77e4a0f9 100644 --- a/include/SAX/SAXNotRecognizedException.hpp +++ b/include/SAX/SAXNotRecognizedException.hpp @@ -7,6 +7,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -46,6 +48,7 @@ public: }; // class SAXNotRecognizedException } // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/SAXNotSupportedException.hpp b/include/SAX/SAXNotSupportedException.hpp index 9af5b47f..8d0cf5bb 100644 --- a/include/SAX/SAXNotSupportedException.hpp +++ b/include/SAX/SAXNotSupportedException.hpp @@ -7,6 +7,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -48,6 +50,7 @@ public: }; // class SAXNotSupportedException } // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/SAXParseException.hpp b/include/SAX/SAXParseException.hpp index 6c45fcca..bf83f8b0 100644 --- a/include/SAX/SAXParseException.hpp +++ b/include/SAX/SAXParseException.hpp @@ -9,6 +9,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -168,7 +170,8 @@ typedef basic_SAXParseException SAXParseException; typedef basic_SAXParseException wSAXParseException; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/XMLFilter.hpp b/include/SAX/XMLFilter.hpp index 84d0426e..cce32a4f 100644 --- a/include/SAX/XMLFilter.hpp +++ b/include/SAX/XMLFilter.hpp @@ -9,6 +9,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -68,7 +70,8 @@ typedef basic_XMLFilter XMLFilter; typedef basic_XMLFilter wXMLFilter; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/XMLReader.hpp b/include/SAX/XMLReader.hpp index d7177ff4..31980bf4 100644 --- a/include/SAX/XMLReader.hpp +++ b/include/SAX/XMLReader.hpp @@ -18,7 +18,8 @@ #include #include - +namespace Arabica +{ namespace SAX { @@ -432,7 +433,8 @@ public: } // setProperty }; // class basic_XMLReader -}; // namespace SAX +} // namespace SAX +} // namespace Arabica /* Included to ensure that #include defines a class called * XMLReader. diff --git a/include/SAX/ext/Attributes2.hpp b/include/SAX/ext/Attributes2.hpp index 04fcac57..a8f6c3c6 100644 --- a/include/SAX/ext/Attributes2.hpp +++ b/include/SAX/ext/Attributes2.hpp @@ -7,6 +7,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -75,7 +77,8 @@ typedef basic_Attributes2 Attributes2; typedef basic_Attributes2 wAttributes2; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/ext/DeclHandler.hpp b/include/SAX/ext/DeclHandler.hpp index 8c6df60d..f05fd3c7 100644 --- a/include/SAX/ext/DeclHandler.hpp +++ b/include/SAX/ext/DeclHandler.hpp @@ -7,6 +7,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -131,7 +133,8 @@ typedef basic_DeclHandler DeclHandler; typedef basic_DeclHandler wDeclHandler; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/ext/DefaultHandler2.hpp b/include/SAX/ext/DefaultHandler2.hpp index dda7b9aa..8ecc2eb8 100644 --- a/include/SAX/ext/DefaultHandler2.hpp +++ b/include/SAX/ext/DefaultHandler2.hpp @@ -11,7 +11,10 @@ #pragma message("DefaultHandler2 is deprecated. You can now use DefaultHandler instead.") -namespace SAX { +namespace Arabica +{ +namespace SAX +{ /** * Default base class for SAX2 event handlers. @@ -58,5 +61,6 @@ typedef basic_DefaultHandler2 wDefaultHandler2; #endif } // namespace SAX +} // namespace Arabica #endif diff --git a/include/SAX/ext/LexicalHandler.hpp b/include/SAX/ext/LexicalHandler.hpp index eb43783b..1637a20f 100644 --- a/include/SAX/ext/LexicalHandler.hpp +++ b/include/SAX/ext/LexicalHandler.hpp @@ -7,6 +7,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -191,7 +193,8 @@ typedef basic_LexicalHandler LexicalHandler; typedef basic_LexicalHandler wLexicalHandler; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/ext/Locator2.hpp b/include/SAX/ext/Locator2.hpp index 51ee16ff..8d1515f6 100644 --- a/include/SAX/ext/Locator2.hpp +++ b/include/SAX/ext/Locator2.hpp @@ -7,6 +7,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -70,7 +72,8 @@ typedef basic_Locator2 Locator2; typedef basic_Locator2 wLocator2; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/ext/ProgressiveParser.hpp b/include/SAX/ext/ProgressiveParser.hpp index 40884620..25fd7e47 100644 --- a/include/SAX/ext/ProgressiveParser.hpp +++ b/include/SAX/ext/ProgressiveParser.hpp @@ -6,6 +6,8 @@ // $Id$ +namespace Arabica +{ namespace SAX { /** Abstract base class for the parser-specific XMLPScanToken data. @@ -157,7 +159,8 @@ namespace SAX #ifndef ARABICA_NO_WCHAR_T typedef basic_ProgressiveParser wProgressiveParser; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif /* PROGRESSIVE_PARSER_H */ // end of file diff --git a/include/SAX/filter/NamespaceTracker.hpp b/include/SAX/filter/NamespaceTracker.hpp index b2cfafa9..6ce6d0da 100644 --- a/include/SAX/filter/NamespaceTracker.hpp +++ b/include/SAX/filter/NamespaceTracker.hpp @@ -7,6 +7,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -90,5 +92,6 @@ private: }; // class NamespaceTracker } // namespace SAX +} // namespace Arabica #endif diff --git a/include/SAX/filter/PYXWriter.hpp b/include/SAX/filter/PYXWriter.hpp index 8c6d1b22..01ab274a 100644 --- a/include/SAX/filter/PYXWriter.hpp +++ b/include/SAX/filter/PYXWriter.hpp @@ -6,7 +6,10 @@ #include #include -namespace SAX { +namespace Arabica +{ +namespace SAX +{ template class PYXWriter : public basic_XMLFilterImpl @@ -110,5 +113,6 @@ void PYXWriter::escape(const stringT& ch) } // escape } // namespace SAX +} // namespace Arabica #endif diff --git a/include/SAX/filter/TextCoalescer.hpp b/include/SAX/filter/TextCoalescer.hpp index b8d98a57..dee71d67 100644 --- a/include/SAX/filter/TextCoalescer.hpp +++ b/include/SAX/filter/TextCoalescer.hpp @@ -5,6 +5,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -94,4 +96,6 @@ private: }; // class basic_TextCoalescer } // namespace SAX +} // namespace Arabica + #endif diff --git a/include/SAX/filter/TextOnly.hpp b/include/SAX/filter/TextOnly.hpp index dd5de82e..f4196d80 100644 --- a/include/SAX/filter/TextOnly.hpp +++ b/include/SAX/filter/TextOnly.hpp @@ -5,6 +5,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -59,4 +61,6 @@ public: }; // class TextOnly } // namespace SAX +} // namespace Arabica + #endif diff --git a/include/SAX/filter/WhitespaceStripperFilter.hpp b/include/SAX/filter/WhitespaceStripperFilter.hpp index f662466e..a97ff718 100644 --- a/include/SAX/filter/WhitespaceStripperFilter.hpp +++ b/include/SAX/filter/WhitespaceStripperFilter.hpp @@ -5,6 +5,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -37,5 +39,7 @@ class WhitespaceStripper : public SAX::basic_XMLFilterImpl }; // class WhitespaceStripper } // namespace SAX +} // namespace Arabica + #endif // end of file diff --git a/include/SAX/filter/Writer.hpp b/include/SAX/filter/Writer.hpp index a6ce4f2b..290136e7 100644 --- a/include/SAX/filter/Writer.hpp +++ b/include/SAX/filter/Writer.hpp @@ -12,7 +12,10 @@ #include #include -namespace SAX { +namespace Arabica +{ +namespace SAX +{ template class basic_Writer : public basic_XMLFilterImpl @@ -631,5 +634,6 @@ typedef basic_Writer wWriter; #endif } // namespace SAX +} // namespace Arabica #endif diff --git a/include/SAX/filter/XMLBaseTracker.hpp b/include/SAX/filter/XMLBaseTracker.hpp index 5adcd617..1e6652e1 100644 --- a/include/SAX/filter/XMLBaseTracker.hpp +++ b/include/SAX/filter/XMLBaseTracker.hpp @@ -6,6 +6,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -88,5 +90,6 @@ private: }; // class XMLBaseTracker } // namespace SAX +} // namespace Arabica #endif diff --git a/include/SAX/helpers/AttributeDefaults.hpp b/include/SAX/helpers/AttributeDefaults.hpp index 0a4aea38..567632e3 100644 --- a/include/SAX/helpers/AttributeDefaults.hpp +++ b/include/SAX/helpers/AttributeDefaults.hpp @@ -7,6 +7,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -29,6 +31,7 @@ struct AttributeDefaults }; // struct AttributeDefaults } // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/helpers/AttributeListImpl.hpp b/include/SAX/helpers/AttributeListImpl.hpp index 6872cc97..6006ea0f 100644 --- a/include/SAX/helpers/AttributeListImpl.hpp +++ b/include/SAX/helpers/AttributeListImpl.hpp @@ -8,6 +8,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -293,7 +295,8 @@ typedef basic_AttributeListImpl AttributeListImpl; typedef basic_AttributeListImpl wAttributeListImpl; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/helpers/AttributeTypes.hpp b/include/SAX/helpers/AttributeTypes.hpp index c437952f..12814f63 100644 --- a/include/SAX/helpers/AttributeTypes.hpp +++ b/include/SAX/helpers/AttributeTypes.hpp @@ -7,6 +7,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -43,6 +45,7 @@ struct AttributeTypes }; // struct AttributeTypes } // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/helpers/AttributesImpl.hpp b/include/SAX/helpers/AttributesImpl.hpp index 7102250a..e4e06dbf 100644 --- a/include/SAX/helpers/AttributesImpl.hpp +++ b/include/SAX/helpers/AttributesImpl.hpp @@ -8,6 +8,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -560,6 +562,7 @@ typedef basic_AttributesImpl wAttributesImpl; #endif } // namespace SAX +} // namespace Arabica #endif diff --git a/include/SAX/helpers/CatchErrorHandler.hpp b/include/SAX/helpers/CatchErrorHandler.hpp index 58d85116..f06e9db0 100644 --- a/include/SAX/helpers/CatchErrorHandler.hpp +++ b/include/SAX/helpers/CatchErrorHandler.hpp @@ -7,6 +7,8 @@ * An ErrorHandler implementation that keeps hold of any errors for later reporting. */ +namespace Arabica +{ namespace SAX { template @@ -51,6 +53,7 @@ private: std::string errors_; }; // class CatchErrorHandler +} // namespace SAX } // namespace Arabica #endif diff --git a/include/SAX/helpers/DefaultHandler.hpp b/include/SAX/helpers/DefaultHandler.hpp index c90aee17..41d00356 100644 --- a/include/SAX/helpers/DefaultHandler.hpp +++ b/include/SAX/helpers/DefaultHandler.hpp @@ -16,7 +16,10 @@ #include #include -namespace SAX { +namespace Arabica +{ +namespace SAX +{ /** * Default base class for SAX2 event handlers. @@ -599,5 +602,6 @@ typedef basic_DefaultHandler wDefaultHandler; #endif } // namespace SAX +} // namespace Arabica #endif diff --git a/include/SAX/helpers/FeatureNames.hpp b/include/SAX/helpers/FeatureNames.hpp index 9474ff30..4fb5bf33 100644 --- a/include/SAX/helpers/FeatureNames.hpp +++ b/include/SAX/helpers/FeatureNames.hpp @@ -7,6 +7,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -90,6 +92,7 @@ struct FeatureNames }; // class FeatureNames } // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/helpers/InputSourceResolver.hpp b/include/SAX/helpers/InputSourceResolver.hpp index b35534f5..ba1de5fe 100644 --- a/include/SAX/helpers/InputSourceResolver.hpp +++ b/include/SAX/helpers/InputSourceResolver.hpp @@ -6,6 +6,11 @@ #include #include +namespace Arabica +{ +namespace SAX +{ + class InputSourceResolver { public: @@ -54,5 +59,7 @@ private: } // resolverMap }; // class InputSourceResolver +} // namespace SAX +} // namespace Arabica #endif diff --git a/include/SAX/helpers/LocatorImpl.hpp b/include/SAX/helpers/LocatorImpl.hpp index a89a54f2..e4e068f2 100644 --- a/include/SAX/helpers/LocatorImpl.hpp +++ b/include/SAX/helpers/LocatorImpl.hpp @@ -8,6 +8,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -165,7 +167,8 @@ typedef basic_LocatorImpl LocatorImpl; typedef basic_LocatorImpl wLocatorImpl; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif //end of file diff --git a/include/SAX/helpers/NamespaceSupport.hpp b/include/SAX/helpers/NamespaceSupport.hpp index 689beef6..0dc4a19a 100644 --- a/include/SAX/helpers/NamespaceSupport.hpp +++ b/include/SAX/helpers/NamespaceSupport.hpp @@ -10,6 +10,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -397,6 +399,7 @@ class basic_NamespaceSupport bool operator==(const basic_NamespaceSupport&) const; }; // class basic_NamespaceSupport -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // NamespaceSupportH diff --git a/include/SAX/helpers/ParserAdaptor.hpp b/include/SAX/helpers/ParserAdaptor.hpp index cb57af90..3c20784e 100644 --- a/include/SAX/helpers/ParserAdaptor.hpp +++ b/include/SAX/helpers/ParserAdaptor.hpp @@ -17,6 +17,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -548,5 +550,6 @@ typedef basic_ParserAdaptor wParserAdaptor; #endif } // namespace SAX +} // namespace Arabica #endif diff --git a/include/SAX/helpers/PropertyNames.hpp b/include/SAX/helpers/PropertyNames.hpp index 35a94807..8c2ab99a 100644 --- a/include/SAX/helpers/PropertyNames.hpp +++ b/include/SAX/helpers/PropertyNames.hpp @@ -8,6 +8,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -45,6 +47,7 @@ struct PropertyNames }; // struct PropertyNames } // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/helpers/XMLBaseSupport.hpp b/include/SAX/helpers/XMLBaseSupport.hpp index 1d3b582a..7e0c8816 100644 --- a/include/SAX/helpers/XMLBaseSupport.hpp +++ b/include/SAX/helpers/XMLBaseSupport.hpp @@ -22,6 +22,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -127,6 +129,7 @@ typedef basic_XMLBaseSupport wXMLBaseSupport; #endif } // namespace SAX +} // namespace Arabica #endif diff --git a/include/SAX/helpers/XMLFilterImpl.hpp b/include/SAX/helpers/XMLFilterImpl.hpp index 1be6f0b2..623e5819 100644 --- a/include/SAX/helpers/XMLFilterImpl.hpp +++ b/include/SAX/helpers/XMLFilterImpl.hpp @@ -10,6 +10,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -605,7 +607,8 @@ typedef basic_XMLFilterImpl XMLFilterImpl; typedef basic_XMLFilterImpl wXMLFilterImpl; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/parsers/saxgarden.hpp b/include/SAX/parsers/saxgarden.hpp index e4193591..9eb1576d 100644 --- a/include/SAX/parsers/saxgarden.hpp +++ b/include/SAX/parsers/saxgarden.hpp @@ -16,7 +16,10 @@ #include #include -namespace SAX { +namespace Arabica +{ +namespace SAX +{ template::reportError(const std::string& message, bool f } // reportError } // namespace SAX +} // namespace Arabica #endif diff --git a/include/SAX/saxfwd.hpp b/include/SAX/saxfwd.hpp index fe194310..f9a2568d 100644 --- a/include/SAX/saxfwd.hpp +++ b/include/SAX/saxfwd.hpp @@ -68,6 +68,8 @@ * SAX in C++ - A C++ implementation of the SAX2 interface. * */ +namespace Arabica +{ namespace SAX { @@ -103,7 +105,8 @@ typedef basic_SAXParseException wSAXParseException; typedef basic_ErrorHandler wErrorHandler; #endif -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/wrappers/XercesFeatureNames.hpp b/include/SAX/wrappers/XercesFeatureNames.hpp index c8fb35a9..9094b474 100644 --- a/include/SAX/wrappers/XercesFeatureNames.hpp +++ b/include/SAX/wrappers/XercesFeatureNames.hpp @@ -7,6 +7,8 @@ #include #include +namespace Arabica +{ namespace SAX { template > @@ -172,6 +174,7 @@ namespace SAX } // XercesFeatureNames }; // class XercesFeatureNames } // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/wrappers/XercesPropertyNames.hpp b/include/SAX/wrappers/XercesPropertyNames.hpp index 0d5a673e..3cda210d 100644 --- a/include/SAX/wrappers/XercesPropertyNames.hpp +++ b/include/SAX/wrappers/XercesPropertyNames.hpp @@ -7,6 +7,8 @@ #include #include +namespace Arabica +{ namespace SAX { template #include +namespace Arabica +{ namespace SAX { @@ -1059,7 +1061,8 @@ int expat_wrapper::externalEntityRefHandler(XML_Parser parser, return ok; } // externalEntityRefHandler -}; // namespace SAX +} // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/include/SAX/wrappers/saxlibxml2.hpp b/include/SAX/wrappers/saxlibxml2.hpp index 2398733a..0e02aed9 100644 --- a/include/SAX/wrappers/saxlibxml2.hpp +++ b/include/SAX/wrappers/saxlibxml2.hpp @@ -27,6 +27,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -847,5 +849,6 @@ xmlParserInputPtr libxml2_wrapper::SAXresolveEntity(const xmlCh } // namespace SAX +} // namespace Arabica #endif diff --git a/include/SAX/wrappers/saxmsxml2.hpp b/include/SAX/wrappers/saxmsxml2.hpp index f2a30e3a..427ea2f7 100644 --- a/include/SAX/wrappers/saxmsxml2.hpp +++ b/include/SAX/wrappers/saxmsxml2.hpp @@ -23,6 +23,8 @@ #include _COM_SMARTPTR_TYPEDEF(ISAXXMLReader, __uuidof(ISAXXMLReader)); +namespace Arabica +{ namespace SAX { @@ -945,6 +947,7 @@ void msxml2_wrapper::parse(SAX::basic_InputSource::parseReset(XMLPScanToken& token) } // parseReset } // namespace SAX +} // namespace Arabica #endif // end of file diff --git a/src/SAX/helpers/InputSourceResolver.cpp b/src/SAX/helpers/InputSourceResolver.cpp index 03e01c57..6790c93b 100644 --- a/src/SAX/helpers/InputSourceResolver.cpp +++ b/src/SAX/helpers/InputSourceResolver.cpp @@ -13,7 +13,9 @@ #include #include -InputSourceResolver::InputSourceResolver(const SAX::InputSource& inputSource) : +using namespace Arabica::SAX; + +InputSourceResolver::InputSourceResolver(const Arabica::SAX::InputSource& inputSource) : deleteStream_(false), byteStream_(0) { diff --git a/src/SAX/wrappers/saxexpat.cpp b/src/SAX/wrappers/saxexpat.cpp index f4cbafae..4dfa5bec 100644 --- a/src/SAX/wrappers/saxexpat.cpp +++ b/src/SAX/wrappers/saxexpat.cpp @@ -8,6 +8,8 @@ #include +namespace Arabica +{ namespace SAX { @@ -129,6 +131,7 @@ int ewim_externalEntityRefHandler(XML_Parser parser, } // namespace expat_wrapper_impl_mumbojumbo } // namespace SAX +} // namespace Arabica // end of file diff --git a/src/SAX/wrappers/saxlibxml2.cpp b/src/SAX/wrappers/saxlibxml2.cpp index da451b1d..c204f772 100644 --- a/src/SAX/wrappers/saxlibxml2.cpp +++ b/src/SAX/wrappers/saxlibxml2.cpp @@ -10,6 +10,8 @@ #include +namespace Arabica +{ namespace SAX { namespace libxml2_wrapper_impl_tiddle @@ -221,5 +223,6 @@ bool lwit_getFeature(xmlParserCtxtPtr context, const char* name) } // namespace libxml2_wrapper_impl_tiddle } // namespace SAX +} // namespace Arabica // end of file diff --git a/src/SAX/wrappers/saxxerces.cpp b/src/SAX/wrappers/saxxerces.cpp index 6c5a4b66..3e9eecf7 100644 --- a/src/SAX/wrappers/saxxerces.cpp +++ b/src/SAX/wrappers/saxxerces.cpp @@ -8,6 +8,8 @@ #include #include +namespace Arabica +{ namespace SAX { @@ -31,4 +33,5 @@ namespace XercesImpl } //namespace xerces_implemenation_helper } // namespace SAX +} // namespace Arabica // end of file diff --git a/tests/DOM/test_SAX2DOM.hpp b/tests/DOM/test_SAX2DOM.hpp index 78c9b37e..62d3abbb 100644 --- a/tests/DOM/test_SAX2DOM.hpp +++ b/tests/DOM/test_SAX2DOM.hpp @@ -28,8 +28,8 @@ class SAX2DOMTest : public TestCase std::stringstream ss; ss << SA::asStdString(str); - SAX::basic_InputSource is(ss); - SAX::CatchErrorHandler eh; + Arabica::SAX::basic_InputSource is(ss); + Arabica::SAX::CatchErrorHandler eh; SAX2DOM::Parser parser; parser.setErrorHandler(eh); parser.parse(is); @@ -157,7 +157,7 @@ class SAX2DOMTest : public TestCase parser.getFeature(SA::construct_from_utf8("made up name")); assert(false); } - catch(const SAX::SAXNotRecognizedException&) + catch(const Arabica::SAX::SAXNotRecognizedException&) { } } // test12 diff --git a/tests/DOM/test_TreeWalker.hpp b/tests/DOM/test_TreeWalker.hpp index 8dcf4e8a..9e681b01 100644 --- a/tests/DOM/test_TreeWalker.hpp +++ b/tests/DOM/test_TreeWalker.hpp @@ -28,8 +28,8 @@ class TreeWalkerTest : public TestCase std::stringstream ss; ss << SA::asStdString(str); - SAX::basic_InputSource is(ss); - SAX::CatchErrorHandler eh; + Arabica::SAX::basic_InputSource is(ss); + Arabica::SAX::CatchErrorHandler eh; SAX2DOM::Parser parser; parser.setErrorHandler(eh); parser.parse(is); diff --git a/tests/SAX/test_WhitespaceStripper.hpp b/tests/SAX/test_WhitespaceStripper.hpp index 2688603c..b9d97e9a 100644 --- a/tests/SAX/test_WhitespaceStripper.hpp +++ b/tests/SAX/test_WhitespaceStripper.hpp @@ -32,8 +32,8 @@ class WhitespaceStripperTest : public TestCase void testNoStrip() { std::ostringstream o; - SAX::XMLReader parser; - SAX::PYXWriter writer(o, parser); + Arabica::SAX::XMLReader parser; + Arabica::SAX::PYXWriter writer(o, parser); writer.parse(*source("

Woo baby hooray

")); assertEquals("(test\n(p\n- Woo baby hooray \n)p\n)test\n", o.str()); } // testNoStrip @@ -41,9 +41,9 @@ class WhitespaceStripperTest : public TestCase void testStripLeading() { std::ostringstream o; - SAX::XMLReader parser; - SAX::WhitespaceStripper stripper(parser); - SAX::PYXWriter writer(o, stripper); + Arabica::SAX::XMLReader parser; + Arabica::SAX::WhitespaceStripper stripper(parser); + Arabica::SAX::PYXWriter writer(o, stripper); writer.parse(*source("

Woo

")); assertEquals("(test\n(p\n-Woo\n)p\n)test\n", o.str()); @@ -59,9 +59,9 @@ class WhitespaceStripperTest : public TestCase void testStripTrailing() { std::ostringstream o; - SAX::XMLReader parser; - SAX::WhitespaceStripper stripper(parser); - SAX::PYXWriter writer(o, stripper); + Arabica::SAX::XMLReader parser; + Arabica::SAX::WhitespaceStripper stripper(parser); + Arabica::SAX::PYXWriter writer(o, stripper); writer.parse(*source("

Woo

")); assertEquals("(test\n(p\n-Woo\n)p\n)test\n", o.str()); @@ -77,9 +77,9 @@ class WhitespaceStripperTest : public TestCase void testStripMid() { std::ostringstream o; - SAX::XMLReader parser; - SAX::WhitespaceStripper stripper(parser); - SAX::PYXWriter writer(o, stripper); + Arabica::SAX::XMLReader parser; + Arabica::SAX::WhitespaceStripper stripper(parser); + Arabica::SAX::PYXWriter writer(o, stripper); writer.parse(*source("

Woo yea

")); assertEquals("(test\n(p\n-Woo yea\n)p\n)test\n", o.str()); @@ -95,9 +95,9 @@ class WhitespaceStripperTest : public TestCase void testStripMid2() { std::ostringstream o; - SAX::XMLReader parser; - SAX::WhitespaceStripper stripper(parser); - SAX::PYXWriter writer(o, stripper); + Arabica::SAX::XMLReader parser; + Arabica::SAX::WhitespaceStripper stripper(parser); + Arabica::SAX::PYXWriter writer(o, stripper); writer.parse(*source("

Woo yea man

")); assertEquals("(test\n(p\n-Woo yea man\n)p\n)test\n", o.str()); @@ -117,19 +117,19 @@ class WhitespaceStripperTest : public TestCase void testStrip() { std::ostringstream o; - SAX::XMLReader parser; - SAX::WhitespaceStripper stripper(parser); - SAX::PYXWriter writer(o, stripper); + Arabica::SAX::XMLReader parser; + Arabica::SAX::WhitespaceStripper stripper(parser); + Arabica::SAX::PYXWriter writer(o, stripper); writer.parse(*source("

Woo baby hooray

")); assertEquals("(test\n(p\n-Woo baby hooray\n)p\n)test\n", o.str()); } // testStrip private: - std::auto_ptr source(const std::string& str) + std::auto_ptr source(const std::string& str) { std::auto_ptr ss(new std::stringstream()); (*ss) << str; - return std::auto_ptr(new SAX::InputSource(ss)); + return std::auto_ptr(new Arabica::SAX::InputSource(ss)); } // source }; // WhitespaceStripperTest diff --git a/tests/XPath/match_test.hpp b/tests/XPath/match_test.hpp index c9572485..983ef66c 100644 --- a/tests/XPath/match_test.hpp +++ b/tests/XPath/match_test.hpp @@ -404,8 +404,8 @@ public: std::stringstream ss; ss << match; - SAX::basic_InputSource is(ss); - SAX::CatchErrorHandler eh; + Arabica::SAX::basic_InputSource is(ss); + Arabica::SAX::CatchErrorHandler eh; SAX2DOM::Parser parser; parser.setErrorHandler(eh); parser.parse(is); diff --git a/tests/XSLT/xslt_test.hpp b/tests/XSLT/xslt_test.hpp index dfa90b07..4551cba0 100644 --- a/tests/XSLT/xslt_test.hpp +++ b/tests/XSLT/xslt_test.hpp @@ -18,7 +18,7 @@ const std::string SEPERATOR = "/"; DOM::Document buildDOM(const std::string& filename) { - SAX::InputSource is(filename); + Arabica::SAX::InputSource is(filename); SAX2DOM::Parser parser; parser.parse(is); @@ -85,7 +85,7 @@ protected: { Arabica::XSLT::StylesheetCompiler compiler; - SAX::InputSource source(input_xslt_); + Arabica::SAX::InputSource source(input_xslt_); std::auto_ptr stylesheet = compiler.compile(source); if(stylesheet.get() != 0) assertImplementation(false, "Expected " + input_xslt_ + " not to compile. But it did :o"); @@ -113,7 +113,7 @@ protected: { Arabica::XSLT::StylesheetCompiler compiler; - SAX::InputSource source(input_xslt_); + Arabica::SAX::InputSource source(input_xslt_); std::auto_ptr stylesheet = compiler.compile(source); if(stylesheet.get() == 0) assertImplementation(false, "Failed to compile " + input_xslt_ + " : " + compiler.error()); @@ -158,7 +158,7 @@ protected: { Arabica::XSLT::StylesheetCompiler compiler; - SAX::InputSource source(input_xslt_); + Arabica::SAX::InputSource source(input_xslt_); std::auto_ptr stylesheet = compiler.compile(source); if(stylesheet.get() == 0) assertImplementation(false, "Failed to compile " + input_xslt_ + " : " + compiler.error());