diff --git a/examples/DOM/DOMWriter.cpp b/examples/DOM/DOMWriter.cpp index 6dddaf52..3a13118d 100644 --- a/examples/DOM/DOMWriter.cpp +++ b/examples/DOM/DOMWriter.cpp @@ -27,7 +27,7 @@ int main(int argc, char* argv[]) for(int i = 1; i < argc; ++i) { std::string file(argv[i]); - Arabica::SAX::InputSource is; + Arabica::SAX::InputSource is; is.setSystemId(file); if(file != "-") diff --git a/examples/SAX/SimpleHandler.cpp b/examples/SAX/SimpleHandler.cpp index 9809c0af..7c97ec6c 100644 --- a/examples/SAX/SimpleHandler.cpp +++ b/examples/SAX/SimpleHandler.cpp @@ -7,9 +7,9 @@ ////////////////////////////////////////////// // EntityResolver -Arabica::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 Arabica::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 Arabica::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 Arabica::SAX::SAXParseException& exception) +void SimpleHandler::warning(const Arabica::SAX::SAXParseException& exception) { std::cerr << "WARNING: " << exception.what() << std::endl; } // warning -void SimpleHandler::error(const Arabica::SAX::SAXParseException& exception) +void SimpleHandler::error(const Arabica::SAX::SAXParseException& exception) { std::cerr << "ERROR : " << exception.what() << std::endl; } // error -void SimpleHandler::fatalError(const Arabica::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 6ec48ac6..42065735 100644 --- a/examples/SAX/SimpleHandler.hpp +++ b/examples/SAX/SimpleHandler.hpp @@ -13,12 +13,12 @@ #include #include -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 +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 Arabica::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 Arabica::SAX::SAXParseException&); - virtual void error(const Arabica::SAX::SAXParseException&); - virtual void fatalError(const Arabica::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 d626f3ff..3396375b 100644 --- a/examples/SAX/pyx.cpp +++ b/examples/SAX/pyx.cpp @@ -19,18 +19,18 @@ #include #include -class SAX2PYX : public Arabica::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 Arabica::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 Arabica::SAX::SAXParseException& e) { fatalError(e); } - virtual void error(const Arabica::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; @@ -55,7 +55,7 @@ int main(int argc, char* argv[]) myParser.setErrorHandler(handler); myParser.setFeature("prohibit-dtd", false); - Arabica::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 Arabica::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 36f3d63c..628fe172 100644 --- a/examples/SAX/wrapper.cpp +++ b/examples/SAX/wrapper.cpp @@ -49,12 +49,12 @@ int main(int argc, char* argv[]) if(file != "-") { - Arabica::SAX::InputSource is(file); + Arabica::SAX::InputSource is(file); parser.parse(is); } else { - Arabica::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 161d62a1..725633e2 100644 --- a/examples/SAX/writer.cpp +++ b/examples/SAX/writer.cpp @@ -21,7 +21,7 @@ int main(int argc, char* argv[]) { // narrow Arabica::SAX::FeatureNames fNames; Arabica::SAX::XMLReader parser; - Arabica::SAX::Writer writer(std::cout, 4); + Arabica::SAX::Writer writer(std::cout, 4); Arabica::SAX::CatchErrorHandler eh; writer.setParent(parser); @@ -30,7 +30,7 @@ int main(int argc, char* argv[]) for(int i = 1; i < argc; ++i) { std::string file(argv[i]); - Arabica::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 ab523699..51e5b1bd 100644 --- a/examples/SAX/xmlbase.cpp +++ b/examples/SAX/xmlbase.cpp @@ -18,19 +18,19 @@ #include #include -class hrefPrinter : public Arabica::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 Arabica::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 Arabica::SAX::SAXParseException& e) { fatalError(e); } - virtual void error(const Arabica::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: - Arabica::SAX::XMLBaseSupport xmlbaseTracker_; + Arabica::SAX::XMLBaseSupport xmlbaseTracker_; }; // class SimpleHandler int main(int argc, char* argv[]) @@ -51,7 +51,7 @@ int main(int argc, char* argv[]) myParser.setContentHandler(handler); myParser.setErrorHandler(handler); - Arabica::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 Arabica::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 11decd2a..69cd3df7 100644 --- a/examples/XPath/xgrep.cpp +++ b/examples/XPath/xgrep.cpp @@ -39,7 +39,7 @@ int main(int argc, char* argv[]) for(int i = 2; i < argc; ++i) { std::string file(argv[i]); - Arabica::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 24131456..7adb5e09 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 { - Arabica::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[]) Arabica::DOM::Document buildDOM(const std::string& filename) { - Arabica::SAX::InputSource is(filename); + Arabica::SAX::InputSource is(filename); Arabica::SAX2DOM::Parser parser; parser.parse(is); diff --git a/include/DOM/SAX2DOM/SAX2DOM.hpp b/include/DOM/SAX2DOM/SAX2DOM.hpp index 5802b88a..3295d725 100644 --- a/include/DOM/SAX2DOM/SAX2DOM.hpp +++ b/include/DOM/SAX2DOM/SAX2DOM.hpp @@ -23,17 +23,17 @@ namespace SAX2DOM template, class SAX_parser = Arabica::SAX::XMLReader > -class Parser : protected Arabica::SAX::basic_DefaultHandler +class Parser : protected Arabica::SAX::DefaultHandler { - 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 Arabica::SAX::EntityResolver EntityResolverT; + typedef Arabica::SAX::ErrorHandler ErrorHandlerT; + typedef Arabica::SAX::LexicalHandler LexicalHandlerT; + typedef Arabica::SAX::DeclHandler DeclHandlerT; + typedef Arabica::SAX::InputSource InputSourceT; typedef Arabica::SimpleDOM::EntityImpl EntityT; typedef Arabica::SimpleDOM::NotationImpl NotationT; typedef Arabica::SimpleDOM::ElementImpl ElementT; - typedef typename Arabica::SAX::basic_ErrorHandler::SAXParseExceptionT SAXParseExceptionT; + typedef typename Arabica::SAX::ErrorHandler::SAXParseExceptionT SAXParseExceptionT; public: Parser() : @@ -187,7 +187,7 @@ class Parser : protected Arabica::SAX::basic_DefaultHandler } // endDocument virtual void startElement(const stringT& namespaceURI, const stringT& localName, - const stringT& qName, const Arabica::SAX::basic_Attributes& atts) + const stringT& qName, const Arabica::SAX::Attributes& atts) { if(currentNode_ == 0) return; diff --git a/include/SAX/AttributeList.hpp b/include/SAX/AttributeList.hpp index b0186b43..08055a05 100644 --- a/include/SAX/AttributeList.hpp +++ b/include/SAX/AttributeList.hpp @@ -17,16 +17,16 @@ namespace SAX * Interface for an element's attribute specifications. * *

This is the original SAX1 interface for reporting an element's - * attributes. Unlike the new {@link basic_Attributes Attributes} + * attributes. Unlike the new {@link Attributes Attributes} * interface, it does not support Namespace-related information.

* *

When an attribute list is supplied as part of a - * {@link basic_DocumentHandler#startElement startElement} + * {@link DocumentHandler#startElement startElement} * event, the list will return valid results only during the * scope of the event; once the event handler returns control * to the parser, the attribute list is invalid. To save a * persistent copy of the attribute list, use the SAX1 - * {@link basic_AttributeListImpl AttributeListImpl} + * {@link AttributeListImpl AttributeListImpl} * helper class.

* *

An attribute list includes only attributes that have been @@ -65,22 +65,22 @@ namespace SAX * * * @deprecated This interface has been replaced by the SAX2 - * {@link basic_Attributes Attributes} + * {@link Attributes Attributes} * interface, which includes Namespace support. * @since SAX 1.0 * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_DocumentHandler#startElement startElement - * @see basic_AttributeListImpl + * @see DocumentHandler#startElement startElement + * @see AttributeListImpl */ template -class basic_AttributeList +class AttributeList { public: typedef string_type stringT; - virtual ~basic_AttributeList() { } + virtual ~AttributeList() { } // // Iteration methods. @@ -186,11 +186,6 @@ public: }; // class AttributeList -typedef basic_AttributeList AttributeList; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_AttributeList wAttributeList; -#endif - } // namespace SAX } // namespace Arabica diff --git a/include/SAX/Attributes.hpp b/include/SAX/Attributes.hpp index fa85a152..055590b0 100644 --- a/include/SAX/Attributes.hpp +++ b/include/SAX/Attributes.hpp @@ -39,7 +39,7 @@ namespace SAX * may not be available.

* *

This interface replaces the now-deprecated SAX1 {@link - * basic_AttributeList AttributeList} interface, which does not + * AttributeList AttributeList} interface, which does not * contain Namespace support. In addition to Namespace support, it * adds the getIndex methods (below).

* @@ -50,15 +50,15 @@ namespace SAX * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_AttributesImpl + * @see AttributesImpl */ template -class basic_Attributes +class Attributes { public: typedef string_type stringT; - virtual ~basic_Attributes() { } + virtual ~Attributes() { } // // indexed access @@ -227,11 +227,6 @@ public: }; // class Attributes -typedef basic_Attributes Attributes; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_Attributes wAttributes; -#endif - } // namespace SAX } // namespace Arabica diff --git a/include/SAX/ContentHandler.hpp b/include/SAX/ContentHandler.hpp index ac8258e0..43c7afc4 100644 --- a/include/SAX/ContentHandler.hpp +++ b/include/SAX/ContentHandler.hpp @@ -13,8 +13,8 @@ namespace Arabica namespace SAX { -template class basic_Locator; -template class basic_Attributes; +template class Locator; +template class Attributes; /** * Receive notification of the logical content of a document. @@ -22,7 +22,7 @@ template class basic_Attributes; *

This is the main interface that most SAX applications * implement: if the application needs to be informed of basic parsing * events, it implements this interface and registers an instance with - * the SAX parser using the {@link basic_XMLReader#setContentHandler + * the SAX parser using the {@link XMLReader#setContentHandler * setContentHandler} method. The parser uses the instance to report * basic document-related events like the start and end of elements * and character data.

@@ -42,19 +42,19 @@ template class basic_Attributes; * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_XMLReader - * @see basic_DTDHandler - * @see basic_ErrorHandler + * @see XMLReader + * @see DTDHandler + * @see ErrorHandler */ template -class basic_ContentHandler +class ContentHandler { public: typedef string_type stringT; - typedef basic_Locator LocatorT; - typedef basic_Attributes AttributesT; + typedef Locator LocatorT; + typedef Attributes AttributesT; - virtual ~basic_ContentHandler() { } + virtual ~ContentHandler() { } /** * Receive an object for locating the origin of SAX document events. @@ -79,7 +79,7 @@ public: * * @param locator An object that can return the location of * any SAX document event. - * @see basic_Locator + * @see Locator */ virtual void setDocumentLocator(const LocatorT& locator) = 0; @@ -87,7 +87,7 @@ public: * Receive notification of the beginning of a document. * *

The SAX parser will invoke this method only once, before any - * other methods in this interface or in {@link basic_DTDHandler + * other methods in this interface or in {@link DTDHandler * DTDHandler} (except for {@link #setDocumentLocator * setDocumentLocator}).

* @@ -219,7 +219,7 @@ public: * @exception SAXException Any SAX exception, possibly * wrapping another exception. * @see #endElement - * @see basic_Attributes + * @see Attributes */ virtual void startElement(const stringT& namespaceURI, const stringT& localName, const stringT& qName, const AttributesT& atts) = 0; @@ -267,7 +267,7 @@ public: * @param ch The characters from the XML document. * @exception SAXException Any SAX exception. * @see #ignorableWhitespace - * @see basic_Locator + * @see Locator */ virtual void characters(const stringT& ch) = 0; /** @@ -332,12 +332,7 @@ public: * @exception SAXException Any SAX exception. */ virtual void skippedEntity(const stringT& name) = 0; -}; // class basic_ContentHandler - -typedef basic_ContentHandler ContentHandler; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_ContentHandler wContentHandler; -#endif +}; // class ContentHandler } // namespace SAX } // namespace Arabica diff --git a/include/SAX/DTDHandler.hpp b/include/SAX/DTDHandler.hpp index dd470999..27e061c7 100644 --- a/include/SAX/DTDHandler.hpp +++ b/include/SAX/DTDHandler.hpp @@ -32,7 +32,7 @@ namespace SAX * declared; however, all DTD events must be reported after the * document handler's startDocument event, and before the first * startElement event. - * (If the {@link basic_LexicalHandler LexicalHandler} is + * (If the {@link LexicalHandler LexicalHandler} is * used, these events must also be reported before the endDTD event.) *

* @@ -47,16 +47,16 @@ namespace SAX * @author Jez Higgins, * jez@jezuk.co.uk * @version $Id$ - * @see basic_XMLReader#setDTDHandler + * @see XMLReader#setDTDHandler */ template -class basic_DTDHandler +class DTDHandler { public: typedef string_type stringT; - virtual ~basic_DTDHandler() { } + virtual ~DTDHandler() { } /** @@ -70,7 +70,7 @@ public: * When a system identifier is present, applications are responsible * for knowing if it is used as a URL, and absolutizing it against * the appropriate URI when appropriate. - * That base URI is available from {@link basic_Locator#getSystemId} during + * That base URI is available from {@link Locator#getSystemId} during * this callback, assuming the parser provides a Locator.

* *

At least one of publicId and systemId must be non-empty.

@@ -85,7 +85,7 @@ public: * none was given. * @exception SAXException Any SAX exception. * @see #unparsedEntityDecl - * @see basic_Attributes + * @see Attributes */ virtual void notationDecl(const stringT& name, const stringT& publicId, @@ -112,19 +112,14 @@ public: * @param systemId The entity's system identifier. * @param notationName The name of the associated notation. * @see #notationDecl - * @see basic_Attributes + * @see Attributes */ virtual void unparsedEntityDecl(const stringT& name, const stringT& publicId, const stringT& systemId, const stringT& notationName) = 0; -}; // class basic_DTDHandler - -typedef basic_DTDHandler DTDHandler; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_DTDHandler wDTDHandler; -#endif +}; // class DTDHandler } // namespace SAX } // namespace Arabica diff --git a/include/SAX/DocumentHandler.hpp b/include/SAX/DocumentHandler.hpp index 40ea7c25..c9228b8e 100644 --- a/include/SAX/DocumentHandler.hpp +++ b/include/SAX/DocumentHandler.hpp @@ -10,8 +10,8 @@ namespace Arabica namespace SAX { -template class basic_Locator; -template class basic_AttributeList; +template class Locator; +template class AttributeList; /** * Receive notification of general document events. @@ -38,19 +38,19 @@ template class basic_AttributeList; * * @author Jez Higgins, jez@jezuk.co.uk * @version 0.1 - * @see basic_Parser#setDocumentHandler - * @see basic_Locator - * @see basic_HandlerBase + * @see Parser#setDocumentHandler + * @see Locator + * @see HandlerBase */ template -class basic_DocumentHandler +class DocumentHandler { public: typedef string_type stringT; - typedef basic_Locator LocatorT; - typedef basic_AttributeList AttributeListT; + typedef Locator LocatorT; + typedef AttributeList AttributeListT; - virtual ~basic_DocumentHandler() { } + virtual ~DocumentHandler() { } virtual void setDocumentLocator(const LocatorT& locator) = 0; @@ -67,12 +67,7 @@ public: virtual void processingInstruction(const stringT& target, const stringT& data) = 0; -}; // class basic_DocumentHandler - -typedef basic_DocumentHandler DocumentHandler; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_DocumentHandler wDocumentHandler; -#endif +}; // class DocumentHandler } // namespace SAX } // namespace Arabica diff --git a/include/SAX/EntityResolver.hpp b/include/SAX/EntityResolver.hpp index d83cee66..cb9f8fbd 100644 --- a/include/SAX/EntityResolver.hpp +++ b/include/SAX/EntityResolver.hpp @@ -21,7 +21,7 @@ namespace SAX *

If a SAX application needs to implement customized handling * for external entities, it must implement this interface and * register an instance with the SAX driver using the - * {@link basic_XMLReader#setEntityResolver setEntityResolver} + * {@link XMLReader#setEntityResolver setEntityResolver} * method.

* *

The XML reader will then allow the application to intercept any @@ -66,17 +66,17 @@ namespace SAX * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_Parser#setEntityResolver - * @see basic_InputSource + * @see Parser#setEntityResolver + * @see InputSource */ template -class basic_EntityResolver +class EntityResolver { public: typedef string_type stringT; - typedef basic_InputSource InputSourceT; + typedef InputSource InputSourceT; - virtual ~basic_EntityResolver() { }; + virtual ~EntityResolver() { }; /** * Allow the application to resolve external entities. @@ -106,16 +106,11 @@ public: * or a default-constructed InputSource to request that * the parser open a regular URI connection to the system identifier. * @exception SAXException Any SAX exception. - * @see basic_InputSource + * @see InputSource */ virtual InputSourceT resolveEntity(const stringT& publicId, const stringT& systemId) = 0; }; // class EntityResolver -typedef basic_EntityResolver EntityResolver; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_EntityResolver wEntityResolver; -#endif - } // namespace SAX } // namespace Arabica diff --git a/include/SAX/ErrorHandler.hpp b/include/SAX/ErrorHandler.hpp index 1107b7bb..76fa5a0a 100644 --- a/include/SAX/ErrorHandler.hpp +++ b/include/SAX/ErrorHandler.hpp @@ -21,7 +21,7 @@ namespace SAX *

If a SAX application needs to implement customized error * handling, it must implement this interface and then register an * instance with the XML reader using the - * {@link basic_XMLReader#setErrorHandler setErrorHandler} + * {@link XMLReader#setErrorHandler setErrorHandler} * method. The parser will then report all errors and warnings * through this interface.

* @@ -41,17 +41,17 @@ namespace SAX * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_Parser#setErrorHandler - * @see basic_SAXParseException + * @see Parser#setErrorHandler + * @see SAXParseException */ template -class basic_ErrorHandler +class ErrorHandler { public: typedef string_type stringT; - typedef basic_SAXParseException SAXParseExceptionT; + typedef SAXParseException SAXParseExceptionT; - virtual ~basic_ErrorHandler() { }; + virtual ~ErrorHandler() { }; /** * Receive notification of a warning. @@ -69,7 +69,7 @@ public: * * @param exception The warning information encapsulated in a * SAX parse exception. - * @see basic_SAXParseException + * @see SAXParseException */ virtual void warning(const SAXParseExceptionT& exception) = 0; /** @@ -93,7 +93,7 @@ public: * * @param exception The error information encapsulated in a * SAX parse exception. - * @see basic_SAXParseException + * @see SAXParseException */ virtual void error(const SAXParseExceptionT& exception) = 0; /** @@ -112,16 +112,11 @@ public: * * @param exception The error information encapsulated in a * SAX parse exception. - * @see basic_SAXParseException + * @see SAXParseException */ virtual void fatalError(const SAXParseExceptionT& exception) = 0; }; // class ErrorHandler -typedef basic_ErrorHandler ErrorHandler; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_ErrorHandler wErrorHandler; -#endif - } // namespace SAX } // namespace Arabica diff --git a/include/SAX/HandlerBase.hpp b/include/SAX/HandlerBase.hpp index 9287e6c5..1f82099f 100644 --- a/include/SAX/HandlerBase.hpp +++ b/include/SAX/HandlerBase.hpp @@ -27,7 +27,7 @@ namespace SAX * interfaces: EntityResolver, DTDHandler, DocumentHandler, * and ErrorHandler. It is now obsolete, but is included in SAX2 to * support legacy SAX1 applications. SAX2 applications should use - * the {@link basic_DefaultHandler DefaultHandler} + * the {@link DefaultHandler DefaultHandler} * class instead.

* *

Application writers can extend this class when they need to @@ -38,32 +38,32 @@ namespace SAX *

Note that the use of this class is optional.

* * @deprecated This class works with the deprecated - * {@link basic_DocumentHandler DocumentHandler} + * {@link DocumentHandler DocumentHandler} * interface. It has been replaced by the SAX2 - * {@link basic_DefaultHandler DefaultHandler} + * {@link DefaultHandler DefaultHandler} * class. * @since SAX 1.0 * @author Jez Higgins, jez@jezuk.co.uk * @version 1.0 - * @see basic_EntityResolver - * @see basic_DTDHandler - * @see basic_DocumentHandler - * @see basic_ErrorHandler + * @see EntityResolver + * @see DTDHandler + * @see DocumentHandler + * @see ErrorHandler */ template -class basic_HandlerBase : public basic_EntityResolver, - public basic_DTDHandler, - public basic_DocumentHandler, - public basic_ErrorHandler +class HandlerBase : public EntityResolver, + public DTDHandler, + public DocumentHandler, + public ErrorHandler { public: typedef string_name stringT; - typedef basic_Locator LocatorT; - typedef basic_AttributeList AttributeListT; - typedef basic_InputSource InputSourceT; - typedef basic_ErrorHandler::SAXParseExceptionT SAXParseExceptionT; + typedef Locator LocatorT; + typedef AttributeList AttributeListT; + typedef InputSource InputSourceT; + typedef ErrorHandler::SAXParseExceptionT SAXParseExceptionT; - virtual ~basic_HandlerBase() { } + virtual ~HandlerBase() { } ////////////////////////////////////////////////////////////////////// // Default implementation of the EntityResolver interface. @@ -83,7 +83,7 @@ public: * document. * @return The new input source, or an empty string to require the * default behaviour. - * @see basic_EntityResolver#resolveEntity + * @see EntityResolver#resolveEntity */ virtual InputSourceT resolveEntity(const stringT& publicId, const stringT& systemId) @@ -105,7 +105,7 @@ public: * @param publicId The notation public identifier, or an empty string if not * available. * @param systemId The notation system identifier. - * @see basic_DTDHandler#notationDecl + * @see DTDHandler#notationDecl */ virtual void notationDecl(const stringT& name, const stringT& publicId, @@ -123,7 +123,7 @@ public: * available. * @param systemId The entity system identifier. * @param notationName The name of the associated notation. - * @see basic_DTDHandler#unparsedEntityDecl + * @see DTDHandler#unparsedEntityDecl */ virtual void unparsedEntityDecl(const stringT& name, const stringT& publicId, @@ -141,8 +141,8 @@ public: * with other document events.

* * @param locator A locator for all SAX document events. - * @see basic_DocumentHandler#setDocumentLocator - * @see basic_Locator + * @see DocumentHandler#setDocumentLocator + * @see Locator */ virtual void setDocumentLocator(const LocatorT& locator) { } @@ -154,7 +154,7 @@ public: * of a document (such as allocating the root node of a tree or * creating an output file).

* - * @see basic_DocumentHandler#startDocument + * @see DocumentHandler#startDocument */ virtual void startDocument() { } /** @@ -165,7 +165,7 @@ public: * of a document (such as finalising a tree or closing an output * file).

* - * @see basic_DocumentHandler#endDocument + * @see DocumentHandler#endDocument */ virtual void endDocument() { } @@ -179,7 +179,7 @@ public: * * @param name The element type name. * @param attributes The specified or defaulted attributes. - * @see basic_DocumentHandler#startElement + * @see DocumentHandler#startElement */ virtual void startElement(const stringT& name, const AttributeListT& attributes) { } @@ -192,7 +192,7 @@ public: * output to a file).

* * @param name The element type name. - * @see basic_DocumentHandler#endElement + * @see DocumentHandler#endElement */ virtual void endElement(const stringT& name) { } @@ -205,7 +205,7 @@ public: * a file).

* * @param ch The characters. - * @see basic_DocumentHandler#characters + * @see DocumentHandler#characters */ virtual void characters(const stringT& ch) { } /** @@ -217,7 +217,7 @@ public: * it to a file).

* * @param ch The whitespace characters. - * @see basic_DocumentHandler#ignorableWhitespace + * @see DocumentHandler#ignorableWhitespace */ virtual void ignorableWhitespace(const stringT& ch) { } @@ -232,7 +232,7 @@ public: * @param target The processing instruction target. * @param data The processing instruction data, or an empty string if * none is supplied. - * @see basic_DocumentHandler#processingInstruction + * @see DocumentHandler#processingInstruction */ virtual void processingInstruction(const stringT& target, const stringT& data) { } @@ -249,8 +249,8 @@ public: * printing it to the console.

* * @param e The warning information encoded as an exception. - * @see basic_ErrorHandler#warning - * @see basic_SAXParseException + * @see ErrorHandler#warning + * @see SAXParseException */ virtual void warning(const SAXParseExceptionT& e) { } /** @@ -262,8 +262,8 @@ public: * printing it to the console.

* * @param e The warning information encoded as an exception. - * @see basic_ErrorHandler#warning - * @see basic_SAXParseException + * @see ErrorHandler#warning + * @see SAXParseException */ virtual void error(const SAXParseExceptionT& e) { } /** @@ -278,17 +278,12 @@ public: * the parser may no longer report parsing events.

* * @param e The error information encoded as an exception. - * @see basic_ErrorHandler#fatalError - * @see basic_SAXParseException + * @see ErrorHandler#fatalError + * @see SAXParseException */ virtual void fatalError(const SAXParseExceptionT& e) { throw e; } }; // class HandlerBase -typedef basic_HandlerBase HandlerBase; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_HandlerBase wHandlerBase; -#endif - } // namespace SAX } // namespace Arabica diff --git a/include/SAX/InputSource.hpp b/include/SAX/InputSource.hpp index 7cbff258..a4b34713 100644 --- a/include/SAX/InputSource.hpp +++ b/include/SAX/InputSource.hpp @@ -45,11 +45,11 @@ namespace SAX * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_Parser#parse - * @see basic_EntityResolver#resolveEntity + * @see Parser#parse + * @see EntityResolver#resolveEntity */ template -class basic_InputSource +class InputSource { public: typedef string_type stringT; @@ -62,7 +62,7 @@ public: * @see #setByteStream * @see #setEncoding */ - basic_InputSource() : + InputSource() : byteStream_(), publicId_(), systemId_(), @@ -83,13 +83,13 @@ public: * @see #setByteStream * @see #setEncoding */ - basic_InputSource(const stringT& systemId) : + InputSource(const stringT& systemId) : byteStream_(), publicId_(), systemId_(systemId), encoding_() { } - basic_InputSource(const basic_InputSource& rhs) : + InputSource(const InputSource& rhs) : byteStream_(rhs.byteStream_), publicId_(rhs.publicId_), systemId_(rhs.systemId_), @@ -104,15 +104,15 @@ public: * character encoding.

* * @param byteStream The raw byte stream containing the document. The - * basic_InputSource does not assume ownership of + * InputSource does not assume ownership of * this byteStream. - * @see #basic_InputSource(std::auto_ptr) + * @see #InputSource(std::auto_ptr) * @see #setPublicId * @see #setSystemId * @see #setEncoding * @see #setByteStream */ - basic_InputSource(std::istream& byteStream) : + InputSource(std::istream& byteStream) : byteStream_(byteStream), publicId_(), systemId_(), @@ -129,22 +129,22 @@ public: * character encoding.

* * @param byteStream The raw byte stream containing the document. The - * basic_InputSource assumes ownership of the byteStream + * InputSource assumes ownership of the byteStream * and will delete it when no-longer required. - * @see basic_InputSource(std::istream&) + * @see InputSource(std::istream&) * @see #setPublicId * @see #setSystemId * @see #setEncoding * @see #setByteStream */ - basic_InputSource(std::auto_ptr byteStream) : + InputSource(std::auto_ptr byteStream) : byteStream_(byteStream), publicId_(), systemId_(), encoding_() { } - basic_InputSource(std::auto_ptr byteStream) : + InputSource(std::auto_ptr byteStream) : byteStream_(byteStream), publicId_(), systemId_(), @@ -152,9 +152,9 @@ public: { } - virtual ~basic_InputSource() { } + virtual ~InputSource() { } - basic_InputSource& operator=(const basic_InputSource& rhs) + InputSource& operator=(const InputSource& rhs) { byteStream_ = rhs.byteStream_; publicId_ = rhs.publicId_; @@ -173,8 +173,8 @@ public: * * @param publicId The public identifier as a string. * @see #getPublicId - * @see basic_Locator#getPublicId - * @see basic_SAXParseException#getPublicId + * @see Locator#getPublicId + * @see SAXParseException#getPublicId */ void setPublicId(const stringT& publicId) { publicId_ = publicId; } /** @@ -204,8 +204,8 @@ public: * @param systemId The system identifier as a string. * @see #setEncoding * @see #getSystemId - * @see basic_Locator#getSystemId - * @see basic_SAXParseException#getSystemId + * @see Locator#getSystemId + * @see SAXParseException#getSystemId */ void setSystemId(const stringT& systemId) { systemId_ = systemId; } /** @@ -232,7 +232,7 @@ public: * byte stream, it should set it with the setEncoding method.

* * @param byteStream A byte stream containing an XML document or - * other entity. The basic_InputSource does not assume + * other entity. The InputSource does not assume * ownership of byteStream. * @see #setByteStream(std::auto_ptr) To transfer ownership of * an std::istream to an InputSource @@ -255,7 +255,7 @@ public: * byte stream, it should set it with the setEncoding method.

* * @param byteStream A byte stream containing an XML document or - * other entity. The basic_InputSource assumes + * other entity. The InputSource assumes * ownership of byteStream. * @see #setByteStream(std::istream&) * @see #setEncoding @@ -328,13 +328,8 @@ private: stringT systemId_; stringT encoding_; - bool operator==(const basic_InputSource&); // no implementation -}; // class basic_InputSource - -typedef basic_InputSource InputSource; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_InputSource wInputSource; -#endif + bool operator==(const InputSource&); // no implementation +}; // class InputSource } // namespace SAX } // namespace Arabica diff --git a/include/SAX/Locator.hpp b/include/SAX/Locator.hpp index 6c3dd75f..574d5833 100644 --- a/include/SAX/Locator.hpp +++ b/include/SAX/Locator.hpp @@ -19,7 +19,7 @@ namespace SAX *

If a SAX parser provides location information to the SAX * application, it does so by implementing this interface and then * passing an instance to the application using the content - * handler's {@link basic_ContentHandler#setDocumentLocator + * handler's {@link ContentHandler#setDocumentLocator * setDocumentLocator} method. The application can use the * object to obtain the location of any other content handler event * in the XML source document.

@@ -33,7 +33,7 @@ namespace SAX * very strongly encouraged to do so. If the parser supplies a * locator, it must do so before reporting any other document events. * If no locator has been set by the time the application receives - * the {@link basic_ContentHandler#startDocument startDocument} + * the {@link ContentHandler#startDocument startDocument} * event, the application should assume that a locator is not * available.

* @@ -41,15 +41,15 @@ namespace SAX * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_ContentHandler#setDocumentLocator + * @see ContentHandler#setDocumentLocator */ template -class basic_Locator +class Locator { public: typedef string_type stringT; - virtual ~basic_Locator() { } + virtual ~Locator() { } /** * Return the public identifier for the current document event. @@ -124,11 +124,6 @@ public: virtual int getColumnNumber() const = 0; }; // class Locator -typedef basic_Locator Locator; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_Locator wLocator; -#endif - } // namespace SAX } // namespace Arabica diff --git a/include/SAX/Parser.hpp b/include/SAX/Parser.hpp index b07fdc07..d95dd880 100644 --- a/include/SAX/Parser.hpp +++ b/include/SAX/Parser.hpp @@ -21,7 +21,7 @@ namespace SAX * Basic interface for SAX (Simple API for XML) parsers. * *

This was the main event supplier interface for SAX1; it has - * been replaced in SAX2 by {@link basic_XMLReader XMLReader}, + * been replaced in SAX2 by {@link XMLReader XMLReader}, * which includes Namespace support and sophisticated configurability * and extensibility.

* @@ -38,30 +38,30 @@ namespace SAX * invoke the parse() methods recursively within a parse.

* * @deprecated This interface has been replaced by the SAX2 - * {@link basic_XMLReader XMLReader} + * {@link XMLReader XMLReader} * interface, which includes Namespace support. * @since SAX 1.0 * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_EntityResolver - * @see basic_DTDHandler - * @see basic_DocumentHandler - * @see basic_ErrorHandler - * @see basic_HandlerBase - * @see basic_InputSource + * @see EntityResolver + * @see DTDHandler + * @see DocumentHandler + * @see ErrorHandler + * @see HandlerBase + * @see InputSource */ template -class basic_Parser +class Parser { public: typedef string_name stringT; - typedef basic_EntityResolver EntityResolverT; - typedef basic_DTDHandler DTDHandlerT; - typedef basic_DocumentHandler DocumentHandlerT; - typedef basic_InputSource InputSourceT; + typedef EntityResolver EntityResolverT; + typedef DTDHandler DTDHandlerT; + typedef DocumentHandler DocumentHandlerT; + typedef InputSource InputSourceT; - virtual ~basic_Parser() { } + virtual ~Parser() { } // virtual void setLocale(Locale locale) throws SAXException = 0; /** @@ -77,8 +77,8 @@ public: * the new resolver immediately.

* * @param resolver The object for resolving entities. - * @see basic_EntityResolver - * @see basic_HandlerBase + * @see EntityResolver + * @see HandlerBase */ virtual void setEntityResolver(EntityResolverT& resolver) = 0; /** @@ -94,8 +94,8 @@ public: * begin using the new handler immediately.

* * @param handler The DTD handler. - * @see basic_DTDHandler - * @see basic_HandlerBase + * @see DTDHandler + * @see HandlerBase */ virtual void setDTDHandler(DTDHandlerT& handler) = 0; /** @@ -111,8 +111,8 @@ public: * handler immediately.

* * @param handler The document handler. - * @see basic_DocumentHandler - * @see basic_HandlerBase + * @see DocumentHandler + * @see HandlerBase */ virtual void setDocumentHandler(DocumentHandlerT& handler) = 0; /** @@ -128,9 +128,9 @@ public: * handler immediately.

* * @param handler The error handler. - * @see basic_ErrorHandler - * @see basic_SAXException - * @see basic_HandlerBase + * @see ErrorHandler + * @see SAXException + * @see HandlerBase */ virtual void setErrorHandler(ErrorHandler& handler) = 0; @@ -149,19 +149,14 @@ public: * * @param source The input source for the top-level of the * XML document. - * @see basic_InputSource + * @see InputSource * @see #setEntityResolver * @see #setDTDHandler * @see #setDocumentHandler * @see #setErrorHandler */ virtual void parse(InputSourceT& source) = 0; -}; // class basic_Parser - -typedef basic_Parser Parser; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_Parser wParser; -#endif +}; // class Parser } // namespace SAX } // namespace Arabica diff --git a/include/SAX/SAXException.hpp b/include/SAX/SAXException.hpp index 7d4edb54..3712d476 100644 --- a/include/SAX/SAXException.hpp +++ b/include/SAX/SAXException.hpp @@ -24,13 +24,13 @@ namespace SAX * *

If the parser or application needs to include information about a * specific location in an XML document, it should use the - * {@link basic_SAXParseException SAXParseException} subclass.

+ * {@link SAXParseException SAXParseException} subclass.

* * @since SAX 1.0 * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_SAXParseException + * @see SAXParseException */ class SAXException : public std::runtime_error { diff --git a/include/SAX/SAXParseException.hpp b/include/SAX/SAXParseException.hpp index bf83f8b0..6a9b1eb2 100644 --- a/include/SAX/SAXParseException.hpp +++ b/include/SAX/SAXParseException.hpp @@ -34,16 +34,16 @@ namespace SAX * @version 2.0 * @see SAXException * @see Locator - * @see basic_ErrorHandler + * @see ErrorHandler */ template -class basic_SAXParseException : public SAXException +class SAXParseException : public SAXException { public: typedef string_type stringT; - typedef basic_Locator LocatorT; + typedef Locator LocatorT; - basic_SAXParseException(const std::string& message) : + SAXParseException(const std::string& message) : SAXException(message), publicId_(), systemId_(), @@ -51,9 +51,9 @@ public: columnNumber_(-1) { setMsg(); - } // basic_SAXParseException + } // SAXParseException - basic_SAXParseException(const std::string& message, + SAXParseException(const std::string& message, const LocatorT& locator) : SAXException(message), publicId_(locator.getPublicId()), @@ -62,9 +62,9 @@ public: columnNumber_(locator.getColumnNumber()) { setMsg(); - } // basic_SAXParseException + } // SAXParseException - basic_SAXParseException(const std::string& message, + SAXParseException(const std::string& message, const stringT& publicId, const stringT& systemId, int lineNumber, @@ -76,9 +76,9 @@ public: columnNumber_(columnNumber) { setMsg(); - } // basic_SAXParseException + } // SAXParseException - basic_SAXParseException(const basic_SAXParseException& rhs) : + SAXParseException(const SAXParseException& rhs) : SAXException(rhs), msg_(rhs.msg_), publicId_(rhs.publicId_), @@ -86,9 +86,9 @@ public: lineNumber_(rhs.lineNumber_), columnNumber_(rhs.columnNumber_) { - } // basic_SAXParseException + } // SAXParseException - basic_SAXParseException& operator=(const basic_SAXParseException& rhs) + SAXParseException& operator=(const SAXParseException& rhs) { SAXException::operator=(rhs); @@ -101,14 +101,14 @@ public: return *this; } // operator= - virtual ~basic_SAXParseException() throw() { } + virtual ~SAXParseException() throw() { } /** * Get the public identifier of the entity where the exception occurred. * * @return A string containing the public identifier, or an empty string * if none is available. - * @see basic_Locator#getPublicId + * @see Locator#getPublicId */ const stringT& getPublicId() const { return publicId_; } /** @@ -119,7 +119,7 @@ public: * * @return A string containing the system identifier, or an empty string * if none is available. - * @see basic_Locator#getSystemId + * @see Locator#getSystemId */ const stringT& getSystemId() const { return systemId_; } /** @@ -127,7 +127,7 @@ public: * * @return An integer representing the line number, or -1 * if none is available. - * @see basic_Locator#getLineNumber + * @see Locator#getLineNumber */ int getLineNumber() const { return lineNumber_; } /** @@ -137,7 +137,7 @@ public: * * @return An integer representing the column number, or -1 * if none is available. - * @see basic_Locator#getColumnNumber + * @see Locator#getColumnNumber */ int getColumnNumber() const { return columnNumber_; } @@ -162,13 +162,8 @@ private: int lineNumber_; int columnNumber_; - basic_SAXParseException(); -}; // class basic_SAXParseException - -typedef basic_SAXParseException SAXParseException; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_SAXParseException wSAXParseException; -#endif + SAXParseException(); +}; // class SAXParseException } // namespace SAX } // namespace Arabica diff --git a/include/SAX/XMLFilter.hpp b/include/SAX/XMLFilter.hpp index cce32a4f..9238f5c8 100644 --- a/include/SAX/XMLFilter.hpp +++ b/include/SAX/XMLFilter.hpp @@ -23,25 +23,25 @@ namespace SAX * events as they pass on to the final application.

* *

The XMLFilterImpl helper class provides a convenient base - * for creating SAX2 filters, by passing on all {@link basic_EntityResolver - * EntityResolver}, {@link basic_DTDHandler DTDHandler}, - * {@link basic_ContentHandler ContentHandler} and {@link ErrorHandler + * for creating SAX2 filters, by passing on all {@link EntityResolver + * EntityResolver}, {@link DTDHandler DTDHandler}, + * {@link ContentHandler ContentHandler} and {@link ErrorHandler * ErrorHandler} events automatically.

* * @since SAX 2.0 * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_XMLFilterImpl + * @see XMLFilterImpl */ template -class basic_XMLFilter : public basic_XMLReader +class XMLFilter : public XMLReaderInterface { public: typedef string_type stringT; - typedef basic_XMLReader XMLReaderT; + typedef XMLReaderInterface XMLReaderT; - virtual ~basic_XMLFilter() { } + virtual ~XMLFilter() { } /** * Set the parent reader. @@ -63,12 +63,7 @@ public: * @return The parent filter, or 0 if none has been set. */ virtual XMLReaderT* getParent() const = 0; -}; // class basic_XMLFilter - -typedef basic_XMLFilter XMLFilter; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_XMLFilter wXMLFilter; -#endif +}; // class XMLFilter } // namespace SAX } // namespace Arabica diff --git a/include/SAX/XMLReader.hpp b/include/SAX/XMLReader.hpp index 31980bf4..ddefeee6 100644 --- a/include/SAX/XMLReader.hpp +++ b/include/SAX/XMLReader.hpp @@ -38,7 +38,7 @@ namespace SAX * to return before reporting the next event.

* *

This interface replaces the (now deprecated) SAX 1.0 {@link - * basic_Parser Parser} interface. The XMLReader interface + * Parser Parser} interface. The XMLReader interface * contains two important enhancements over the old Parser * interface:

* @@ -56,24 +56,24 @@ namespace SAX * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_XMLFilter - * @see basic_helpers.ParserAdapter - * @see basic_helpers.XMLReaderAdapter + * @see XMLFilter + * @see helpers.ParserAdapter + * @see helpers.XMLReaderAdapter */ template -class basic_XMLReader +class XMLReaderInterface { public: typedef string_type stringT; - typedef basic_EntityResolver EntityResolverT; - typedef basic_DTDHandler DTDHandlerT; - typedef basic_ContentHandler ContentHandlerT; - typedef basic_InputSource InputSourceT; - typedef basic_ErrorHandler ErrorHandlerT; - typedef basic_DeclHandler DeclHandlerT; - typedef basic_LexicalHandler LexicalHandlerT; + typedef EntityResolver EntityResolverT; + typedef DTDHandler DTDHandlerT; + typedef ContentHandler ContentHandlerT; + typedef InputSource InputSourceT; + typedef ErrorHandler ErrorHandlerT; + typedef DeclHandler DeclHandlerT; + typedef LexicalHandler LexicalHandlerT; - virtual ~basic_XMLReader() { } + virtual ~XMLReaderInterface() { } ///////////////////////////////////////////////// // Configuration @@ -134,7 +134,7 @@ public: *

The feature name is any fully-qualified URI. It is * possible for an XMLReader to recognize a feature name but * to be unable to set its value; this is especially true - * in the case of an adapter for a SAX1 {@link basic_Parser Parser}, + * in the case of an adapter for a SAX1 {@link Parser Parser}, * which has no way of affecting whether the underlying parser is * validating, for example.

* @@ -293,7 +293,7 @@ public: * by the application before it is passed to the parser.

* * @param systemId The system identifier (URI). - * @see #parse(basic_InputSource&) + * @see #parse(InputSource&) */ void parse(const stringT& systemId) { @@ -323,7 +323,7 @@ public: * * @param input The input source for the top-level of the * XML document. - * @see basic_InputSource + * @see InputSource * @see #parse(const stringT&) * @see #setEntityResolver * @see #setDTDHandler @@ -363,7 +363,7 @@ public: *

The property name is any fully-qualified URI. It is * possible for an XMLReader to recognize a property name but * to be unable to return its state; this is especially true - * in the case of an adapter for a SAX1 {@link basic_Parser + * in the case of an adapter for a SAX1 {@link Parser * Parser}.

* *

XMLReaders are not required to recognize any specific @@ -403,7 +403,7 @@ public: *

The property name is any fully-qualified URI. It is * possible for an XMLReader to recognize a property name but * to be unable to set its value; this is especially true - * in the case of an adapter for a SAX1 {@link basic_Parser + * in the case of an adapter for a SAX1 {@link Parser * Parser}.

* *

XMLReaders are not required to recognize setting @@ -431,7 +431,7 @@ public: Property* prop = new Property(value); doSetProperty(name, std::auto_ptr(prop)); } // setProperty -}; // class basic_XMLReader +}; // class XMLReaderInterface } // namespace SAX } // namespace Arabica diff --git a/include/SAX/ext/Attributes2.hpp b/include/SAX/ext/Attributes2.hpp index a8f6c3c6..48d38012 100644 --- a/include/SAX/ext/Attributes2.hpp +++ b/include/SAX/ext/Attributes2.hpp @@ -25,16 +25,16 @@ namespace SAX * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_Attributes - * @see basic_Attributes2Impl + * @see Attributes + * @see Attributes2Impl */ template -class basic_Attributes2 : public basic_Attributes +class Attributes2 : public Attributes { public: typedef string_type stringT; - virtual ~basic_Attributes2() { } + virtual ~Attributes2() { } /** * Returns true unless the attribute value was provided by DTD defaulting. @@ -70,12 +70,7 @@ public: * does not identify an attribute */ virtual bool isSpecified(const stringT& uri, const stringT& localName) const = 0; -}; // class basic_Attributes2 - -typedef basic_Attributes2 Attributes2; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_Attributes2 wAttributes2; -#endif +}; // class Attributes2 } // namespace SAX } // namespace Arabica diff --git a/include/SAX/ext/DeclHandler.hpp b/include/SAX/ext/DeclHandler.hpp index f05fd3c7..94cb58c0 100644 --- a/include/SAX/ext/DeclHandler.hpp +++ b/include/SAX/ext/DeclHandler.hpp @@ -22,15 +22,15 @@ namespace SAX * *

Note that data-related DTD declarations (unparsed entities and * notations) are already reported through the {@link - * basic_DTDHandler DTDHandler} interface.

+ * DTDHandler DTDHandler} interface.

* *

If you are using the declaration handler together with a lexical * handler, all of the events will occur between the - * {@link basic_LexicalHandler#startDTD startDTD} and the - * {@link basic_LexicalHandler#endDTD endDTD} events.

+ * {@link LexicalHandler#startDTD startDTD} and the + * {@link LexicalHandler#endDTD endDTD} events.

* *

To set the DeclHandler for an XML reader, use the - * {@link basic_XMLReader#setProperty setProperty} method + * {@link XMLReader#setProperty setProperty} method * with the propertyId "http://xml.org/sax/properties/declaration-handler". * If the reader does not support declaration events, it will throw a * {@link SAXNotRecognizedException SAXNotRecognizedException} @@ -42,14 +42,14 @@ namespace SAX * @author Jez Higgins, * jez@jezuk.co.uk * @version 1.0 - * @see basic_XMLReader + * @see XMLReader */ template -class basic_DeclHandler +class DeclHandler { public: typedef string_type stringT; - virtual ~basic_DeclHandler() { } + virtual ~DeclHandler() { } /** * Report an element type declaration. @@ -106,7 +106,7 @@ public: * entity, the name will begin with '%'. * @param value The replacement text of the entity. * @see #externalEntityDecl - * @see basic_DTDHandler#unparsedEntityDecl + * @see DTDHandler#unparsedEntityDecl */ virtual void internalEntityDecl(const stringT& name, const stringT& value) = 0; /** @@ -121,17 +121,12 @@ public: * an empty string if none was declared. * @param systemId The declared system identifier of the entity. * @see #internalEntityDecl - * @see basic_DTDHandler#unparsedEntityDecl + * @see DTDHandler#unparsedEntityDecl */ virtual void externalEntityDecl(const stringT& name, const stringT& publicId, const stringT& systemId) = 0; -}; // class basic_DeclHandler - -typedef basic_DeclHandler DeclHandler; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_DeclHandler wDeclHandler; -#endif +}; // class DeclHandler } // namespace SAX } // namespace Arabica diff --git a/include/SAX/ext/DefaultHandler2.hpp b/include/SAX/ext/DefaultHandler2.hpp index 8ecc2eb8..00b54787 100644 --- a/include/SAX/ext/DefaultHandler2.hpp +++ b/include/SAX/ext/DefaultHandler2.hpp @@ -20,45 +20,40 @@ namespace SAX * Default base class for SAX2 event handlers. * *

This class extends the SAX2 base - * {@link basic_DefaultHandler} handler class to - * support the SAX2 {@link basic_LexicalHandler LexicalHandler} - * and {@link basic_DeclHandler DeclHandler} extensions. + * {@link DefaultHandler} handler class to + * support the SAX2 {@link LexicalHandler LexicalHandler} + * and {@link DeclHandler DeclHandler} extensions. * The added handler methods just return; subclassers may * override on a method-by-method basis. * * Note: this class might yet learn that the * ContentHandler.setDocumentLocator() call might be - * passed a {@link basic_Locator2 Locator2} object, and + * passed a {@link Locator2 Locator2} object, and * that the ContentHandler.startElement() call might be - * passed a {@link basic_Attributes2 Attributes2} object. + * passed a {@link Attributes2 Attributes2} object. * * @since SAX 2.0 * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_DefaultHandler - * @see basic_LexicalHandler - * @see basic_DeclHandler + * @see DefaultHandler + * @see LexicalHandler + * @see DeclHandler */ template -class basic_DefaultHandler2 : public basic_DefaultHandler +class DefaultHandler2 : public DefaultHandler { public: typedef string_type stringT; - basic_DefaultHandler2() { } - virtual ~basic_DefaultHandler2() { } + DefaultHandler2() { } + virtual ~DefaultHandler2() { } private: - basic_DefaultHandler2(const basic_DefaultHandler2&); - basic_DefaultHandler2& operator=(const basic_DefaultHandler2&); - bool operator==(const basic_DefaultHandler2&); -}; // class basic_DefaultHandler - -typedef basic_DefaultHandler2 DefaultHandler2; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_DefaultHandler2 wDefaultHandler2; -#endif + DefaultHandler2(const DefaultHandler2&); + DefaultHandler2& operator=(const DefaultHandler2&); + bool operator==(const DefaultHandler2&); +}; // class DefaultHandler } // namespace SAX } // namespace Arabica diff --git a/include/SAX/ext/LexicalHandler.hpp b/include/SAX/ext/LexicalHandler.hpp index 1637a20f..b27cbcdd 100644 --- a/include/SAX/ext/LexicalHandler.hpp +++ b/include/SAX/ext/LexicalHandler.hpp @@ -27,7 +27,7 @@ namespace SAX * endDocument events.

* *

To set the LexicalHandler for an XML reader, use the - * {@link basic_XMLReader#setProperty setProperty} method + * {@link XMLReader#setProperty setProperty} method * with the propertyId "http://xml.org/sax/properties/lexical-handler". * If the reader does not support lexical events, it will throw a * {@link SAXNotRecognizedException SAXNotRecognizedException} @@ -39,17 +39,17 @@ namespace SAX * @author Jez Higgins, * jez@jezuk.co.uk * @version 1.0 - * @see basic_XMLReader#setProperty + * @see XMLReader#setProperty * @see SAXNotRecognizedException * @see SAXNotSupportedException */ template -class basic_LexicalHandler +class LexicalHandler { public: typedef string_type stringT; - virtual ~basic_LexicalHandler() { } + virtual ~LexicalHandler() { } /** * Report the start of DTD declarations, if any. @@ -59,8 +59,8 @@ public: * this method will not be invoked.

* *

All declarations reported through - * {@link basic_DTDHandler DTDHandler} or - * {@link basic_DeclHandler DeclHandler} events must appear + * {@link DTDHandler DTDHandler} or + * {@link DeclHandler DeclHandler} events must appear * between the startDTD and {@link #endDTD endDTD} events. * Declarations are assumed to belong to the internal DTD subset * unless they appear between {@link #startEntity startEntity} @@ -74,7 +74,7 @@ public: *

Note that the start/endDTD events will appear within * the start/endDocument events from ContentHandler and * before the first - * {@link basic_ContentHandler#startElement startElement} + * {@link ContentHandler#startElement startElement} * event.

* * @param name The document type name. @@ -116,11 +116,11 @@ public: *

When a SAX2 driver is providing these events, all other * events must be properly nested within start/end entity * events. There is no additional requirement that events from - * {@link basic_DeclHandler DeclHandler} or - * {@link basic_DTDHandler DTDHandler} be properly ordered.

+ * {@link DeclHandler DeclHandler} or + * {@link DTDHandler DTDHandler} be properly ordered.

* *

Note that skipped entities will be reported through the - * {@link basic_ContentHandler#skippedEntity skippedEntity} + * {@link ContentHandler#skippedEntity skippedEntity} * event, which is part of the ContentHandler interface.

* *

Because of the streaming event model that SAX uses, some @@ -144,8 +144,8 @@ public: * entity, the name will begin with '%', and if it is the * external DTD subset, it will be "[dtd]". * @see #endEntity - * @see basic_DeclHandler#internalEntityDecl - * @see basic_DeclHandler#externalEntityDecl + * @see DeclHandler#internalEntityDecl + * @see DeclHandler#externalEntityDecl */ virtual void startEntity(const stringT& name) = 0; /** @@ -160,7 +160,7 @@ public: * Report the start of a CDATA section. * *

The contents of the CDATA section will be reported through - * the regular {@link basic_ContentHandler#characters + * the regular {@link ContentHandler#characters * characters} event; this event is intended only to report * the boundary.

* @@ -186,12 +186,7 @@ public: * @param text A string holding the comment. */ virtual void comment(const stringT& text) = 0; -}; // class basic_LexicalHandler - -typedef basic_LexicalHandler LexicalHandler; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_LexicalHandler wLexicalHandler; -#endif +}; // class LexicalHandler } // namespace SAX } // namespace Arabica diff --git a/include/SAX/ext/Locator2.hpp b/include/SAX/ext/Locator2.hpp index 8d1515f6..4512f190 100644 --- a/include/SAX/ext/Locator2.hpp +++ b/include/SAX/ext/Locator2.hpp @@ -26,12 +26,12 @@ namespace SAX * @version 2.0 */ template -class basic_Locator2 : public basic_Locator +class Locator2 : public Locator { public: typedef string_type stringT; - virtual ~basic_Locator2() { } + virtual ~Locator2() { } /** * Returns the version of XML used for the entity. This will normally @@ -65,12 +65,7 @@ public: * @return Name of the character encoding being used to interpret the entity's text. */ virtual stringT getEncoding() const = 0; -}; // class basic_Locator2 - -typedef basic_Locator2 Locator2; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_Locator2 wLocator2; -#endif +}; // class Locator2 } // namespace SAX } // namespace Arabica diff --git a/include/SAX/ext/ProgressiveParser.hpp b/include/SAX/ext/ProgressiveParser.hpp index 25fd7e47..21876e8f 100644 --- a/include/SAX/ext/ProgressiveParser.hpp +++ b/include/SAX/ext/ProgressiveParser.hpp @@ -40,10 +40,10 @@ namespace SAX }; // XMLPScanToken template - class basic_ProgressiveParser : public basic_XMLReader + class ProgressiveParser : public XMLReaderInterface { public: - typedef typename basic_XMLReader::InputSourceT InputSourceT; + typedef typename XMLReaderInterface::InputSourceT InputSourceT; /** @name Progressive Parsing Methods */ //@{ @@ -153,12 +153,8 @@ namespace SAX */ virtual void parseReset(XMLPScanToken& token) = 0; //@} - }; // basic_ProgressiveParser + }; // ProgressiveParser - typedef basic_ProgressiveParser ProgressiveParser; -#ifndef ARABICA_NO_WCHAR_T - typedef basic_ProgressiveParser wProgressiveParser; -#endif } // namespace SAX } // namespace Arabica diff --git a/include/SAX/filter/NamespaceTracker.hpp b/include/SAX/filter/NamespaceTracker.hpp index 6ce6d0da..941fa93a 100644 --- a/include/SAX/filter/NamespaceTracker.hpp +++ b/include/SAX/filter/NamespaceTracker.hpp @@ -13,23 +13,23 @@ namespace SAX { template > -class NamespaceTracker : public basic_XMLFilterImpl +class NamespaceTracker : public XMLFilterImpl { - typedef basic_NamespaceSupport NamespaceSupportT; + typedef NamespaceSupport NamespaceSupportT; typedef typename NamespaceSupportT::stringListT stringListT; - typedef basic_XMLFilterImpl XMLFilterT; + typedef XMLFilterImpl XMLFilterT; public: - typedef basic_XMLReader XMLReaderT; - typedef basic_Attributes AttributesT; + typedef XMLReaderInterface XMLReaderT; + typedef Attributes AttributesT; NamespaceTracker() : - basic_XMLFilterImpl() + XMLFilterImpl() { } // NamespaceTracker NamespaceTracker(XMLReaderT& parent) : - basic_XMLFilterImpl(parent) + XMLFilterImpl(parent) { } // NamespaceTracker diff --git a/include/SAX/filter/PYXWriter.hpp b/include/SAX/filter/PYXWriter.hpp index 01ab274a..9f0db66f 100644 --- a/include/SAX/filter/PYXWriter.hpp +++ b/include/SAX/filter/PYXWriter.hpp @@ -12,7 +12,7 @@ namespace SAX { template -class PYXWriter : public basic_XMLFilterImpl +class PYXWriter : public XMLFilterImpl { public: typedef string_type stringT; @@ -20,9 +20,9 @@ class PYXWriter : public basic_XMLFilterImpl typedef typename string_type::value_type charT; typedef typename string_type::traits_type traitsT; typedef std::basic_ostream ostreamT; - typedef basic_XMLReader XMLReaderT; - typedef basic_XMLFilterImpl XMLFilterT; - typedef typename basic_XMLFilterImpl::AttributesT AttributesT; + typedef XMLReaderInterface XMLReaderT; + typedef XMLFilterImpl XMLFilterT; + typedef typename XMLFilterImpl::AttributesT AttributesT; typedef Arabica::Unicode UnicodeT; private: using XMLFilterT::getParent; diff --git a/include/SAX/filter/TextCoalescer.hpp b/include/SAX/filter/TextCoalescer.hpp index dee71d67..374f2aa3 100644 --- a/include/SAX/filter/TextCoalescer.hpp +++ b/include/SAX/filter/TextCoalescer.hpp @@ -17,23 +17,23 @@ namespace SAX This filter buffers up multiple calls to characters(...) and reports text in a single lump. */ template > -class TextCoalescer : public basic_XMLFilterImpl +class TextCoalescer : public XMLFilterImpl { - typedef basic_XMLFilterImpl XMLFilterT; + typedef XMLFilterImpl XMLFilterT; public: - typedef basic_XMLReader XMLReaderT; - typedef basic_Attributes AttributesT; + typedef XMLReaderInterface XMLReaderT; + typedef Attributes AttributesT; TextCoalescer() : XMLFilterT() { - } // basic_TextCoalescer + } // TextCoalescer TextCoalescer(XMLReaderT& parent) : XMLFilterT(parent) { - } // basic_TextCoalescer + } // TextCoalescer virtual void startElement(const string_type& namespaceURI, const string_type& localName, const string_type& qName, const AttributesT& atts) @@ -93,7 +93,7 @@ private: buffer_ = string_adaptor::empty_string(); } // flush string_type buffer_; -}; // class basic_TextCoalescer +}; // class TextCoalescer } // namespace SAX } // namespace Arabica diff --git a/include/SAX/filter/TextOnly.hpp b/include/SAX/filter/TextOnly.hpp index f4196d80..9f57e612 100644 --- a/include/SAX/filter/TextOnly.hpp +++ b/include/SAX/filter/TextOnly.hpp @@ -14,12 +14,12 @@ namespace SAX Strips out everything except startDocument, endDocument and text */ template > -class TextOnly : public basic_XMLFilterImpl +class TextOnly : public XMLFilterImpl { - typedef basic_XMLFilterImpl XMLFilterT; + typedef XMLFilterImpl XMLFilterT; public: - typedef basic_XMLReader XMLReaderT; + typedef XMLReaderInterface XMLReaderT; TextOnly() : XMLFilterT(0) diff --git a/include/SAX/filter/WhitespaceStripperFilter.hpp b/include/SAX/filter/WhitespaceStripperFilter.hpp index a97ff718..915548d8 100644 --- a/include/SAX/filter/WhitespaceStripperFilter.hpp +++ b/include/SAX/filter/WhitespaceStripperFilter.hpp @@ -11,12 +11,12 @@ namespace SAX { template > -class WhitespaceStripper : public SAX::basic_XMLFilterImpl +class WhitespaceStripper : public SAX::XMLFilterImpl { public: typedef string_type stringT; - typedef SAX::basic_XMLFilterImpl baseT; - typedef SAX::basic_XMLReader XMLReaderT; + typedef SAX::XMLFilterImpl baseT; + typedef SAX::XMLReader XMLReaderT; WhitespaceStripper() : baseT() diff --git a/include/SAX/filter/Writer.hpp b/include/SAX/filter/Writer.hpp index 290136e7..4a108a7d 100644 --- a/include/SAX/filter/Writer.hpp +++ b/include/SAX/filter/Writer.hpp @@ -18,29 +18,29 @@ namespace SAX { template -class basic_Writer : public basic_XMLFilterImpl +class Writer : public XMLFilterImpl { public: typedef string_type stringT; - typedef basic_Writer WriterT; + typedef Writer WriterT; typedef typename string_type::value_type charT; typedef typename string_type::traits_type traitsT; typedef std::basic_ostream ostreamT; - typedef basic_XMLReader XMLReaderT; - typedef basic_XMLFilterImpl XMLFilterT; - typedef typename basic_XMLFilterImpl::AttributesT AttributesT; + typedef XMLReaderInterface XMLReaderT; + typedef XMLFilterImpl XMLFilterT; + typedef typename XMLFilterImpl::AttributesT AttributesT; typedef Arabica::Unicode UnicodeT; typedef Arabica::XML::text_escaper text_escaperT; typedef Arabica::XML::attribute_escaper attribute_escaperT; private: - typedef basic_LexicalHandler LexicalHandlerT; - typedef basic_DeclHandler DeclHandlerT; + typedef LexicalHandler LexicalHandlerT; + typedef DeclHandler DeclHandlerT; typedef typename XMLReaderT::InputSourceT InputSourceT; typedef typename XMLReaderT::PropertyBase PropertyBaseT; using XMLFilterT::getParent; public: - basic_Writer(ostreamT& stream, unsigned int indent = 2) : + Writer(ostreamT& stream, unsigned int indent = 2) : inCDATA_(false), inDTD_(false), internalSubset_(true), @@ -50,9 +50,9 @@ class basic_Writer : public basic_XMLFilterImpl encoding_(), lastTag_(startTag) { - } // basic_Writer + } // Writer - basic_Writer(ostreamT& stream, XMLReaderT& parent, unsigned int indent = 2) : + Writer(ostreamT& stream, XMLReaderT& parent, unsigned int indent = 2) : XMLFilterT(parent), inCDATA_(false), inDTD_(false), @@ -63,9 +63,9 @@ class basic_Writer : public basic_XMLFilterImpl encoding_(), lastTag_(startTag) { - } // basic_Writer + } // Writer - basic_Writer(ostreamT& stream, const stringT& encoding, unsigned int indent = 2) : + Writer(ostreamT& stream, const stringT& encoding, unsigned int indent = 2) : inCDATA_(false), inDTD_(false), internalSubset_(true), @@ -75,9 +75,9 @@ class basic_Writer : public basic_XMLFilterImpl encoding_(encoding), lastTag_(startTag) { - } // basic_Writer + } // Writer - basic_Writer(ostreamT& stream, XMLReaderT& parent, const stringT& encoding, unsigned int indent = 2) : + Writer(ostreamT& stream, XMLReaderT& parent, const stringT& encoding, unsigned int indent = 2) : XMLFilterT(parent), inCDATA_(false), inDTD_(false), @@ -88,7 +88,7 @@ class basic_Writer : public basic_XMLFilterImpl encoding_(encoding), lastTag_(startTag) { - } // basic_Writer + } // Writer // setEncoding // Sets the encoding included in the XML declaration. If not set, then the encoding @@ -149,10 +149,10 @@ class basic_Writer : public basic_XMLFilterImpl enum { startTag, endTag, docTag } lastTag_; const SAX::PropertyNames properties_; -}; // class basic_Writer +}; // class Writer template -void basic_Writer::startDocument() +void Writer::startDocument() { *stream_ << UnicodeT::LESS_THAN_SIGN << UnicodeT::QUESTION_MARK @@ -202,14 +202,14 @@ void basic_Writer::startDocument() } // startDocument template -void basic_Writer::endDocument() +void Writer::endDocument() { XMLFilterT::endDocument(); lastTag_ = endTag; } // endDocument template -void basic_Writer::startElement( +void Writer::startElement( const stringT& namespaceURI, const stringT& localName, const stringT& qName, const AttributesT& atts) { @@ -237,7 +237,7 @@ void basic_Writer::startElement( } // startElement template -void basic_Writer::endElement( +void Writer::endElement( const stringT& namespaceURI, const stringT& localName, const stringT& qName) { @@ -256,7 +256,7 @@ void basic_Writer::endElement( } // endElement template -void basic_Writer::characters(const stringT& ch) +void Writer::characters(const stringT& ch) { if(!inCDATA_) std::for_each(ch.begin(), ch.end(), text_escaperT(*stream_)); @@ -267,7 +267,7 @@ void basic_Writer::characters(const stringT& ch) } // characters template -void basic_Writer::ignorableWhitespace(const stringT& ch) +void Writer::ignorableWhitespace(const stringT& ch) { *stream_ << ch; @@ -275,7 +275,7 @@ void basic_Writer::ignorableWhitespace(const stringT& ch) } // ignorableWhitespace template -void basic_Writer::processingInstruction(const stringT& target, const stringT& data) +void Writer::processingInstruction(const stringT& target, const stringT& data) { if((!inDTD_) || (inDTD_ && internalSubset_)) { @@ -294,7 +294,7 @@ void basic_Writer::processingInstruction(const stringT& target, con } // processingInstruction template -void basic_Writer::skippedEntity(const stringT& name) +void Writer::skippedEntity(const stringT& name) { if(!isDtd(name)) *stream_ << UnicodeT::AMPERSAND << name << UnicodeT::SEMI_COLON; @@ -303,14 +303,14 @@ void basic_Writer::skippedEntity(const stringT& name) } // skippedEntity template -void basic_Writer::doIndent() +void Writer::doIndent() { for(int i = 0; i < depth_; ++i) *stream_ << UnicodeT::SPACE; } // doIndent template -bool basic_Writer::isDtd(const string_type& name) +bool Writer::isDtd(const string_type& name) { return (name.length() == 5 && name[0] == UnicodeT::LEFT_SQUARE_BRACKET && @@ -321,7 +321,7 @@ bool basic_Writer::isDtd(const string_type& name) } // isDtd template -void basic_Writer::startDTD(const stringT& name, const stringT& publicId, const stringT& systemId) +void Writer::startDTD(const stringT& name, const stringT& publicId, const stringT& systemId) { inDTD_ = true; depth_ += indent_; @@ -348,7 +348,7 @@ void basic_Writer::startDTD(const stringT& name, const stringT& pub } // startDTD template -void basic_Writer::endDTD() +void Writer::endDTD() { *stream_ << UnicodeT::RIGHT_SQUARE_BRACKET << UnicodeT::GREATER_THAN_SIGN @@ -361,7 +361,7 @@ void basic_Writer::endDTD() } // endDTD template -void basic_Writer::startEntity(const stringT& name) +void Writer::startEntity(const stringT& name) { if(isDtd(name)) internalSubset_ = false; @@ -370,7 +370,7 @@ void basic_Writer::startEntity(const stringT& name) } // startEntity template -void basic_Writer::endEntity(const stringT& name) +void Writer::endEntity(const stringT& name) { if(isDtd(name)) internalSubset_ = true; @@ -379,7 +379,7 @@ void basic_Writer::endEntity(const stringT& name) } // endEntity template -void basic_Writer::startCDATA() +void Writer::startCDATA() { inCDATA_ = true; @@ -397,7 +397,7 @@ void basic_Writer::startCDATA() } // startCDATA template -void basic_Writer::endCDATA() +void Writer::endCDATA() { *stream_ << UnicodeT::RIGHT_SQUARE_BRACKET << UnicodeT::RIGHT_SQUARE_BRACKET @@ -409,7 +409,7 @@ void basic_Writer::endCDATA() } // endCDATA template -void basic_Writer::comment(const stringT& text) +void Writer::comment(const stringT& text) { if((!inDTD_) || (inDTD_ && internalSubset_)) *stream_ << UnicodeT::LESS_THAN_SIGN @@ -425,7 +425,7 @@ void basic_Writer::comment(const stringT& text) } // comment template -void basic_Writer::notationDecl(const stringT& name, const stringT& publicId, const stringT& systemId) +void Writer::notationDecl(const stringT& name, const stringT& publicId, const stringT& systemId) { if(inDTD_ && internalSubset_) { @@ -454,7 +454,7 @@ void basic_Writer::notationDecl(const stringT& name, const stringT& } // notationDecl template -void basic_Writer::unparsedEntityDecl(const stringT& name, const stringT& publicId, const stringT& systemId, const stringT& notationName) +void Writer::unparsedEntityDecl(const stringT& name, const stringT& publicId, const stringT& systemId, const stringT& notationName) { if(inDTD_ && internalSubset_) { @@ -479,7 +479,7 @@ void basic_Writer::unparsedEntityDecl(const stringT& name, const st } // unparsedEntityDecl template -void basic_Writer::elementDecl(const stringT& name, const stringT& model) +void Writer::elementDecl(const stringT& name, const stringT& model) { if(inDTD_ && internalSubset_) { @@ -507,7 +507,7 @@ void basic_Writer::elementDecl(const stringT& name, const stringT& } // elementDecl template -void basic_Writer::attributeDecl(const stringT& elementName, const stringT& attributeName, +void Writer::attributeDecl(const stringT& elementName, const stringT& attributeName, const stringT& type, const stringT& valueDefault, const stringT& value) { if(inDTD_ && internalSubset_) @@ -548,7 +548,7 @@ void basic_Writer::attributeDecl(const stringT& elementName, const } // attributeDecl template -void basic_Writer::internalEntityDecl(const stringT& name, const stringT& value) +void Writer::internalEntityDecl(const stringT& name, const stringT& value) { if(inDTD_ && internalSubset_) { @@ -566,7 +566,7 @@ void basic_Writer::internalEntityDecl(const stringT& name, const st } // internalEntityDecl template -void basic_Writer::externalEntityDecl(const stringT& name, const stringT& publicId, const stringT& systemId) +void Writer::externalEntityDecl(const stringT& name, const stringT& publicId, const stringT& systemId) { if(inDTD_ && internalSubset_) { @@ -581,7 +581,7 @@ void basic_Writer::externalEntityDecl(const stringT& name, const st } // externalEntityDecl template -void basic_Writer::startEntityDecl(const stringT& name) +void Writer::startEntityDecl(const stringT& name) { *stream_ << UnicodeT::LESS_THAN_SIGN << UnicodeT::EXCLAMATION_MARK @@ -596,7 +596,7 @@ void basic_Writer::startEntityDecl(const stringT& name) } // startEntityDecl template -void basic_Writer::publicAndSystem(const stringT& publicId, const stringT& systemId) +void Writer::publicAndSystem(const stringT& publicId, const stringT& systemId) { *stream_ << UnicodeT::SPACE; @@ -628,11 +628,6 @@ void basic_Writer::publicAndSystem(const stringT& publicId, const s } // if ... } // publicAndSystem -typedef basic_Writer Writer; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_Writer wWriter; -#endif - } // namespace SAX } // namespace Arabica diff --git a/include/SAX/filter/XMLBaseTracker.hpp b/include/SAX/filter/XMLBaseTracker.hpp index 1e6652e1..effcfc5a 100644 --- a/include/SAX/filter/XMLBaseTracker.hpp +++ b/include/SAX/filter/XMLBaseTracker.hpp @@ -12,25 +12,25 @@ namespace SAX { template > -class XMLBaseTracker : public basic_XMLFilterImpl +class XMLBaseTracker : public XMLFilterImpl { - typedef basic_XMLBaseSupport XMLBaseSupportT; - typedef basic_XMLFilterImpl XMLFilterT; + typedef XMLBaseSupport XMLBaseSupportT; + typedef XMLFilterImpl XMLFilterT; public: - typedef basic_XMLReader XMLReaderT; - typedef basic_Locator LocatorT; - typedef basic_Attributes AttributesT; + typedef XMLReaderInterface XMLReaderT; + typedef Locator LocatorT; + typedef Attributes AttributesT; XMLBaseTracker() : - basic_XMLFilterImpl(), + XMLFilterImpl(), locator_(0), base_set_(false) { } // XMLBaseTracker XMLBaseTracker(XMLReaderT& parent) : - basic_XMLFilterImpl(parent), + XMLFilterImpl(parent), locator_(0), base_set_(false) { diff --git a/include/SAX/helpers/AttributeListImpl.hpp b/include/SAX/helpers/AttributeListImpl.hpp index 6006ea0f..d7b282f8 100644 --- a/include/SAX/helpers/AttributeListImpl.hpp +++ b/include/SAX/helpers/AttributeListImpl.hpp @@ -37,12 +37,12 @@ const std::string const types[] = { empty_, "CDATA", "ID", "IDREF", "IDREFS", "N * Default implementation for AttributeList. * *

AttributeList implements the deprecated SAX1 {@link - * basic_AttributeList AttributeList} interface, and has been - * replaced by the new SAX2 {@link basic_AttributesImpl + * AttributeList AttributeList} interface, and has been + * replaced by the new SAX2 {@link AttributesImpl * AttributesImpl} interface.

* *

This class provides a convenience implementation of the SAX - * {@link basic_AttributeList AttributeList} interface. This + * {@link AttributeList AttributeList} interface. This * implementation is useful both for SAX parser writers, who can use * it to provide attributes to the application, and for SAX application * writers, who can use it to create a persistent copy of an element's @@ -67,38 +67,38 @@ const std::string const types[] = { empty_, "CDATA", "ID", "IDREF", "IDREFS", "N * implementations.

* * @deprecated This class implements a deprecated interface, - * {@link basic_AttributeList AttributeList}; + * {@link AttributeList AttributeList}; * that interface has been replaced by - * {@link basic_Attributes Attributes}, + * {@link Attributes Attributes}, * which is implemented in the - * {@link basic_AttributesImpl + * {@link AttributesImpl * AttributesImpl} helper class. * @since SAX 1.0 * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_AttributeList - * @see basic_DocumentHandler#startElement + * @see AttributeList + * @see DocumentHandler#startElement */ template -class basic_AttributeListImpl : public basic_AttributeList +class AttributeListImpl : public AttributeList { public: - basic_AttributeListImpl() : atts_() { } - basic_AttributeListImpl(const basic_AttributeList& atts) + AttributeListImpl() : atts_() { } + AttributeListImpl(const AttributeList& atts) : atts_(atts.getLength()) { setAttributeList(atts); } // AttributeListImpl - basic_AttributeListImpl& operator=(const basic_AttributeList& atts) + AttributeListImpl& operator=(const AttributeList& atts) { setAttributeList(atts); return *this; } // operator= - virtual ~basic_AttributeListImpl() { clear(); } + virtual ~AttributeListImpl() { clear(); } ////////////////////////////////////////////////////////////////////// // Methods specific to this class. @@ -132,7 +132,7 @@ public: * @param type The attribute type ("NMTOKEN" for an enumeration). * @param value The attribute value. * @see #removeAttribute - * @see basic_DocumentHandler#startElement + * @see DocumentHandler#startElement */ void addAttribute(const stringT& name, const stringT& type, const stringT& value) { @@ -170,7 +170,7 @@ public: * it will make sense to reuse the same AttributeListImpl object * rather than allocating a new one each time.

* - * @see basic_DocumentHandler#startElement + * @see DocumentHandler#startElement */ void clear() { @@ -188,7 +188,7 @@ public: * Return the number of attributes in the list. * * @return The number of attributes in the list. - * @see basic_AttributeList#getLength + * @see AttributeList#getLength */ virtual int getLength() const { @@ -201,7 +201,7 @@ public: * @param i The position of the attribute in the list. * @return The attribute name as a string, or an empty string if there * is no attribute at that position. - * @see basic_AttributeList#getName(int) + * @see AttributeList#getName(int) */ virtual const stringT& getName(int i) const { @@ -218,7 +218,7 @@ public: * enumeration, and "CDATA" if no declaration was * read), or an empty string if there is no attribute at * that position. - * @see basic_AttributeList#getType(int) + * @see AttributeList#getType(int) */ virtual const stringT& getType(int i) const { @@ -233,7 +233,7 @@ public: * @param i The position of the attribute in the list. * @return The attribute value as a string, or an empty string if * there is no attribute at that position. - * @see basic_AttributeList#getValue(int) + * @see AttributeList#getValue(int) */ virtual const stringT& getValue(int i) const { @@ -249,7 +249,7 @@ public: * @return The attribute type as a string ("NMTOKEN" for an * enumeration, and "CDATA" if no declaration was * read). - * @see basic_AttributeList#getType(java.lang.String) + * @see AttributeList#getType(java.lang.String) */ virtual const stringT& getType(const stringT& name) const { @@ -261,7 +261,7 @@ public: * Get the value of an attribute (by name). * * @param name The attribute name. - * @see basic_AttributeList#getValue(java.lang.String) + * @see AttributeList#getValue(java.lang.String) */ virtual const stringT& getValue(const stringT& name) const { @@ -287,14 +287,9 @@ private: return res; } // index - bool operator==(const basic_AttributeList&) const; // not implemented + bool operator==(const AttributeList&) const; // not implemented }; // class AttributeListImpl -typedef basic_AttributeListImpl AttributeListImpl; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_AttributeListImpl wAttributeListImpl; -#endif - } // namespace SAX } // namespace Arabica diff --git a/include/SAX/helpers/AttributesImpl.hpp b/include/SAX/helpers/AttributesImpl.hpp index e4e06dbf..8e16c96c 100644 --- a/include/SAX/helpers/AttributesImpl.hpp +++ b/include/SAX/helpers/AttributesImpl.hpp @@ -17,7 +17,7 @@ namespace SAX * Default implementation of the Attributes interface. * *

This class provides a default implementation of the SAX2 - * {@link basic_Attributes Attributes} interface, with the + * {@link Attributes Attributes} interface, with the * addition of manipulators so that the list can be modified or * reused.

* @@ -25,12 +25,12 @@ namespace SAX * *
    *
  1. to take a persistent snapshot of an Attributes object - * in a {@link basic_ContentHandler#startElement startElement} event; or
  2. + * in a {@link ContentHandler#startElement startElement} event; or *
  3. to construct or modify an Attributes object in a SAX2 driver or filter.
  4. *
* *

This class replaces the now-deprecated SAX1 {@link - * basic_AttributeListImpl AttributeListImpl} + * AttributeListImpl AttributeListImpl} * class.

* * @since SAX 2.0 @@ -39,19 +39,19 @@ namespace SAX * @version 2.0 */ template -class basic_AttributesImpl : public basic_Attributes +class AttributesImpl : public Attributes { public: typedef string_type stringT; - typedef basic_Attributes AttributesT; + typedef Attributes AttributesT; //////////////////////////////////////////////////////////////////// // Constructors. - basic_AttributesImpl() { } - basic_AttributesImpl(const AttributesT& atts) + AttributesImpl() { } + AttributesImpl(const AttributesT& atts) { setAttributes(atts); - } // basic_AttributesImpl + } // AttributesImpl //////////////////////////////////////////////////////////////////// // Implementation of SAX::Attributes. @@ -59,7 +59,7 @@ public: * Return the number of attributes in the list. * * @return The number of attributes in the list. - * @see basic_Attributes#getLength + * @see Attributes#getLength */ virtual int getLength() const { @@ -72,7 +72,7 @@ public: * @param index The attribute's index (zero-based). * @return The Namespace URI, the empty string if none is * available, or if the index is out of range. - * @see basic_Attributes#getURI + * @see Attributes#getURI */ virtual stringT getURI(unsigned int index) const { @@ -87,7 +87,7 @@ public: * @param index The attribute's index (zero-based). * @return The attribute's local name, the empty string if * none is available, or if the index if out of range. - * @see basic_Attributes#getLocalName + * @see Attributes#getLocalName */ virtual stringT getLocalName(unsigned int index) const { @@ -103,7 +103,7 @@ public: * @param index The attribute's index (zero-based). * @return The attribute's qualified name, the empty string if * none is available, or if the index is out of bounds. - * @see basic_Attributes#getQName + * @see Attributes#getQName */ virtual stringT getQName(unsigned int index) const { @@ -119,7 +119,7 @@ public: * @param index The attribute's index (zero-based). * @return The attribute's type, "CDATA" if the type is unknown, or an empty * string if the index is out of bounds. - * @see basic_Attributes#getType(int) + * @see Attributes#getType(int) */ virtual stringT getType(unsigned int index) const { @@ -134,7 +134,7 @@ public: * * @param index The attribute's index (zero-based). * @return The attribute's value or an empty string if the index is out of bounds. - * @see basic_Attributes#getValue(int) + * @see Attributes#getValue(int) */ virtual stringT getValue(unsigned int index) const { @@ -155,7 +155,7 @@ public: * string if none is available. * @param localName The attribute's local name. * @return The attribute's index, or -1 if none matches. - * @see basic_Attributes#getIndex(const stringT&,const stringT&) + * @see Attributes#getIndex(const stringT&,const stringT&) */ virtual int getIndex(const stringT& uri, const stringT& localName) const { @@ -170,7 +170,7 @@ public: * * @param qName The qualified name. * @return The attribute's index, or -1 if none matches. - * @see basic_Attributes#getIndex(const stringT&) + * @see Attributes#getIndex(const stringT&) */ virtual int getIndex(const stringT& qName) const { @@ -191,7 +191,7 @@ public: * @param localName The local name. * @return The attribute's type, or an empty string if there is no * matching attribute. - * @see basic_Attributes#getType(const stringT&,const stringT&) + * @see Attributes#getType(const stringT&,const stringT&) */ virtual stringT getType(const stringT& uri, const stringT& localName) const { @@ -207,7 +207,7 @@ public: * @param qName The qualified name. * @return The attribute's type, or an empty string if there is no * matching attribute. - * @see basic_Attributes#getType(const stringT&) + * @see Attributes#getType(const stringT&) */ virtual stringT getType(const stringT& qName) const { @@ -228,7 +228,7 @@ public: * @param localName The local name. * @return The attribute's value, or an empty string if there is no * matching attribute. - * @see basic_Attributes#getValue(const stringT&,const stringT&) + * @see Attributes#getValue(const stringT&,const stringT&) */ virtual stringT getValue(const stringT& uri, const stringT& localName) const { @@ -244,7 +244,7 @@ public: * @param qName The qualified name. * @return The attribute's value, or an empty string if there is no * matching attribute. - * @see basic_Attributes#getValue(const stringT&) + * @see Attributes#getValue(const stringT&) */ virtual stringT getValue(const stringT& qName) const { @@ -556,11 +556,6 @@ private: stringT emptyString_; }; // class AttributesImpl -typedef basic_AttributesImpl AttributesImpl; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_AttributesImpl wAttributesImpl; -#endif - } // namespace SAX } // namespace Arabica diff --git a/include/SAX/helpers/CatchErrorHandler.hpp b/include/SAX/helpers/CatchErrorHandler.hpp index f06e9db0..2c0d5d76 100644 --- a/include/SAX/helpers/CatchErrorHandler.hpp +++ b/include/SAX/helpers/CatchErrorHandler.hpp @@ -12,10 +12,10 @@ namespace Arabica namespace SAX { template -class CatchErrorHandler : public SAX::basic_ErrorHandler +class CatchErrorHandler : public SAX::ErrorHandler { public: - typedef SAX::basic_SAXParseException SAXParseExceptionT; + typedef SAX::SAXParseException SAXParseExceptionT; CatchErrorHandler() : errors_() { } virtual ~CatchErrorHandler() { } diff --git a/include/SAX/helpers/DefaultHandler.hpp b/include/SAX/helpers/DefaultHandler.hpp index 41d00356..a0d9889d 100644 --- a/include/SAX/helpers/DefaultHandler.hpp +++ b/include/SAX/helpers/DefaultHandler.hpp @@ -29,9 +29,9 @@ namespace SAX * callbacks in the four core SAX2 handler classes:

* *
    - *
  • {@link basic_EntityResolver EntityResolver}
  • - *
  • {@link basic_DTDHandler DTDHandler}
  • - *
  • {@link basic_ContentHandler ContentHandler}
  • + *
  • {@link EntityResolver EntityResolver}
  • + *
  • {@link DTDHandler DTDHandler}
  • + *
  • {@link ContentHandler ContentHandler}
  • *
  • {@link ErrorHandler ErrorHandler}
  • *
* @@ -41,34 +41,34 @@ namespace SAX * application has not supplied its own.

* *

This class replaces the deprecated SAX1 - * {@link basic_HandlerBase HandlerBase} class.

+ * {@link HandlerBase HandlerBase} class.

* * @since SAX 2.0 * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_EntityResolver - * @see basic_DTDHandler - * @see basic_ContentHandler - * @see basic_ErrorHandler + * @see EntityResolver + * @see DTDHandler + * @see ContentHandler + * @see ErrorHandler */ template -class basic_DefaultHandler : public basic_EntityResolver, - public basic_DTDHandler, - public basic_ContentHandler, - public basic_ErrorHandler, - public basic_LexicalHandler, - public basic_DeclHandler +class DefaultHandler : public EntityResolver, + public DTDHandler, + public ContentHandler, + public ErrorHandler, + public LexicalHandler, + public DeclHandler { public: typedef string_type stringT; - typedef basic_InputSource InputSourceT; - typedef basic_Locator LocatorT; - typedef basic_Attributes AttributesT; - typedef basic_SAXParseException SAXParseExceptionT; + typedef InputSource InputSourceT; + typedef Locator LocatorT; + typedef Attributes AttributesT; + typedef SAXParseException SAXParseExceptionT; - basic_DefaultHandler() { } - virtual ~basic_DefaultHandler() { } + DefaultHandler() { } + virtual ~DefaultHandler() { } ////////////////////////////////////////////// // EntityResolver @@ -88,7 +88,7 @@ public: * @return The new input source, (empty to require the * default behaviour). * @exception SAXException Any SAX exception. - * @see basic_EntityResolver#resolveEntity + * @see EntityResolver#resolveEntity */ virtual InputSourceT resolveEntity(const stringT& /* publicId */, const stringT& /* systemId */) { @@ -110,7 +110,7 @@ public: * @param systemId The notation system identifier. * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_DTDHandler#notationDecl + * @see DTDHandler#notationDecl */ virtual void notationDecl(const stringT& /* name */, const stringT& /* publicId */, @@ -132,7 +132,7 @@ public: * @param notationName The name of the associated notation. * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_DTDHandler#unparsedEntityDecl + * @see DTDHandler#unparsedEntityDecl */ virtual void unparsedEntityDecl(const stringT& /* name */, const stringT& /* publicId */, @@ -151,8 +151,8 @@ public: * with other document events.

* * @param locator A locator for all SAX document events. - * @see basic_ContentHandler#setDocumentLocator - * @see basic_Locator + * @see ContentHandler#setDocumentLocator + * @see Locator */ virtual void setDocumentLocator(const LocatorT& /* locator */) { } @@ -166,7 +166,7 @@ public: * * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_ContentHandler#startDocument + * @see ContentHandler#startDocument */ virtual void startDocument() { } /** @@ -179,7 +179,7 @@ public: * * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_ContentHandler#endDocument + * @see ContentHandler#endDocument */ virtual void endDocument() { } @@ -194,7 +194,7 @@ public: * @param uri The Namespace URI mapped to the prefix. * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_ContentHandler#startPrefixMapping + * @see ContentHandler#startPrefixMapping */ virtual void startPrefixMapping(const stringT& /* prefix */, const stringT& /* uri */) { } /** @@ -207,7 +207,7 @@ public: * @param prefix The Namespace prefix being declared. * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_ContentHandler#endPrefixMapping + * @see ContentHandler#endPrefixMapping */ virtual void endPrefixMapping(const stringT& /* prefix */) { } @@ -230,7 +230,7 @@ public: * attributes, it shall be an empty Attributes object. * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_ContentHandler#startElement + * @see ContentHandler#startElement */ virtual void startElement(const stringT& /* namespaceURI */, const stringT& /* localName */, const stringT& /* qName */, const AttributesT& /* atts */) { } @@ -251,7 +251,7 @@ public: * qualified names are not available. * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_ContentHandler#endElement + * @see ContentHandler#endElement */ virtual void endElement(const stringT& /* namespaceURI */, const stringT& /* localName */, const stringT& /* qName */) { } @@ -267,7 +267,7 @@ public: * @param ch The characters. * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_ContentHandler#characters + * @see ContentHandler#characters */ virtual void characters(const stringT& /* ch */) { } /** @@ -281,7 +281,7 @@ public: * @param ch The whitespace characters. * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_ContentHandler#ignorableWhitespace + * @see ContentHandler#ignorableWhitespace */ virtual void ignorableWhitespace(const stringT& /* ch */) { } @@ -298,7 +298,7 @@ public: * none is supplied. * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_ContentHandler#processingInstruction + * @see ContentHandler#processingInstruction */ virtual void processingInstruction(const stringT& /* target */, const stringT& /* data */) { } @@ -313,7 +313,7 @@ public: * @param name The name of the skipped entity. * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_ContentHandler#processingInstruction + * @see ContentHandler#processingInstruction */ virtual void skippedEntity(const stringT& /* name */) { } @@ -330,7 +330,7 @@ public: * @param e The warning information encoded as an exception. * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_ErrorHandler#warning + * @see ErrorHandler#warning * @see SAXParseException */ virtual void warning(const SAXParseExceptionT& /* e */) { } @@ -345,7 +345,7 @@ public: * @param e The warning information encoded as an exception. * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_ErrorHandler#error + * @see ErrorHandler#error * @see SAXParseException */ virtual void error(const SAXParseExceptionT& /* e */) { } @@ -363,7 +363,7 @@ public: * @param e The error information encoded as an exception. * @exception SAXException Any SAX exception, possibly * wrapping another exception. - * @see basic_ErrorHandler#fatalError + * @see ErrorHandler#fatalError * @see SAXParseException */ virtual void fatalError(const SAXParseExceptionT& e) @@ -384,8 +384,8 @@ public: * this method will not be invoked.

* *

All declarations reported through - * {@link basic_DTDHandler DTDHandler} or - * {@link basic_DeclHandler DeclHandler} events must appear + * {@link DTDHandler DTDHandler} or + * {@link DeclHandler DeclHandler} events must appear * between the startDTD and {@link #endDTD endDTD} events. * Declarations are assumed to belong to the internal DTD subset * unless they appear between {@link #startEntity startEntity} @@ -399,7 +399,7 @@ public: *

Note that the start/endDTD events will appear within * the start/endDocument events from ContentHandler and * before the first - * {@link basic_ContentHandler#startElement startElement} + * {@link ContentHandler#startElement startElement} * event.

* * @param name The document type name. @@ -442,11 +442,11 @@ public: *

When a SAX2 driver is providing these events, all other * events must be properly nested within start/end entity * events. There is no additional requirement that events from - * {@link basic_DeclHandler DeclHandler} or - * {@link basic_DTDHandler DTDHandler} be properly ordered.

+ * {@link DeclHandler DeclHandler} or + * {@link DTDHandler DTDHandler} be properly ordered.

* *

Note that skipped entities will be reported through the - * {@link basic_ContentHandler#skippedEntity skippedEntity} + * {@link ContentHandler#skippedEntity skippedEntity} * event, which is part of the ContentHandler interface.

* *

Because of the streaming event model that SAX uses, some @@ -470,8 +470,8 @@ public: * entity, the name will begin with '%', and if it is the * external DTD subset, it will be "[dtd]". * @see #endEntity - * @see basic_DeclHandler#internalEntityDecl - * @see basic_DeclHandler#externalEntityDecl + * @see DeclHandler#internalEntityDecl + * @see DeclHandler#externalEntityDecl */ virtual void startEntity(const stringT& name) { } /** @@ -486,7 +486,7 @@ public: * Report the start of a CDATA section. * *

The contents of the CDATA section will be reported through - * the regular {@link basic_ContentHandler#characters + * the regular {@link ContentHandler#characters * characters} event; this event is intended only to report * the boundary.

* @@ -570,7 +570,7 @@ public: * entity, the name will begin with '%'. * @param value The replacement text of the entity. * @see #externalEntityDecl - * @see basic_DTDHandler#unparsedEntityDecl + * @see DTDHandler#unparsedEntityDecl */ virtual void internalEntityDecl(const stringT& name, const stringT& value) { } /** @@ -585,21 +585,16 @@ public: * an empty string if none was declared. * @param systemId The declared system identifier of the entity. * @see #internalEntityDecl - * @see basic_DTDHandler#unparsedEntityDecl + * @see DTDHandler#unparsedEntityDecl */ virtual void externalEntityDecl(const stringT& name, const stringT& publicId, const stringT& systemId) { } private: - basic_DefaultHandler(const basic_DefaultHandler&); - basic_DefaultHandler& operator=(const basic_DefaultHandler&); - bool operator==(const basic_DefaultHandler&); -}; // class basic_DefaultHandler - -typedef basic_DefaultHandler DefaultHandler; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_DefaultHandler wDefaultHandler; -#endif + DefaultHandler(const DefaultHandler&); + DefaultHandler& operator=(const DefaultHandler&); + bool operator==(const DefaultHandler&); +}; // class DefaultHandler } // namespace SAX } // namespace Arabica diff --git a/include/SAX/helpers/InputSourceResolver.hpp b/include/SAX/helpers/InputSourceResolver.hpp index ba1de5fe..62094a03 100644 --- a/include/SAX/helpers/InputSourceResolver.hpp +++ b/include/SAX/helpers/InputSourceResolver.hpp @@ -14,10 +14,10 @@ namespace SAX class InputSourceResolver { public: - InputSourceResolver(const SAX::InputSource& inputSource); + InputSourceResolver(const SAX::InputSource& inputSource); template - InputSourceResolver(const SAX::basic_InputSource& inputSource, + InputSourceResolver(const SAX::InputSource& inputSource, const stringAdaptorT& SA) : deleteStream_(false), byteStream_(0) diff --git a/include/SAX/helpers/LocatorImpl.hpp b/include/SAX/helpers/LocatorImpl.hpp index e4e068f2..048502db 100644 --- a/include/SAX/helpers/LocatorImpl.hpp +++ b/include/SAX/helpers/LocatorImpl.hpp @@ -46,34 +46,34 @@ namespace SAX * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_Locator Locator + * @see Locator Locator */ template -class basic_LocatorImpl : public basic_Locator +class LocatorImpl : public Locator { public: typedef string_type stringT; - typedef basic_Locator LocatorT; + typedef Locator LocatorT; - basic_LocatorImpl() : + LocatorImpl() : publicId_(), systemId_(), lineNumber_(-1), columnNumber_(-1) { - } // basic_LocatorImpl + } // LocatorImpl - basic_LocatorImpl(const LocatorT& rhs) : + LocatorImpl(const LocatorT& rhs) : publicId_(rhs.getPublicId()), systemId_(rhs.getSystemId()), lineNumber_(rhs.getLineNumber()), columnNumber_(rhs.getColumnNumber()) { - } // basic_LocatorImpl + } // LocatorImpl - virtual ~basic_LocatorImpl() { } + virtual ~LocatorImpl() { } - basic_LocatorImpl& operator=(const LocatorT& rhs) + LocatorImpl& operator=(const LocatorT& rhs) { publicId_ = rhs.getPublicId(); systemId_ = rhs.getSystemId(); @@ -88,7 +88,7 @@ public: * * @return The public identifier as a string, or an empty string if none * is available. - * @see basic_Locator#getPublicId + * @see Locator#getPublicId * @see #setPublicId */ virtual stringT getPublicId() const { return publicId_; } @@ -97,7 +97,7 @@ public: * * @return The system identifier as a string, or an empty string if none * is available. - * @see basic_Locator#getSystemId + * @see Locator#getSystemId * @see #setSystemId */ virtual stringT getSystemId() const { return systemId_; } @@ -105,7 +105,7 @@ public: * Return the saved line number (1-based). * * @return The line number as an integer, or -1 if none is available. - * @see basic_Locator#getLineNumber + * @see Locator#getLineNumber * @see #setLineNumber */ virtual int getLineNumber() const { return lineNumber_; } @@ -113,7 +113,7 @@ public: * Return the saved column number (1-based). * * @return The column number as an integer, or -1 if none is available. - * @see basic_Locator#getColumnNumber + * @see Locator#getColumnNumber * @see #setColumnNumber */ virtual int getColumnNumber() const { return columnNumber_; } @@ -162,11 +162,6 @@ private: bool operator==(const LocatorT& rhs) const; }; // class LocatorImpl -typedef basic_LocatorImpl LocatorImpl; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_LocatorImpl wLocatorImpl; -#endif - } // namespace SAX } // namespace Arabica diff --git a/include/SAX/helpers/NamespaceSupport.hpp b/include/SAX/helpers/NamespaceSupport.hpp index 0dc4a19a..c57eceea 100644 --- a/include/SAX/helpers/NamespaceSupport.hpp +++ b/include/SAX/helpers/NamespaceSupport.hpp @@ -84,7 +84,7 @@ struct NamespaceConstants * @version 2.0 */ template -class basic_NamespaceSupport +class NamespaceSupport { public: typedef std::vector stringListT; @@ -98,10 +98,10 @@ class basic_NamespaceSupport }; // struct Parts // functions - basic_NamespaceSupport() + NamespaceSupport() { reset(); - } // basic_NamespaceSupport + } // NamespaceSupport /** * Reset this Namespace support object for reuse. @@ -394,10 +394,10 @@ class basic_NamespaceSupport const NamespaceConstants nsc_; // no impl - basic_NamespaceSupport(const basic_NamespaceSupport&); - basic_NamespaceSupport& operator=(const basic_NamespaceSupport&); - bool operator==(const basic_NamespaceSupport&) const; -}; // class basic_NamespaceSupport + NamespaceSupport(const NamespaceSupport&); + NamespaceSupport& operator=(const NamespaceSupport&); + bool operator==(const NamespaceSupport&) const; +}; // class NamespaceSupport } // namespace SAX } // namespace Arabica diff --git a/include/SAX/helpers/ParserAdaptor.hpp b/include/SAX/helpers/ParserAdaptor.hpp index 3c20784e..24f92663 100644 --- a/include/SAX/helpers/ParserAdaptor.hpp +++ b/include/SAX/helpers/ParserAdaptor.hpp @@ -25,10 +25,10 @@ namespace SAX /** * Adapt a SAX1 Parser as a SAX2 XMLReader. * - *

This class wraps a SAX1 {@link basic_Parser Parser} - * and makes it act as a SAX2 {@link basic_XMLReader XMLReader}, + *

This class wraps a SAX1 {@link Parser Parser} + * and makes it act as a SAX2 {@link XMLReader XMLReader}, * with feature, property, and Namespace support. Note - * that it is not possible to report {@link basic_ContentHandler#skippedEntity + * that it is not possible to report {@link ContentHandler#skippedEntity * skippedEntity} events, since SAX1 does not make that information available.

* *

This adapter does not test for duplicate Namespace-qualified @@ -38,27 +38,27 @@ namespace SAX * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_XMLReader - * @see basic_Parser + * @see XMLReader + * @see Parser */ template -class basic_ParserAdaptor : public basic_XMLReader, - public basic_DocumentHandler +class ParserAdaptor : public XMLReaderInterface, + public DocumentHandler { public: typedef string_type stringT; typedef string_adaptor_type string_adaptorT; - typedef basic_Parser ParserT; - typedef basic_EntityResolver EntityResolverT; - typedef basic_DTDHandler DTDHandlerT; - typedef basic_DocumentHandler DocumentHandlerT; - typedef basic_ContentHandler ContentHandlerT; - typedef basic_InputSource InputSourceT; - typedef basic_Locator LocatorT; - typedef basic_SAXParseException SAXParseExceptionT; - typedef basic_AttributeList AttributeListT; + typedef Parser ParserT; + typedef EntityResolver EntityResolverT; + typedef DTDHandler DTDHandlerT; + typedef DocumentHandler DocumentHandlerT; + typedef ContentHandler ContentHandlerT; + typedef InputSource InputSourceT; + typedef Locator LocatorT; + typedef SAXParseException SAXParseExceptionT; + typedef AttributeList AttributeListT; - basic_ParserAdaptor(ParserT& parser) : + ParserAdaptor(ParserT& parser) : parser_(parser), parsing_(false), locator_(0), @@ -85,7 +85,7 @@ public: * name is not known. * @exception SAXNotSupportedException If the feature * state is not supported. - * @see basic_XMLReader#setFeature + * @see XMLReader#setFeature */ virtual void setFeature(const stringT& name, bool value) { @@ -127,7 +127,7 @@ public: * name is not known. * @exception SAXNotSupportedException If querying the * feature state is not supported. - * @see basic_XMLReader#setFeature + * @see XMLReader#setFeature */ virtual bool getFeature(const stringT& name) const { @@ -167,14 +167,14 @@ public: * Set the entity resolver. * * @param resolver The new entity resolver. - * @see basic_XMLReader#setEntityResolver + * @see XMLReader#setEntityResolver */ virtual void setEntityResolver(EntityResolverT& resolver) { entityResolver_ = &resolver; } /** * Return the current entity resolver. * * @return The current entity resolver, or null if none was supplied. - * @see basic_XMLReader#getEntityResolver + * @see XMLReader#getEntityResolver */ virtual EntityResolverT* getEntityResolver() const { return entityResolver_; } @@ -182,14 +182,14 @@ public: * Set the DTD handler. * * @param handler The new DTD handler. - * @see basic_XMLReader#setEntityResolver + * @see XMLReader#setEntityResolver */ virtual void setDTDHandler(DTDHandlerT& handler) { dtdHandler_ = &handler; } /** * Return the current DTD handler. * * @return The current DTD handler, or null if none was supplied. - * @see basic_XMLReader#getEntityResolver + * @see XMLReader#getEntityResolver */ virtual DTDHandlerT* getDTDHandler() const { return dtdHandler_; } @@ -197,14 +197,14 @@ public: * Set the content handler. * * @param handler The new content handler. - * @see basic_XMLReader#setEntityResolver + * @see XMLReader#setEntityResolver */ virtual void setContentHandler(ContentHandlerT& handler) { contentHandler_ = &handler; } /** * Return the current content handler. * * @return The current content handler, or null if none was supplied. - * @see basic_XMLReader#getEntityResolver + * @see XMLReader#getEntityResolver */ virtual ContentHandlerT* getContentHandler() const { return contentHandler_; } @@ -212,14 +212,14 @@ public: * Set the error handler. * * @param handler The new error handler. - * @see basic_XMLReader#setEntityResolver + * @see XMLReader#setEntityResolver */ virtual void setErrorHandler(ErrorHandler& handler) { errorHandler_ = &handler; } /** * Return the current error handler. * * @return The current error handler, or null if none was supplied. - * @see basic_XMLReader#getEntityResolver + * @see XMLReader#getEntityResolver */ virtual ErrorHandler* getErrorHandler() const { return errorHandler_; } @@ -227,7 +227,7 @@ public: * Parse an XML document. * * @param input An input source for the document. - * @see basic_Parser#parse(InputSource&) + * @see Parser#parse(InputSource&) */ virtual void parse(InputSourceT& input) { @@ -253,7 +253,7 @@ public: * Adapt a SAX1 document locator event. * * @param locator A document locator. - * @see basic_ContentHandler#setDocumentLocator + * @see ContentHandler#setDocumentLocator */ virtual void setDocumentLocator(const LocatorT& locator) { @@ -265,7 +265,7 @@ public: /** * Adapt a SAX1 start document event. * - * @see basic_DocumentHandler#startDocument + * @see DocumentHandler#startDocument */ virtual void startDocument() { @@ -276,7 +276,7 @@ public: /** * Adapt a SAX1 end document event. * - * @see basic_DocumentHandler#endDocument + * @see DocumentHandler#endDocument */ virtual void endDocument() { @@ -369,7 +369,7 @@ public: * Adapt a SAX1 end element event. * * @param qName The qualified (prefixed) name. - * @see basic_DocumentHandler#endElement + * @see DocumentHandler#endElement */ void endElement(const stringT& qName) { @@ -395,7 +395,7 @@ public: * Adapt a SAX1 characters event. * * @param ch The characters. - * @see basic_DocumentHandler#characters + * @see DocumentHandler#characters */ virtual void characters(const stringT& ch) { @@ -407,7 +407,7 @@ public: * Adapt a SAX1 ignorable whitespace event. * * @param ch Thecharacters. - * @see basic_DocumentHandler#ignorableWhitespace + * @see DocumentHandler#ignorableWhitespace */ virtual void ignorableWhitespace(const stringT& ch) { @@ -420,7 +420,7 @@ public: * * @param target The processing instruction target. * @param data The remainder of the processing instruction - * @see basic_DocumentHandler#processingInstruction + * @see DocumentHandler#processingInstruction */ virtual void processingInstruction(const stringT& target, const stringT& data) { @@ -429,8 +429,8 @@ public: } // processingInstruction private: - typedef basic_NamespaceSupport NamespaceSupportT; - typedef basic_AttributesImpl AttributesImplT; + typedef NamespaceSupport NamespaceSupportT; + typedef AttributesImpl AttributesImplT; void setupParser() { @@ -477,11 +477,11 @@ private: } // makeString // This wrapper is used only when Namespace support is disabled. - class AttributesListAdaptor : public basic_Attributes + class AttributesListAdaptor : public Attributes { public: - typedef typename basic_ParserAdaptor ParserAdaptorT; - typedef typename basic_AttributeList AttributeListT; + typedef typename ParserAdaptor ParserAdaptorT; + typedef typename AttributeList AttributeListT; void setAttributeList(const AttributeListT& attList) { @@ -538,17 +538,12 @@ public: const stringT NULL_STRING; private: - basic_ParserAdaptor(); - basic_ParserAdaptor(const basic_ParserAdaptor&); - basic_ParserAdaptor& operator=(const basic_ParserAdaptor&); - bool operator==(const basic_ParserAdaptor&); + ParserAdaptor(); + ParserAdaptor(const ParserAdaptor&); + ParserAdaptor& operator=(const ParserAdaptor&); + bool operator==(const ParserAdaptor&); }; // ParserAdaptor -typedef basic_ParserAdaptor ParserAdaptor; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_ParserAdaptor wParserAdaptor; -#endif - } // namespace SAX } // namespace Arabica diff --git a/include/SAX/helpers/XMLBaseSupport.hpp b/include/SAX/helpers/XMLBaseSupport.hpp index 7e0c8816..b4afd3c2 100644 --- a/include/SAX/helpers/XMLBaseSupport.hpp +++ b/include/SAX/helpers/XMLBaseSupport.hpp @@ -48,15 +48,15 @@ struct XMLBaseConstants }; // struct XMLBaseConstants template > -class basic_XMLBaseSupport +class XMLBaseSupport { public: typedef string_type stringT; typedef string_adaptor_type string_adaptorT; typedef typename string_adaptor_type::value_type valueT; - typedef basic_Attributes AttributesT; + typedef Attributes AttributesT; - basic_XMLBaseSupport() : + XMLBaseSupport() : depth_(0) { } void setDocumentLocation(const stringT& loc) @@ -118,15 +118,10 @@ private: const XMLBaseConstants xbc_; // no impl - basic_XMLBaseSupport(const basic_XMLBaseSupport&); - basic_XMLBaseSupport& operator=(const basic_XMLBaseSupport&); - bool operator==(const basic_XMLBaseSupport&); -}; // class basic_XMLBaseSupport - -typedef basic_XMLBaseSupport XMLBaseSupport; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_XMLBaseSupport wXMLBaseSupport; -#endif + XMLBaseSupport(const XMLBaseSupport&); + XMLBaseSupport& operator=(const XMLBaseSupport&); + bool operator==(const XMLBaseSupport&); +}; // class XMLBaseSupport } // namespace SAX } // namespace Arabica diff --git a/include/SAX/helpers/XMLFilterImpl.hpp b/include/SAX/helpers/XMLFilterImpl.hpp index 623e5819..363cc087 100644 --- a/include/SAX/helpers/XMLFilterImpl.hpp +++ b/include/SAX/helpers/XMLFilterImpl.hpp @@ -18,7 +18,7 @@ namespace SAX /** * Base class for deriving an XML filter. * - *

This class is designed to sit between an {@link basic_XMLReader + *

This class is designed to sit between an {@link XMLReader * XMLReader} and the client application's event handlers. By default, it * does nothing but pass requests up to the reader and events * on to the handlers unmodified, but subclasses can override @@ -29,56 +29,56 @@ namespace SAX * @author Jez Higgins, * jez@jezuk.co.uk * @version 2.0 - * @see basic_XMLFilter - * @see basic_XMLReader - * @see basic_EntityResolver - * @see basic_DTDHandler - * @see basic_ContentHandler - * @see basic_ErrorHandler + * @see XMLFilter + * @see XMLReader + * @see EntityResolver + * @see DTDHandler + * @see ContentHandler + * @see ErrorHandler */ template > -class basic_XMLFilterImpl : public basic_XMLFilter, - public basic_EntityResolver, - public basic_DTDHandler, - public basic_ContentHandler, - public basic_ErrorHandler, - public basic_DeclHandler, - public basic_LexicalHandler +class XMLFilterImpl : public XMLFilter, + public EntityResolver, + public DTDHandler, + public ContentHandler, + public ErrorHandler, + public DeclHandler, + public LexicalHandler { public: typedef string_type stringT; typedef string_adaptor_type string_adaptorT; - typedef basic_XMLReader XMLReaderT; - typedef basic_EntityResolver EntityResolverT; - typedef basic_DTDHandler DTDHandlerT; - typedef basic_ContentHandler ContentHandlerT; - typedef basic_InputSource InputSourceT; - typedef basic_Locator LocatorT; - typedef basic_ErrorHandler ErrorHandlerT; - typedef basic_DeclHandler DeclHandlerT; - typedef basic_LexicalHandler LexicalHandlerT; - typedef typename basic_ErrorHandler::SAXParseExceptionT SAXParseExceptionT; + typedef XMLReaderInterface XMLReaderT; + typedef EntityResolver EntityResolverT; + typedef DTDHandler DTDHandlerT; + typedef ContentHandler ContentHandlerT; + typedef InputSource InputSourceT; + typedef Locator LocatorT; + typedef ErrorHandler ErrorHandlerT; + typedef DeclHandler DeclHandlerT; + typedef LexicalHandler LexicalHandlerT; + typedef typename ErrorHandler::SAXParseExceptionT SAXParseExceptionT; - basic_XMLFilterImpl() : + XMLFilterImpl() : parent_(0) { setDefaults(); - } // basic_XMLFilterImpl - basic_XMLFilterImpl(XMLReaderT& parent) : + } // XMLFilterImpl + XMLFilterImpl(XMLReaderT& parent) : parent_(&parent) { setDefaults(); - } // basic_XMLFilterImpl + } // XMLFilterImpl - virtual ~basic_XMLFilterImpl() { } + virtual ~XMLFilterImpl() { } ///////////////////////////////////////////////// // XMLFilter implementation /** * Set the parent reader. * - *

This is the {@link basic_XMLReader XMLReader} from which + *

This is the {@link XMLReader XMLReader} from which * this filter will obtain its events and to which it will pass its * configuration requests. The parent may itself be another filter.

* @@ -111,7 +111,7 @@ public: * @exception SAXNotSupportedException When the * XMLReader recognizes the feature name but * cannot set the requested value. - * @see basic_XMLReader#setFeature + * @see XMLReader#setFeature */ virtual void setFeature(const stringT& name, bool value) { @@ -136,7 +136,7 @@ public: * @exception SAXNotSupportedException When the * XMLReader recognizes the feature name but * cannot determine its state at this time. - * @see basic_XMLReader#getFeature + * @see XMLReader#getFeature */ virtual bool getFeature(const stringT& name) const { @@ -154,56 +154,56 @@ public: * Set the entity resolver. * * @param resolver The new entity resolver. - * @see basic_XMLReader#setEntityResolver + * @see XMLReader#setEntityResolver */ virtual void setEntityResolver(EntityResolverT& resolver) { entityResolver_ = &resolver; } /** * Get the current entity resolver. * * @return The current entity resolver, or null if none was set. - * @see basic_XMLReader#getEntityResolver + * @see XMLReader#getEntityResolver */ virtual EntityResolverT* getEntityResolver() const { return entityResolver_ ; } /** * Set the DTD event handler. * * @param handler The new DTD handler. - * @see basic_XMLReader#setDTDHandler + * @see XMLReader#setDTDHandler */ virtual void setDTDHandler(DTDHandlerT& handler) { dtdHandler_ = &handler; } /** * Get the current DTD event handler. * * @return The current DTD handler, or null if none was set. - * @see basic_XMLReader#getDTDHandler + * @see XMLReader#getDTDHandler */ virtual DTDHandlerT* getDTDHandler() const { return dtdHandler_; } /** * Set the content event handler. * * @param handler The new content handler. - * @see basic_XMLReader#setContentHandler + * @see XMLReader#setContentHandler */ virtual void setContentHandler(ContentHandlerT& handler) { contentHandler_ = &handler; } /** * Get the content event handler. * * @return The current content handler, or null if none was set. - * @see basic_XMLReader#getContentHandler + * @see XMLReader#getContentHandler */ virtual ContentHandlerT* getContentHandler() const { return contentHandler_; } /** * Set the error event handler. * * @param handler The new error handler. - * @see basic_XMLReader#setErrorHandler + * @see XMLReader#setErrorHandler */ virtual void setErrorHandler(ErrorHandlerT& handler) { errorHandler_ = &handler; } /** * Get the current error event handler. * * @return The current error handler, or null if none was set. - * @see basic_XMLReader#getErrorHandler + * @see XMLReader#getErrorHandler */ virtual ErrorHandlerT* getErrorHandler() const { return errorHandler_; } @@ -216,7 +216,7 @@ public: * Parse a document. * * @param input The input source for the document entity. - * @see basic_XMLReader#parse(basic_InputSource) + * @see XMLReader#parse(InputSource) */ virtual void parse(InputSourceT& input) { @@ -257,7 +257,7 @@ public: * @param systemId The entity's system identifier. * @return A new InputSource or a default-constructed * InputSourceT for the default. - * @see basic_EntityResolver#resolveEntity + * @see EntityResolver#resolveEntity */ virtual InputSourceT resolveEntity(const stringT& publicId, const stringT& systemId) { @@ -274,7 +274,7 @@ public: * @param name The notation name. * @param publicId The notation's public identifier, or an empty string. * @param systemId The notation's system identifier, or an empty string. - * @see basic_DTDHandler#notationDecl + * @see DTDHandler#notationDecl */ virtual void notationDecl(const stringT& name, const stringT& publicId, @@ -290,7 +290,7 @@ public: * @param publicId The entity's public identifier, or an empty string. * @param systemId The entity's system identifier, or an empty string. * @param notationName The name of the associated notation. - * @see basic_DTDHandler#unparsedEntityDecl + * @see DTDHandler#unparsedEntityDecl */ virtual void unparsedEntityDecl(const stringT& name, const stringT& publicId, @@ -306,7 +306,7 @@ public: * Filter a new document locator event. * * @param locator The document locator. - * @see basic_ContentHandler#setDocumentLocator + * @see ContentHandler#setDocumentLocator */ virtual void setDocumentLocator(const LocatorT& locator) { @@ -316,7 +316,7 @@ public: /** * Filter a start document event. * - * @see basic_ContentHandler#startDocument + * @see ContentHandler#startDocument */ virtual void startDocument() { @@ -326,7 +326,7 @@ public: /** * Filter an end document event. * - * @see basic_ContentHandler#endDocument + * @see ContentHandler#endDocument */ virtual void endDocument() { @@ -338,7 +338,7 @@ public: * * @param prefix The Namespace prefix. * @param uri The Namespace URI. - * @see basic_ContentHandler#startPrefixMapping + * @see ContentHandler#startPrefixMapping */ virtual void startPrefixMapping(const stringT& prefix, const stringT& uri) { @@ -349,7 +349,7 @@ public: * Filter an end Namespace prefix mapping event. * * @param prefix The Namespace prefix. - * @see basic_ContentHandler#endPrefixMapping + * @see ContentHandler#endPrefixMapping */ virtual void endPrefixMapping(const stringT& prefix) { @@ -364,7 +364,7 @@ public: * @param qName The element's qualified (prefixed) name, or the empty * string. * @param atts The element's attributes. - * @see basic_ContentHandler#startElement + * @see ContentHandler#startElement */ virtual void startElement(const stringT& namespaceURI, const stringT& localName, const stringT& qName, const typename ContentHandlerT::AttributesT& atts) @@ -379,7 +379,7 @@ public: * @param localName The element's local name, or the empty string. * @param qName The element's qualified (prefixed) name, or the empty * string. - * @see basic_ContentHandler#endElement + * @see ContentHandler#endElement */ virtual void endElement(const stringT& namespaceURI, const stringT& localName, const stringT& qName) @@ -391,7 +391,7 @@ public: * Filter a character data event. * * @param ch The characters. - * @see basic_ContentHandler#characters + * @see ContentHandler#characters */ virtual void characters(const stringT& ch) { @@ -402,7 +402,7 @@ public: * Filter an ignorable whitespace event. * * @param ch The whitespace - * @see basic_ContentHandler#ignorableWhitespace + * @see ContentHandler#ignorableWhitespace */ virtual void ignorableWhitespace(const stringT& ch) { @@ -414,7 +414,7 @@ public: * * @param target The processing instruction target. * @param data The text following the target. - * @see basic_ContentHandler#processingInstruction + * @see ContentHandler#processingInstruction */ virtual void processingInstruction(const stringT& target, const stringT& data) { @@ -425,7 +425,7 @@ public: * Filter a skipped entity event. * * @param name The name of the skipped entity. - * @see basic_ContentHandler#skippedEntity + * @see ContentHandler#skippedEntity */ virtual void skippedEntity(const stringT& name) { @@ -438,7 +438,7 @@ public: * Filter a warning event. * * @param exception The warning as an exception. - * @see basic_ErrorHandler#warning + * @see ErrorHandler#warning */ virtual void warning(const SAXParseExceptionT& exception) { @@ -449,7 +449,7 @@ public: * Filter an error event. * * @param exception The error as an exception. - * @see basic_ErrorHandler#error + * @see ErrorHandler#error */ virtual void error(const SAXParseExceptionT& exception) { @@ -460,7 +460,7 @@ public: * Filter a fatal error event. * * @param exception The error as an exception. - * @see basic_ErrorHandler#fatalError + * @see ErrorHandler#fatalError */ virtual void fatalError(const SAXParseExceptionT& exception) { @@ -588,9 +588,9 @@ private: parent_->setLexicalHandler(*this); } // setupParse - basic_XMLFilterImpl(const basic_XMLFilterImpl&); - basic_XMLFilterImpl& operator=(const basic_XMLFilterImpl&); // no impl - bool operator==(const basic_XMLFilterImpl&); // no impl + XMLFilterImpl(const XMLFilterImpl&); + XMLFilterImpl& operator=(const XMLFilterImpl&); // no impl + bool operator==(const XMLFilterImpl&); // no impl XMLReaderT* parent_; EntityResolverT* entityResolver_; @@ -599,13 +599,8 @@ private: ErrorHandlerT* errorHandler_; DeclHandlerT* declHandler_; LexicalHandlerT* lexicalHandler_; - basic_DefaultHandler defaultHandler_; -}; // class basic_XMLFilter - -typedef basic_XMLFilterImpl XMLFilterImpl; -#ifndef ARABICA_NO_WCHAR_T -typedef basic_XMLFilterImpl wXMLFilterImpl; -#endif + DefaultHandler defaultHandler_; +}; // class XMLFilter } // namespace SAX } // namespace Arabica diff --git a/include/SAX/parsers/saxgarden.hpp b/include/SAX/parsers/saxgarden.hpp index 9eb1576d..3cac81c8 100644 --- a/include/SAX/parsers/saxgarden.hpp +++ b/include/SAX/parsers/saxgarden.hpp @@ -24,7 +24,7 @@ namespace SAX template -class Garden : public basic_XMLReader +class Garden : public XMLReaderInterface { public: typedef string_type stringT; @@ -32,15 +32,15 @@ public: Arabica::default_string_adaptor, T0, T1>::type string_adaptor_type; - typedef basic_EntityResolver EntityResolverT; - typedef basic_DTDHandler DTDHandlerT; - typedef basic_ContentHandler ContentHandlerT; - typedef basic_InputSource InputSourceT; - typedef basic_AttributesImpl AttributesImplT; - typedef basic_ErrorHandler ErrorHandlerT; - typedef basic_DeclHandler declHandlerT; - typedef basic_LexicalHandler lexicalHandlerT; - typedef typename basic_XMLReader::PropertyBase PropertyBase; + typedef EntityResolver EntityResolverT; + typedef DTDHandler DTDHandlerT; + typedef ContentHandler ContentHandlerT; + typedef InputSource InputSourceT; + typedef AttributesImpl AttributesImplT; + typedef ErrorHandler ErrorHandlerT; + typedef DeclHandler declHandlerT; + typedef LexicalHandler lexicalHandlerT; + typedef typename XMLReaderInterface::PropertyBase PropertyBase; Garden(); @@ -254,7 +254,7 @@ std::auto_ptr::PropertyBase> Garden -void Garden::doSetProperty(const stringT& name, std::auto_ptr::PropertyBase> value) +void Garden::doSetProperty(const stringT& name, std::auto_ptr::PropertyBase> value) { throw SAXNotRecognizedException(string_adaptor_type::asStdString(name)); } // doSetProperty @@ -451,7 +451,7 @@ void Garden::reportError(const std::string& message, bool f if(!errorHandler_) return; - SAX::basic_SAXParseException e(message); + SAX::SAXParseException e(message); if(fatal) errorHandler_->fatalError(e); diff --git a/include/SAX/saxfwd.hpp b/include/SAX/saxfwd.hpp index f9a2568d..6d5b9298 100644 --- a/include/SAX/saxfwd.hpp +++ b/include/SAX/saxfwd.hpp @@ -73,37 +73,15 @@ namespace Arabica namespace SAX { -template class basic_AttributeList; -template class basic_DocumentHandler; -template class basic_DTDHandler; -template class basic_EntityResolver; -template class basic_InputSource; -template class basic_Locator; -template class basic_Parser; -template class basic_SAXParseException; -template class basic_ErrorHandler; - -typedef basic_AttributeList AttributeList; -typedef basic_DocumentHandler DocumentHandler; -typedef basic_DTDHandler DTDHandler; -typedef basic_EntityResolver EntityResolver; -typedef basic_InputSource InputSource; -typedef basic_Locator Locator; -typedef basic_Parser Parser; -typedef basic_SAXParseException SAXParseException; -typedef basic_ErrorHandler ErrorHandler; - -#ifndef ARABICA_NO_WCHAR_T -typedef basic_AttributeList wAttributeList; -typedef basic_DocumentHandler wDocumentHandler; -typedef basic_DTDHandler wDTDHandler; -typedef basic_EntityResolver wEntityResolver; -typedef basic_InputSource wInputSource; -typedef basic_Locator wLocator; -typedef basic_Parser wParser; -typedef basic_SAXParseException wSAXParseException; -typedef basic_ErrorHandler wErrorHandler; -#endif +template class AttributeList; +template class DocumentHandler; +template class DTDHandler; +template class EntityResolver; +template class InputSource; +template class Locator; +template class Parser; +template class SAXParseException; +template class ErrorHandler; } // namespace SAX } // namespace Arabica diff --git a/include/SAX/wrappers/saxexpat.hpp b/include/SAX/wrappers/saxexpat.hpp index 178a652a..a5d3074a 100644 --- a/include/SAX/wrappers/saxexpat.hpp +++ b/include/SAX/wrappers/saxexpat.hpp @@ -150,7 +150,7 @@ private: // so the SAX wrapper maps more or less directly to it. /** - * expat_wrapper puts an {@link basic_XMLReader XMLReader} interface + * expat_wrapper puts an {@link XMLReader XMLReader} interface * around Expat. *

* For general usage:
@@ -195,13 +195,13 @@ private: * @author Jez Higgins * jez@jezuk.co.uk * @version $Id$ - * @see SAX::basic_XMLReader + * @see SAX::XMLReader */ template -class expat_wrapper : public SAX::basic_XMLReader, - public SAX::basic_Locator, +class expat_wrapper : public SAX::XMLReaderInterface, + public SAX::Locator, public expat_wrapper_impl_mumbojumbo::expat2base { public: @@ -212,17 +212,17 @@ class expat_wrapper : public SAX::basic_XMLReader, T1>::type string_adaptor_type; typedef string_adaptor_type string_adaptorT; typedef string_adaptor_type SA; - typedef SAX::basic_EntityResolver entityResolverT; - typedef SAX::basic_DTDHandler dtdHandlerT; - typedef SAX::basic_ContentHandler contentHandlerT; - typedef SAX::basic_DeclHandler declHandlerT; - typedef SAX::basic_LexicalHandler lexicalHandlerT; - typedef SAX::basic_InputSource inputSourceT; - typedef SAX::basic_Locator locatorT; - typedef SAX::basic_NamespaceSupport namespaceSupportT; - typedef SAX::basic_ErrorHandler errorHandlerT; - typedef SAX::basic_SAXParseException SAXParseExceptionT; - typedef SAX::basic_XMLReader XMLReaderT; + typedef SAX::EntityResolver entityResolverT; + typedef SAX::DTDHandler dtdHandlerT; + typedef SAX::ContentHandler contentHandlerT; + typedef SAX::DeclHandler declHandlerT; + typedef SAX::LexicalHandler lexicalHandlerT; + typedef SAX::InputSource inputSourceT; + typedef SAX::Locator locatorT; + typedef SAX::NamespaceSupport namespaceSupportT; + typedef SAX::ErrorHandler errorHandlerT; + typedef SAX::SAXParseException SAXParseExceptionT; + typedef SAX::XMLReaderInterface XMLReaderT; typedef typename XMLReaderT::PropertyBase PropertyBaseT; typedef typename XMLReaderT::template Property getLexicalHandlerT; typedef typename XMLReaderT::template Property setLexicalHandlerT; @@ -589,7 +589,7 @@ int expat_wrapper::getColumnNumber() const } // getColumnNumber template -typename SAX::basic_NamespaceSupport::string_adaptorT>::Parts expat_wrapper::processName(const stringT& qName, bool isAttribute) +typename SAX::NamespaceSupport::string_adaptorT>::Parts expat_wrapper::processName(const stringT& qName, bool isAttribute) { typename namespaceSupportT::Parts p = nsSupport_.processName(qName, isAttribute); if(SA::empty(p.URI) && !SA::empty(p.prefix)) @@ -647,7 +647,7 @@ void expat_wrapper::startElement(const char* qName, const char* // OK we're doing Namespaces nsSupport_.pushContext(); - SAX::basic_AttributesImpl attributes; + SAX::AttributesImpl attributes; // take a first pass and copy all the attributes, noting any declarations if(atts && *atts != 0) @@ -699,7 +699,7 @@ void expat_wrapper::startElement(const char* qName, const char* template void expat_wrapper::startElementNoNS(const char* qName, const char** atts) { - SAX::basic_AttributesImpl attributes; + SAX::AttributesImpl attributes; if(atts && *atts != 0) { diff --git a/include/SAX/wrappers/saxlibxml2.hpp b/include/SAX/wrappers/saxlibxml2.hpp index 0e02aed9..fc927976 100644 --- a/include/SAX/wrappers/saxlibxml2.hpp +++ b/include/SAX/wrappers/saxlibxml2.hpp @@ -115,8 +115,8 @@ xmlSAXHandler* lwit_SaxHandler(); template -class libxml2_wrapper : public basic_XMLReader, - public basic_Locator, +class libxml2_wrapper : public XMLReaderInterface, + public Locator, protected libxml2_wrapper_impl_tiddle::libxml2_base { public: @@ -126,17 +126,17 @@ class libxml2_wrapper : public basic_XMLReader, T0, T1>::type string_adaptor_type; typedef string_adaptor_type string_adaptorT; - typedef SAX::basic_EntityResolver entityResolverT; - typedef SAX::basic_DTDHandler dtdHandlerT; - typedef SAX::basic_ContentHandler contentHandlerT; - typedef SAX::basic_DeclHandler declHandlerT; - typedef SAX::basic_LexicalHandler lexicalHandlerT; - typedef SAX::basic_InputSource inputSourceT; - typedef SAX::basic_Locator locatorT; - typedef SAX::basic_NamespaceSupport namespaceSupportT; - typedef SAX::basic_ErrorHandler errorHandlerT; - typedef SAX::basic_SAXParseException SAXParseExceptionT; - typedef SAX::basic_XMLReader XMLReaderT; + typedef SAX::EntityResolver entityResolverT; + typedef SAX::DTDHandler dtdHandlerT; + typedef SAX::ContentHandler contentHandlerT; + typedef SAX::DeclHandler declHandlerT; + typedef SAX::LexicalHandler lexicalHandlerT; + typedef SAX::InputSource inputSourceT; + typedef SAX::Locator locatorT; + typedef SAX::NamespaceSupport namespaceSupportT; + typedef SAX::ErrorHandler errorHandlerT; + typedef SAX::SAXParseException SAXParseExceptionT; + typedef SAX::XMLReaderInterface XMLReaderT; typedef typename XMLReaderT::PropertyBase PropertyBaseT; typedef typename XMLReaderT::template Property getLexicalHandlerT; typedef typename XMLReaderT::template Property setLexicalHandlerT; @@ -152,12 +152,12 @@ class libxml2_wrapper : public basic_XMLReader, //////////////////////////////////////////////// // Event Handlers - virtual void setEntityResolver(basic_EntityResolver& resolver) { entityResolver_ = &resolver; } - virtual basic_EntityResolver* getEntityResolver() const { return entityResolver_; } - virtual void setDTDHandler(basic_DTDHandler& handler) { dtdHandler_ = &handler; } - virtual basic_DTDHandler* getDTDHandler() const { return dtdHandler_; } - virtual void setContentHandler(basic_ContentHandler& handler) { contentHandler_ = &handler; } - virtual basic_ContentHandler* getContentHandler() const { return contentHandler_; } + virtual void setEntityResolver(EntityResolver& resolver) { entityResolver_ = &resolver; } + virtual EntityResolver* getEntityResolver() const { return entityResolver_; } + virtual void setDTDHandler(DTDHandler& handler) { dtdHandler_ = &handler; } + virtual DTDHandler* getDTDHandler() const { return dtdHandler_; } + virtual void setContentHandler(ContentHandler& handler) { contentHandler_ = &handler; } + virtual ContentHandler* getContentHandler() const { return contentHandler_; } virtual void setErrorHandler(errorHandlerT& handler) { errorHandler_ = &handler; } virtual errorHandlerT* getErrorHandler() const { return errorHandler_; } virtual void setDeclHandler(declHandlerT& handler) { declHandler_ = &handler; } @@ -167,7 +167,7 @@ class libxml2_wrapper : public basic_XMLReader, //////////////////////////////////////////////// // parsing - virtual void parse(basic_InputSource& source); + virtual void parse(InputSource& source); protected: //////////////////////////////////////////////// @@ -205,7 +205,7 @@ class libxml2_wrapper : public basic_XMLReader, virtual void SAXentityDecl(const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content); virtual xmlParserInputPtr SAXresolveEntity(const xmlChar* publicId, const xmlChar* systemId); - typename basic_NamespaceSupport::Parts processName(const stringT& qName, bool isAttribute); + typename NamespaceSupport::Parts processName(const stringT& qName, bool isAttribute); void reportError(const std::string& message, bool fatal = false); void checkNotParsing(const stringT& type, const stringT& name) const; @@ -380,9 +380,9 @@ void libxml2_wrapper::doSetProperty(const stringT& name, std::a } // doSetProperty template -typename SAX::basic_NamespaceSupport::string_adaptorT>::Parts libxml2_wrapper::processName(const stringT& qName, bool isAttribute) +typename SAX::NamespaceSupport::string_adaptorT>::Parts libxml2_wrapper::processName(const stringT& qName, bool isAttribute) { - typename basic_NamespaceSupport::Parts p = + typename NamespaceSupport::Parts p = nsSupport_.processName(qName, isAttribute); if(string_adaptorT::empty(p.URI) && !string_adaptorT::empty(p.prefix)) reportError(std::string("Undeclared prefix ") + string_adaptorT::asStdString(qName)); @@ -395,7 +395,7 @@ void libxml2_wrapper::reportError(const std::string& message, b if(!errorHandler_) return; - basic_SAXParseException e(message, *this); + SAXParseException e(message, *this); if(fatal) errorHandler_->fatalError(e); else @@ -446,7 +446,7 @@ int libxml2_wrapper::getColumnNumber() const } // getColumnNumber template -void libxml2_wrapper::parse(basic_InputSource& source) +void libxml2_wrapper::parse(InputSource& source) { if(contentHandler_) contentHandler_->setDocumentLocator(*this); @@ -501,21 +501,21 @@ template void libxml2_wrapper::SAXwarning(const std::string& warning) { if(errorHandler_) - errorHandler_->warning(basic_SAXParseException(warning, *this)); + errorHandler_->warning(SAXParseException(warning, *this)); } // warning template void libxml2_wrapper::SAXerror(const std::string& error) { if(errorHandler_) - errorHandler_->error(basic_SAXParseException(error, *this)); + errorHandler_->error(SAXParseException(error, *this)); } // error template void libxml2_wrapper::SAXfatalError(const std::string& fatal) { if(errorHandler_) - errorHandler_->fatalError(basic_SAXParseException(fatal, *this)); + errorHandler_->fatalError(SAXParseException(fatal, *this)); } // fatal template @@ -547,7 +547,7 @@ void libxml2_wrapper::SAXstartElement(const xmlChar* qName, con // OK we're doing Namespaces nsSupport_.pushContext(); - SAX::basic_AttributesImpl attributes; + SAX::AttributesImpl attributes; // take a first pass and copy all the attributes, noting any declarations if(atts && *atts != 0) @@ -585,21 +585,21 @@ void libxml2_wrapper::SAXstartElement(const xmlChar* qName, con // declaration? if(string_adaptorT::find(attQName, nsc_.xmlns) != 0) { - typename basic_NamespaceSupport::Parts attName = processName(attQName, true); + typename NamespaceSupport::Parts attName = processName(attQName, true); attributes.addAttribute(attName.URI, attName.localName, attName.rawName, emptyString_, value); } } // while ... } // if ... // at last! report the event - typename basic_NamespaceSupport::Parts name = processName(string_adaptorT::construct_from_utf8(reinterpret_cast(qName)), false); + typename NamespaceSupport::Parts name = processName(string_adaptorT::construct_from_utf8(reinterpret_cast(qName)), false); contentHandler_->startElement(name.URI, name.localName, name.rawName, attributes); } // SAXstartElement template void libxml2_wrapper::SAXstartElementNoNS(const xmlChar* qName, const xmlChar** atts) { - SAX::basic_AttributesImpl attributes; + SAX::AttributesImpl attributes; if(atts && *atts != 0) { @@ -627,9 +627,9 @@ void libxml2_wrapper::SAXendElement(const xmlChar* qName) return; } // if(!namespaces_) - typename basic_NamespaceSupport::Parts name = processName(string_adaptorT::construct_from_utf8(reinterpret_cast(qName)), false); + typename NamespaceSupport::Parts name = processName(string_adaptorT::construct_from_utf8(reinterpret_cast(qName)), false); contentHandler_->endElement(name.URI, name.localName, name.rawName); - typename basic_NamespaceSupport::stringListT prefixes = nsSupport_.getDeclaredPrefixes(); + typename NamespaceSupport::stringListT prefixes = nsSupport_.getDeclaredPrefixes(); for(size_t i = 0, end = prefixes.size(); i < end; ++i) contentHandler_->endPrefixMapping(prefixes[i]); nsSupport_.popContext(); diff --git a/include/SAX/wrappers/saxmsxml2.hpp b/include/SAX/wrappers/saxmsxml2.hpp index 427ea2f7..c198339e 100644 --- a/include/SAX/wrappers/saxmsxml2.hpp +++ b/include/SAX/wrappers/saxmsxml2.hpp @@ -60,7 +60,7 @@ class COMMultiThreadInitializer : public COMInitializer_tag template -class msxml2_wrapper : public SAX::basic_XMLReader +class msxml2_wrapper : public SAX::XMLReaderInterface { typedef typename Arabica::get_param, @@ -72,14 +72,14 @@ class msxml2_wrapper : public SAX::basic_XMLReader T0>::type COMInitializer_type; public: - typedef SAX::basic_EntityResolver entityResolverT; - typedef SAX::basic_DTDHandler dtdHandlerT; - typedef SAX::basic_ContentHandler contentHandlerT; - typedef SAX::basic_DeclHandler declHandlerT; - typedef SAX::basic_LexicalHandler lexicalHandlerT; - typedef SAX::basic_InputSource inputSourceT; - typedef SAX::basic_Locator locatorT; - typedef SAX::basic_ErrorHandler errorHandlerT; + typedef SAX::EntityResolver entityResolverT; + typedef SAX::DTDHandler dtdHandlerT; + typedef SAX::ContentHandler contentHandlerT; + typedef SAX::DeclHandler declHandlerT; + typedef SAX::LexicalHandler lexicalHandlerT; + typedef SAX::InputSource inputSourceT; + typedef SAX::Locator locatorT; + typedef SAX::ErrorHandler errorHandlerT; msxml2_wrapper(); virtual ~msxml2_wrapper(); @@ -92,14 +92,14 @@ class msxml2_wrapper : public SAX::basic_XMLReader ///////////////////////////////////////////////// // Event Handlers /* MSXML does not use EntityResolver currently */ - virtual void setEntityResolver(SAX::basic_EntityResolver& resolver) { } - virtual SAX::basic_EntityResolver* getEntityResolver() const { return 0; } - virtual void setDTDHandler(SAX::basic_DTDHandler& handler) { dtdHandler_.setDTDHandler(handler); } - virtual SAX::basic_DTDHandler* getDTDHandler() const { return dtdHandler_.getDTDHandler(); } - virtual void setContentHandler(SAX::basic_ContentHandler& handler) { contentHandler_.setContentHandler(handler); } - virtual SAX::basic_ContentHandler* getContentHandler() const { return contentHandler_.getContentHandler(); } - virtual void setErrorHandler(SAX::basic_ErrorHandler& handler); - virtual SAX::basic_ErrorHandler* getErrorHandler() const; + virtual void setEntityResolver(SAX::EntityResolver& resolver) { } + virtual SAX::EntityResolver* getEntityResolver() const { return 0; } + virtual void setDTDHandler(SAX::DTDHandler& handler) { dtdHandler_.setDTDHandler(handler); } + virtual SAX::DTDHandler* getDTDHandler() const { return dtdHandler_.getDTDHandler(); } + virtual void setContentHandler(SAX::ContentHandler& handler) { contentHandler_.setContentHandler(handler); } + virtual SAX::ContentHandler* getContentHandler() const { return contentHandler_.getContentHandler(); } + virtual void setErrorHandler(SAX::ErrorHandler& handler); + virtual SAX::ErrorHandler* getErrorHandler() const; virtual void setDeclHandler(declHandlerT& handler) { declHandler_.setDeclHandler(handler); } virtual declHandlerT* getDeclHandler() const { return declHandler_.getDeclHandler(); } virtual void setLexicalHandler(lexicalHandlerT& handler) { lexicalHandler_.setLexicalHandler(handler); } @@ -107,29 +107,29 @@ class msxml2_wrapper : public SAX::basic_XMLReader ////////////////////////////////////////////////// // Parsing - virtual void parse(SAX::basic_InputSource& input); + virtual void parse(SAX::InputSource& input); protected: - virtual std::auto_ptr::PropertyBase> doGetProperty(const string_type& name) + virtual std::auto_ptr::PropertyBase> doGetProperty(const string_type& name) { if(name == properties_.lexicalHandler) { - Property*>* prop = new Property*>(lexicalHandler_.getLexicalHandler()); - return std::auto_ptr::PropertyBase>(prop); + Property*>* prop = new Property*>(lexicalHandler_.getLexicalHandler()); + return std::auto_ptr::PropertyBase>(prop); } if(name == properties_.declHandler) { - Property*>* prop = new Property*>(declHandler_.getDeclHandler()); - return std::auto_ptr::PropertyBase>(prop); + Property*>* prop = new Property*>(declHandler_.getDeclHandler()); + return std::auto_ptr::PropertyBase>(prop); } throw SAX::SAXNotRecognizedException("Property not recognized "); } // doGetProperty - virtual void doSetProperty(const string_type& name, std::auto_ptr::PropertyBase> value) + virtual void doSetProperty(const string_type& name, std::auto_ptr::PropertyBase> value) { if(name == properties_.lexicalHandler) { - Property&>* prop = dynamic_cast&>*>(value.get()); + Property&>* prop = dynamic_cast&>*>(value.get()); if(!prop) throw std::runtime_error("bad_cast: Property LexicalHandler is wrong type, should be SAX::LexicalHandler&"); @@ -139,7 +139,7 @@ class msxml2_wrapper : public SAX::basic_XMLReader } // if ... if(name == properties_.declHandler) { - Property&>* prop = dynamic_cast&>*>(value.get()); + Property&>* prop = dynamic_cast&>*>(value.get()); if(!prop) throw std::runtime_error("bad_cast: Property DeclHandler is wrong type, should be SAX::DeclHandler&"); @@ -153,7 +153,7 @@ class msxml2_wrapper : public SAX::basic_XMLReader private: ////////////////////////////////////////////////////// // COM interface -> C++ interface adaptors - class LocatorAdaptor : public SAX::basic_Locator + class LocatorAdaptor : public SAX::Locator { public: LocatorAdaptor() : locator_(0) { } @@ -219,8 +219,8 @@ class msxml2_wrapper : public SAX::basic_XMLReader DTDHandlerAdaptor() : dtdHandler_(0) { } ~DTDHandlerAdaptor() { } - void setDTDHandler(SAX::basic_DTDHandler& handler) { dtdHandler_ = &handler; } - SAX::basic_DTDHandler* getDTDHandler() const { return dtdHandler_; } + void setDTDHandler(SAX::DTDHandler& handler) { dtdHandler_ = &handler; } + SAX::DTDHandler* getDTDHandler() const { return dtdHandler_; } virtual HRESULT STDMETHODCALLTYPE notationDecl( /* [in] */ const wchar_t *pwchName, @@ -261,7 +261,7 @@ class msxml2_wrapper : public SAX::basic_XMLReader unsigned long __stdcall Release() { return 0; } private: - SAX::basic_DTDHandler* dtdHandler_; + SAX::DTDHandler* dtdHandler_; }; // class DTDHandlerAdaptor class ContentHandlerAdaptor : public ISAXContentHandler @@ -270,8 +270,8 @@ class msxml2_wrapper : public SAX::basic_XMLReader ContentHandlerAdaptor() : contentHandler_(0) { } ~ContentHandlerAdaptor() { } - void setContentHandler(SAX::basic_ContentHandler& handler) { contentHandler_ = &handler; } - SAX::basic_ContentHandler* getContentHandler() const { return contentHandler_; } + void setContentHandler(SAX::ContentHandler& handler) { contentHandler_ = &handler; } + SAX::ContentHandler* getContentHandler() const { return contentHandler_; } virtual HRESULT STDMETHODCALLTYPE putDocumentLocator( @@ -396,12 +396,12 @@ class msxml2_wrapper : public SAX::basic_XMLReader private: //////////////////////////////////////////////// // member varaibles - SAX::basic_ContentHandler* contentHandler_; + SAX::ContentHandler* contentHandler_; LocatorAdaptor locator_; ////////////////////////////////////////////////////// // COM interface -> C++ interface adaptors - class AttributesAdaptor : public SAX::basic_Attributes + class AttributesAdaptor : public SAX::Attributes { public: AttributesAdaptor(ISAXAttributes __RPC_FAR *pAttributes) : attributes_(pAttributes) { } @@ -564,8 +564,8 @@ class msxml2_wrapper : public SAX::basic_XMLReader { } virtual ~ErrorHandlerAdaptor() { } - void setErrorHandler(SAX::basic_ErrorHandler& handler) { errorHandler_ = &handler; } - SAX::basic_ErrorHandler* getErrorHandler() const { return errorHandler_; } + void setErrorHandler(SAX::ErrorHandler& handler) { errorHandler_ = &handler; } + SAX::ErrorHandler* getErrorHandler() const { return errorHandler_; } virtual HRESULT STDMETHODCALLTYPE error( /* [in] */ ISAXLocator *pLocator, @@ -625,7 +625,7 @@ class msxml2_wrapper : public SAX::basic_XMLReader unsigned long __stdcall Release() { return 0; } private: - typedef SAX::basic_SAXParseException SAXParseExceptionT; + typedef SAX::SAXParseException SAXParseExceptionT; bool bWarning_; bool bError_; bool bFatal_; @@ -633,7 +633,7 @@ class msxml2_wrapper : public SAX::basic_XMLReader SAXParseExceptionT eError_; SAXParseExceptionT eFatal_; - SAX::basic_ErrorHandler* errorHandler_; + SAX::ErrorHandler* errorHandler_; }; // class ErrorHandlerAdaptor class LexicalHandlerAdaptor : public ISAXLexicalHandler @@ -642,8 +642,8 @@ class msxml2_wrapper : public SAX::basic_XMLReader LexicalHandlerAdaptor() : lexicalHandler_(0) { } virtual ~LexicalHandlerAdaptor() { } - void setLexicalHandler(SAX::basic_LexicalHandler& handler) { lexicalHandler_ = &handler; } - SAX::basic_LexicalHandler* getLexicalHandler() const { return lexicalHandler_; } + void setLexicalHandler(SAX::LexicalHandler& handler) { lexicalHandler_ = &handler; } + SAX::LexicalHandler* getLexicalHandler() const { return lexicalHandler_; } virtual HRESULT STDMETHODCALLTYPE startDTD( /* [in] */ const wchar_t *pwchName, @@ -721,7 +721,7 @@ class msxml2_wrapper : public SAX::basic_XMLReader unsigned long __stdcall Release() { return 0; } private: - SAX::basic_LexicalHandler* lexicalHandler_; + SAX::LexicalHandler* lexicalHandler_; }; // class LexicalHandlerAdaptor class DeclHandlerAdaptor : public ISAXDeclHandler @@ -730,8 +730,8 @@ class msxml2_wrapper : public SAX::basic_XMLReader DeclHandlerAdaptor() : declHandler_(0) { } virtual ~DeclHandlerAdaptor() { } - void setDeclHandler(SAX::basic_DeclHandler& handler) { declHandler_ = &handler; } - SAX::basic_DeclHandler* getDeclHandler() const { return declHandler_; } + void setDeclHandler(SAX::DeclHandler& handler) { declHandler_ = &handler; } + SAX::DeclHandler* getDeclHandler() const { return declHandler_; } virtual HRESULT STDMETHODCALLTYPE elementDecl( /* [in] */ const wchar_t *pwchName, @@ -807,13 +807,13 @@ class msxml2_wrapper : public SAX::basic_XMLReader unsigned long __stdcall Release() { return 0; } private: - SAX::basic_DeclHandler* declHandler_; + SAX::DeclHandler* declHandler_; }; // class DeclHandlerAdaptor class StreamAdaptor : public ISequentialStream { public: - StreamAdaptor(SAX::basic_InputSource& source) : + StreamAdaptor(SAX::InputSource& source) : source_(source) { } // StreamAdaptor @@ -847,7 +847,7 @@ class msxml2_wrapper : public SAX::basic_XMLReader unsigned long __stdcall Release() { return 1; } private: - SAX::basic_InputSource& source_; + SAX::InputSource& source_; }; // StreamAdaptor @@ -916,19 +916,19 @@ void msxml2_wrapper::setFeature(const string_type& name, bo } // setFeature template -void msxml2_wrapper::setErrorHandler(SAX::basic_ErrorHandler& handler) +void msxml2_wrapper::setErrorHandler(SAX::ErrorHandler& handler) { errorHandler_.setErrorHandler(handler); } // setErrorHandler template -SAX::basic_ErrorHandler* msxml2_wrapper::getErrorHandler() const +SAX::ErrorHandler* msxml2_wrapper::getErrorHandler() const { return errorHandler_.getErrorHandler(); } // getErrorHandler template -void msxml2_wrapper::parse(SAX::basic_InputSource& source) +void msxml2_wrapper::parse(SAX::InputSource& source) { if(source.getByteStream() == 0) { diff --git a/include/SAX/wrappers/saxxerces.hpp b/include/SAX/wrappers/saxxerces.hpp index 7f80ef13..4f15ffd6 100644 --- a/include/SAX/wrappers/saxxerces.hpp +++ b/include/SAX/wrappers/saxxerces.hpp @@ -122,7 +122,7 @@ namespace XercesImpl template -class xerces_wrapper : public SAX::basic_ProgressiveParser +class xerces_wrapper : public SAX::ProgressiveParser { private: typedef typename Arabica::get_param typedef string_adaptor_type string_adaptorT; protected: - typedef SAX::basic_XMLReader base; + typedef SAX::XMLReaderInterface base; public: typedef typename base::EntityResolverT EntityResolverT; typedef typename base::DTDHandlerT DTDHandlerT; typedef typename base::ContentHandlerT ContentHandlerT; typedef typename base::InputSourceT InputSourceT; - typedef SAX::basic_LexicalHandler LexicalHandlerT; - typedef SAX::basic_Locator LocatorT; - typedef SAX::basic_Attributes AttributesT; - typedef SAX::basic_DeclHandler DeclHandlerT; - typedef SAX::basic_ErrorHandler ErrorHandlerT; + typedef SAX::LexicalHandler LexicalHandlerT; + typedef SAX::Locator LocatorT; + typedef SAX::Attributes AttributesT; + typedef SAX::DeclHandler DeclHandlerT; + typedef SAX::ErrorHandler ErrorHandlerT; typedef typename ErrorHandlerT::SAXParseExceptionT SAXParseExceptionT; typedef SAX::XercesFeatureNames featuresT; @@ -939,14 +939,14 @@ void xerces_wrapper::setFeature(const string_type& name, bo template #ifndef ARABICA_VS6_WORKAROUND -std::auto_ptr::PropertyBase> xerces_wrapper::doGetProperty(const string_type& name) +std::auto_ptr::PropertyBase> xerces_wrapper::doGetProperty(const string_type& name) #else -std::auto_ptr::PropertyBase> xerces_wrapper::doGetProperty(const string_type& name) +std::auto_ptr::PropertyBase> xerces_wrapper::doGetProperty(const string_type& name) #endif { if(name == properties_.lexicalHandler) { - typedef typename SAX::basic_XMLReader::template Property Prop; + typedef typename SAX::XMLReaderInterface::template Property Prop; Prop *prop = new Prop(lexicalHandlerAdaptor_.getLexicalHandler()); #ifndef ARABICA_VS6_WORKAROUND return std::auto_ptr(prop); @@ -956,7 +956,7 @@ std::auto_ptr::PropertyBase> xerces_wrapper::template Property Prop; + typedef typename SAX::XMLReaderInterface::template Property Prop; Prop* prop = new Prop(declHandlerAdaptor_.getDeclHandler()); #ifndef ARABICA_VS6_WORKAROUND return std::auto_ptr(prop); @@ -966,7 +966,7 @@ std::auto_ptr::PropertyBase> xerces_wrapper::template Property StringPropertyType; + typedef typename SAX::XMLReaderInterface::template Property StringPropertyType; XMLCh* xercesExternalSchemaLocation = static_cast(xerces_->getProperty( @@ -989,7 +989,7 @@ std::auto_ptr::PropertyBase> xerces_wrapper::template Property StringPropertyType; + typedef typename SAX::XMLReaderInterface::template Property StringPropertyType; XMLCh* xercesExternalNoNamespaceSchemaLocation = static_cast(xerces_->getProperty( @@ -1014,7 +1014,7 @@ void xerces_wrapper::doSetProperty(const string_type& name, { if(name == properties_.lexicalHandler) { - typedef typename SAX::basic_XMLReader::template Property Prop; + typedef typename SAX::XMLReaderInterface::template Property Prop; Prop* prop = dynamic_cast(value.get()); if(!prop) @@ -1026,7 +1026,7 @@ void xerces_wrapper::doSetProperty(const string_type& name, if(name == properties_.declHandler) { - typedef typename SAX::basic_XMLReader::template Property Prop; + typedef typename SAX::XMLReaderInterface::template Property Prop; Prop* prop = dynamic_cast(value.get()); if(!prop) diff --git a/include/XSLT/impl/handler/xslt_apply_imports_handler.hpp b/include/XSLT/impl/handler/xslt_apply_imports_handler.hpp index 49a04f0e..6ca1eaaf 100644 --- a/include/XSLT/impl/handler/xslt_apply_imports_handler.hpp +++ b/include/XSLT/impl/handler/xslt_apply_imports_handler.hpp @@ -8,7 +8,7 @@ namespace Arabica namespace XSLT { -class ApplyImportsHandler : public SAX::DefaultHandler +class ApplyImportsHandler : public SAX::DefaultHandler { public: ApplyImportsHandler(CompilationContext& context): @@ -24,7 +24,7 @@ public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(applyImports_ == 0) { diff --git a/include/XSLT/impl/handler/xslt_apply_templates_handler.hpp b/include/XSLT/impl/handler/xslt_apply_templates_handler.hpp index 3f6a2319..173373c3 100755 --- a/include/XSLT/impl/handler/xslt_apply_templates_handler.hpp +++ b/include/XSLT/impl/handler/xslt_apply_templates_handler.hpp @@ -10,7 +10,7 @@ namespace Arabica namespace XSLT { -class ApplyTemplatesHandler : public SAX::DefaultHandler +class ApplyTemplatesHandler : public SAX::DefaultHandler { public: ApplyTemplatesHandler(CompilationContext& context) : @@ -22,7 +22,7 @@ public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(applyTemplates_ == 0) { diff --git a/include/XSLT/impl/handler/xslt_attribute_handler.hpp b/include/XSLT/impl/handler/xslt_attribute_handler.hpp index 040f9095..ab0590f4 100755 --- a/include/XSLT/impl/handler/xslt_attribute_handler.hpp +++ b/include/XSLT/impl/handler/xslt_attribute_handler.hpp @@ -21,7 +21,7 @@ protected: virtual Attribute* createContainer(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { static const ValueRule rules[] = { { "name", true, 0 }, { "namespace", false, 0 }, diff --git a/include/XSLT/impl/handler/xslt_call_template_handler.hpp b/include/XSLT/impl/handler/xslt_call_template_handler.hpp index fb7ba8bd..596969a8 100644 --- a/include/XSLT/impl/handler/xslt_call_template_handler.hpp +++ b/include/XSLT/impl/handler/xslt_call_template_handler.hpp @@ -9,7 +9,7 @@ namespace Arabica namespace XSLT { -class CallTemplateHandler : public SAX::DefaultHandler +class CallTemplateHandler : public SAX::DefaultHandler { public: CallTemplateHandler(CompilationContext& context) : @@ -21,7 +21,7 @@ public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(callTemplate_ == 0) { diff --git a/include/XSLT/impl/handler/xslt_choose_handler.hpp b/include/XSLT/impl/handler/xslt_choose_handler.hpp index 3ba25998..d011119c 100755 --- a/include/XSLT/impl/handler/xslt_choose_handler.hpp +++ b/include/XSLT/impl/handler/xslt_choose_handler.hpp @@ -21,7 +21,7 @@ public: virtual When* createContainer(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { static const ValueRule rules[] = { { "test", true, 0 }, { 0, false, 0} }; @@ -53,7 +53,7 @@ public: virtual Otherwise* createContainer(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(atts.getLength()) throw SAX::SAXException("xsl:otherwise may not have any attributes"); @@ -73,7 +73,7 @@ private: Choose* choose_; }; // class OtherwiseHandler -class ChooseHandler : public SAX::DefaultHandler +class ChooseHandler : public SAX::DefaultHandler { public: ChooseHandler(CompilationContext& context) : @@ -86,7 +86,7 @@ public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(!choose_) { diff --git a/include/XSLT/impl/handler/xslt_comment_handler.hpp b/include/XSLT/impl/handler/xslt_comment_handler.hpp index a03c46df..9701d529 100755 --- a/include/XSLT/impl/handler/xslt_comment_handler.hpp +++ b/include/XSLT/impl/handler/xslt_comment_handler.hpp @@ -20,7 +20,7 @@ public: virtual Comment* createContainer(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(atts.getLength() != 0) throw SAX::SAXException("xsl:comment can not have attributes"); diff --git a/include/XSLT/impl/handler/xslt_copy_handler.hpp b/include/XSLT/impl/handler/xslt_copy_handler.hpp index cab1a9ca..04d26565 100755 --- a/include/XSLT/impl/handler/xslt_copy_handler.hpp +++ b/include/XSLT/impl/handler/xslt_copy_handler.hpp @@ -19,7 +19,7 @@ public: virtual Copy* createContainer(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { static const ValueRule rules[] = { { "use-attribute-sets", false, 0 }, { 0, false, 0} }; @@ -29,7 +29,7 @@ public: } // createContainer }; // class WhenHandler -class CopyOfHandler : public SAX::DefaultHandler +class CopyOfHandler : public SAX::DefaultHandler { public: CopyOfHandler(CompilationContext& context) : @@ -41,7 +41,7 @@ public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(copyOf_ == 0) { diff --git a/include/XSLT/impl/handler/xslt_create_handler.hpp b/include/XSLT/impl/handler/xslt_create_handler.hpp index 6bde65e2..2b1ab2e7 100755 --- a/include/XSLT/impl/handler/xslt_create_handler.hpp +++ b/include/XSLT/impl/handler/xslt_create_handler.hpp @@ -15,12 +15,12 @@ namespace XSLT { template -SAX::DefaultHandler* CreateHandler(CompilationContext& context) +SAX::DefaultHandler* CreateHandler(CompilationContext& context) { return new Handler(context); } // create -class NotImplementedYetHandler : public SAX::DefaultHandler +class NotImplementedYetHandler : public SAX::DefaultHandler { public: NotImplementedYetHandler(CompilationContext& context) { } @@ -28,13 +28,13 @@ public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { throw SAX::SAXException("Haven't implemented " + qName + " yet"); } // startElement }; // NotImplementedYetHandler -typedef SAX::DefaultHandler* (*CreateHandlerPtr)(CompilationContext&); +typedef SAX::DefaultHandler* (*CreateHandlerPtr)(CompilationContext&); struct ChildElement { diff --git a/include/XSLT/impl/handler/xslt_element_handler.hpp b/include/XSLT/impl/handler/xslt_element_handler.hpp index 22a32785..31a17c70 100755 --- a/include/XSLT/impl/handler/xslt_element_handler.hpp +++ b/include/XSLT/impl/handler/xslt_element_handler.hpp @@ -21,7 +21,7 @@ protected: virtual Element* createContainer(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { static const ValueRule rules[] = { { "name", true, 0 }, { "namespace", false, 0 }, diff --git a/include/XSLT/impl/handler/xslt_for_each_handler.hpp b/include/XSLT/impl/handler/xslt_for_each_handler.hpp index fc5e5bf0..ebeb4692 100755 --- a/include/XSLT/impl/handler/xslt_for_each_handler.hpp +++ b/include/XSLT/impl/handler/xslt_for_each_handler.hpp @@ -23,7 +23,7 @@ protected: virtual ForEach* createContainer(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { static const ValueRule rules[] = { { "select", true, 0 }, { 0, false, 0} }; @@ -35,7 +35,7 @@ protected: virtual bool createChild(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if((namespaceURI == StylesheetConstant::NamespaceURI()) && (localName == "sort")) diff --git a/include/XSLT/impl/handler/xslt_if_handler.hpp b/include/XSLT/impl/handler/xslt_if_handler.hpp index 85174b37..0807f192 100755 --- a/include/XSLT/impl/handler/xslt_if_handler.hpp +++ b/include/XSLT/impl/handler/xslt_if_handler.hpp @@ -20,7 +20,7 @@ public: virtual If* createContainer(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { static const ValueRule rules[] = { { "test", true, 0 }, { 0, false, 0} }; diff --git a/include/XSLT/impl/handler/xslt_include_handler.hpp b/include/XSLT/impl/handler/xslt_include_handler.hpp index 1f5a38c4..89c05078 100644 --- a/include/XSLT/impl/handler/xslt_include_handler.hpp +++ b/include/XSLT/impl/handler/xslt_include_handler.hpp @@ -10,7 +10,7 @@ namespace Arabica namespace XSLT { -class IncludeHandler : public SAX::DefaultHandler +class IncludeHandler : public SAX::DefaultHandler { public: IncludeHandler() : @@ -21,7 +21,7 @@ public: { } // IncludeHandler - void context(CompilationContext& context, SAX::DefaultHandler* compiler) + void context(CompilationContext& context, SAX::DefaultHandler* compiler) { context_ = &context; compiler_ = compiler; @@ -30,7 +30,7 @@ public: void start_include(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { context_->parser().setContentHandler(*this); startElement(namespaceURI, localName, qName, atts); @@ -39,7 +39,7 @@ public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(no_content_) throw SAX::SAXException("xsl:include must be empty"); @@ -77,10 +77,10 @@ public: } } // startElement - virtual void startPrefixMapping(const stringT& prefix, const stringT& uri) - { - context_->parentHandler().startPrefixMapping(prefix, uri); - } // startPrefixMapping + virtual void startPrefixMapping(const stringT& prefix, const stringT& uri) + { + context_->parentHandler().startPrefixMapping(prefix, uri); + } // startPrefixMapping virtual void endElement(const std::string& namespaceURI, @@ -130,7 +130,7 @@ public: } // unwind_imports private: - std::string validate_href(const std::string& qName, const SAX::Attributes& atts) + std::string validate_href(const std::string& qName, const SAX::Attributes& atts) { static const ValueRule rules[] = { { "href", true, 0 }, { 0, false, 0 } }; @@ -157,7 +157,7 @@ private: std::string prev = context_->setBase(href); - SAX::InputSource source(href); + SAX::InputSource source(href); SAX::XMLReader include_parser; SAX::CatchErrorHandler errorHandler; @@ -173,7 +173,7 @@ private: current_includes_.pop_back(); } // include_stylesheet - SAX::DefaultHandler* compiler_; + SAX::DefaultHandler* compiler_; CompilationContext* context_; unsigned int pass_through_; bool no_content_; diff --git a/include/XSLT/impl/handler/xslt_inline_element_handler.hpp b/include/XSLT/impl/handler/xslt_inline_element_handler.hpp index bf7fbaae..44d9b127 100644 --- a/include/XSLT/impl/handler/xslt_inline_element_handler.hpp +++ b/include/XSLT/impl/handler/xslt_inline_element_handler.hpp @@ -21,7 +21,7 @@ protected: virtual InlineElement* createContainer(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { std::vector inlineAtts; for(unsigned int i = 0; i != atts.getLength(); ++i) diff --git a/include/XSLT/impl/handler/xslt_item_container_handler.hpp b/include/XSLT/impl/handler/xslt_item_container_handler.hpp index 320a3914..bce2ba79 100755 --- a/include/XSLT/impl/handler/xslt_item_container_handler.hpp +++ b/include/XSLT/impl/handler/xslt_item_container_handler.hpp @@ -11,10 +11,10 @@ namespace XSLT { const ChildElement* AllowedChildren(); -SAX::DefaultHandler* createInlineElementHandler(CompilationContext& context); +SAX::DefaultHandler* createInlineElementHandler(CompilationContext& context); template -class ItemContainerHandler : public SAX::DefaultHandler +class ItemContainerHandler : public SAX::DefaultHandler { protected: ItemContainerHandler(CompilationContext& context) : @@ -26,7 +26,7 @@ protected: virtual container_type* createContainer(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) = 0; + const SAX::Attributes& atts) = 0; CompilationContext& context() const { return context_; } container_type* container() const { return container_; } @@ -35,7 +35,7 @@ public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(container_ == 0) { @@ -71,7 +71,7 @@ protected: virtual bool createChild(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(namespaceURI == StylesheetConstant::NamespaceURI()) { @@ -156,7 +156,7 @@ const ChildElement* AllowedChildren() return allowedChildren; } // AllowedChildren -SAX::DefaultHandler* createInlineElementHandler(CompilationContext& context) +SAX::DefaultHandler* createInlineElementHandler(CompilationContext& context) { return new InlineElementHandler(context); } // InlineElementHandler diff --git a/include/XSLT/impl/handler/xslt_message_handler.hpp b/include/XSLT/impl/handler/xslt_message_handler.hpp index 08c596d0..14cb53be 100644 --- a/include/XSLT/impl/handler/xslt_message_handler.hpp +++ b/include/XSLT/impl/handler/xslt_message_handler.hpp @@ -21,7 +21,7 @@ protected: virtual Message* createContainer(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { static const ValueRule rules[] = { { "terminate", false, No, AllowedYesNo }, { 0, false, 0} }; diff --git a/include/XSLT/impl/handler/xslt_namespace_alias_handler.hpp b/include/XSLT/impl/handler/xslt_namespace_alias_handler.hpp index 5918dfc8..f077b819 100644 --- a/include/XSLT/impl/handler/xslt_namespace_alias_handler.hpp +++ b/include/XSLT/impl/handler/xslt_namespace_alias_handler.hpp @@ -8,7 +8,7 @@ namespace Arabica namespace XSLT { -class NamespaceAliasHandler : public SAX::DefaultHandler +class NamespaceAliasHandler : public SAX::DefaultHandler { public: NamespaceAliasHandler(CompilationContext& context) : @@ -20,7 +20,7 @@ public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(!done_) { diff --git a/include/XSLT/impl/handler/xslt_output_handler.hpp b/include/XSLT/impl/handler/xslt_output_handler.hpp index a7fa6575..a8d6300d 100644 --- a/include/XSLT/impl/handler/xslt_output_handler.hpp +++ b/include/XSLT/impl/handler/xslt_output_handler.hpp @@ -8,7 +8,7 @@ namespace Arabica namespace XSLT { -class OutputHandler : public SAX::DefaultHandler +class OutputHandler : public SAX::DefaultHandler { public: OutputHandler(CompilationContext& context) : @@ -19,7 +19,7 @@ public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(settings_.empty()) { diff --git a/include/XSLT/impl/handler/xslt_processing_instruction_handler.hpp b/include/XSLT/impl/handler/xslt_processing_instruction_handler.hpp index aa80767d..a3871d48 100755 --- a/include/XSLT/impl/handler/xslt_processing_instruction_handler.hpp +++ b/include/XSLT/impl/handler/xslt_processing_instruction_handler.hpp @@ -20,7 +20,7 @@ public: virtual ProcessingInstruction* createContainer(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { static const ValueRule rules[] = { { "name", true, 0 }, { 0, false, 0} }; diff --git a/include/XSLT/impl/handler/xslt_sort_handler.hpp b/include/XSLT/impl/handler/xslt_sort_handler.hpp index 4aee60c3..5cb14732 100755 --- a/include/XSLT/impl/handler/xslt_sort_handler.hpp +++ b/include/XSLT/impl/handler/xslt_sort_handler.hpp @@ -8,7 +8,7 @@ namespace Arabica namespace XSLT { -class SortHandler : public SAX::DefaultHandler +class SortHandler : public SAX::DefaultHandler { public: SortHandler(CompilationContext& context, @@ -22,7 +22,7 @@ public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(sort_ == 0) { diff --git a/include/XSLT/impl/handler/xslt_template_handler.hpp b/include/XSLT/impl/handler/xslt_template_handler.hpp index 6c93bc02..48713707 100755 --- a/include/XSLT/impl/handler/xslt_template_handler.hpp +++ b/include/XSLT/impl/handler/xslt_template_handler.hpp @@ -22,7 +22,7 @@ protected: virtual Template* createContainer(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { const std::string& match = atts.getValue("match"); if((match == "") && (atts.getValue("name") == "")) @@ -45,7 +45,7 @@ protected: virtual bool createChild(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if((namespaceURI == StylesheetConstant::NamespaceURI()) && (localName == "param")) diff --git a/include/XSLT/impl/handler/xslt_text_handler.hpp b/include/XSLT/impl/handler/xslt_text_handler.hpp index 525ee88d..3f3e1cfd 100755 --- a/include/XSLT/impl/handler/xslt_text_handler.hpp +++ b/include/XSLT/impl/handler/xslt_text_handler.hpp @@ -8,7 +8,7 @@ namespace Arabica namespace XSLT { -class TextHandler : public SAX::DefaultHandler +class TextHandler : public SAX::DefaultHandler { public: TextHandler(CompilationContext& context) : @@ -20,7 +20,7 @@ public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(text_ == 0) { diff --git a/include/XSLT/impl/handler/xslt_value_of_handler.hpp b/include/XSLT/impl/handler/xslt_value_of_handler.hpp index 2cb18154..4b70f472 100755 --- a/include/XSLT/impl/handler/xslt_value_of_handler.hpp +++ b/include/XSLT/impl/handler/xslt_value_of_handler.hpp @@ -9,7 +9,7 @@ namespace Arabica namespace XSLT { -class ValueOfHandler : public SAX::DefaultHandler +class ValueOfHandler : public SAX::DefaultHandler { public: ValueOfHandler(CompilationContext& context) : @@ -21,7 +21,7 @@ public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(valueOf_ == 0) { diff --git a/include/XSLT/impl/handler/xslt_value_validation.hpp b/include/XSLT/impl/handler/xslt_value_validation.hpp index e302a088..19ccfd7a 100755 --- a/include/XSLT/impl/handler/xslt_value_validation.hpp +++ b/include/XSLT/impl/handler/xslt_value_validation.hpp @@ -49,7 +49,7 @@ void validateAttribute(const std::string& parentElement, } // validateAttribute std::map gatherAttributes(const std::string& parentElement, - const SAX::Attributes& atts, + const SAX::Attributes& atts, const ValueRule* rules) { std::map results; diff --git a/include/XSLT/impl/handler/xslt_variable_handler.hpp b/include/XSLT/impl/handler/xslt_variable_handler.hpp index 277912d5..1125e611 100644 --- a/include/XSLT/impl/handler/xslt_variable_handler.hpp +++ b/include/XSLT/impl/handler/xslt_variable_handler.hpp @@ -23,7 +23,7 @@ protected: virtual VType* createContainer(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { static const ValueRule rules[] = { { "name", true, 0 }, { "select", false, 0 }, diff --git a/include/XSLT/impl/xslt_compilation_context.hpp b/include/XSLT/impl/xslt_compilation_context.hpp index c73f2bd8..4952e3ee 100755 --- a/include/XSLT/impl/xslt_compilation_context.hpp +++ b/include/XSLT/impl/xslt_compilation_context.hpp @@ -39,7 +39,7 @@ public: } // while ... } // ~CompilationContext - void root(SAX::DefaultHandler& root) + void root(SAX::DefaultHandler& root) { handlerStack_.push(&root); } // root @@ -64,11 +64,11 @@ public: } // setBase void push(ItemContainer* parent, - SAX::DefaultHandler* newHandler, + SAX::DefaultHandler* newHandler, const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { parentStack_.push(parent); handlerStack_.push(newHandler); @@ -89,7 +89,7 @@ public: return *parentStack_.top(); } // parentContainer - SAX::ContentHandler& parentHandler() const + SAX::ContentHandler& parentHandler() const { parser_.setContentHandler(*handlerStack_.top()); return parser_.contentHandler(); @@ -131,7 +131,7 @@ private: StylesheetParser& parser_; const Arabica::XPath::XPath& xpath_; Stylesheet& stylesheet_; - std::stack handlerStack_; + std::stack*> handlerStack_; std::stack parentStack_; std::map namespaceRemap_; diff --git a/include/XSLT/impl/xslt_functions.hpp b/include/XSLT/impl/xslt_functions.hpp index 130e2059..63adea91 100644 --- a/include/XSLT/impl/xslt_functions.hpp +++ b/include/XSLT/impl/xslt_functions.hpp @@ -62,7 +62,7 @@ private: Arabica::io::URI absolute(Arabica::io::URI(baseURI_), location); - SAX::InputSource is(absolute.as_string()); + SAX::InputSource is(absolute.as_string()); domParser.parse(is); if(!eh.errorsReported()) diff --git a/include/XSLT/impl/xslt_sink.hpp b/include/XSLT/impl/xslt_sink.hpp index c1e2a9e0..09cc2169 100755 --- a/include/XSLT/impl/xslt_sink.hpp +++ b/include/XSLT/impl/xslt_sink.hpp @@ -221,7 +221,7 @@ public: protected: virtual void do_start_document(const Settings& settings) = 0; virtual void do_end_document() = 0; - virtual void do_start_element(const std::string& qName, const std::string& namespaceURI, const SAX::Attributes& atts) = 0; + virtual void do_start_element(const std::string& qName, const std::string& namespaceURI, const SAX::Attributes& atts) = 0; virtual void do_end_element(const std::string& qName, const std::string& namespaceURI) = 0; virtual void do_characters(const std::string& ch) = 0; virtual void do_comment(const std::string& ch) = 0; @@ -305,7 +305,7 @@ private: int pending_attribute_; std::string name_; std::string namespaceURI_; - SAX::AttributesImpl atts_; + SAX::AttributesImpl atts_; std::stringstream buffer_; bool text_mode_; NamespaceStack namespaceStack_; @@ -419,7 +419,7 @@ protected: void do_start_element(const std::string& qName, const std::string& namespaceURI, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(!seen_root_) do_decl(qName); @@ -650,7 +650,7 @@ protected: void do_start_element(const std::string& qName, const std::string& namespaceURI, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { indent(); DOM::Element elem = document().createElementNS(namespaceURI, qName); diff --git a/include/XSLT/impl/xslt_stylesheet_compiler.hpp b/include/XSLT/impl/xslt_stylesheet_compiler.hpp index b4a96e33..8ea864e7 100755 --- a/include/XSLT/impl/xslt_stylesheet_compiler.hpp +++ b/include/XSLT/impl/xslt_stylesheet_compiler.hpp @@ -19,7 +19,7 @@ namespace Arabica namespace XSLT { -class StylesheetHandler : public SAX::DefaultHandler +class StylesheetHandler : public SAX::DefaultHandler { public: StylesheetHandler(CompilationContext& context) : @@ -34,7 +34,7 @@ public: virtual void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { if(top_) { @@ -105,13 +105,13 @@ private: void include_stylesheet(const std::string& namespaceURI, const std::string& localName, const std::string& qName, - const SAX::Attributes& atts) + const SAX::Attributes& atts) { includer_.start_include(namespaceURI, localName, qName, atts); } // include_stylesheet CompilationContext& context_; - SAX::DefaultHandler* child_; + SAX::DefaultHandler* child_; IncludeHandler includer_; bool top_; unsigned int foreign_; @@ -149,7 +149,7 @@ public: { } // ~StylesheetCompiler - std::auto_ptr compile(SAX::InputSource& source) + std::auto_ptr compile(SAX::InputSource& source) { error_ = ""; diff --git a/include/XSLT/impl/xslt_stylesheet_parser.hpp b/include/XSLT/impl/xslt_stylesheet_parser.hpp index c79c3b1a..810026f0 100755 --- a/include/XSLT/impl/xslt_stylesheet_parser.hpp +++ b/include/XSLT/impl/xslt_stylesheet_parser.hpp @@ -16,17 +16,17 @@ class StylesheetParser public: StylesheetParser() { } - void setContentHandler(SAX::ContentHandler& handler) + void setContentHandler(SAX::ContentHandler& handler) { namespace_tracker_.setContentHandler(handler); } // setContentHandler - SAX::ContentHandler& contentHandler() + SAX::ContentHandler& contentHandler() { return text_coalescer_; } // contentHandler - void parse(SAX::InputSource& source) + void parse(SAX::InputSource& source) { SAX::XMLReader base_parser; text_coalescer_.setParent(base_parser); diff --git a/src/SAX/helpers/InputSourceResolver.cpp b/src/SAX/helpers/InputSourceResolver.cpp index 6790c93b..d51f0136 100644 --- a/src/SAX/helpers/InputSourceResolver.cpp +++ b/src/SAX/helpers/InputSourceResolver.cpp @@ -15,7 +15,7 @@ using namespace Arabica::SAX; -InputSourceResolver::InputSourceResolver(const Arabica::SAX::InputSource& inputSource) : +InputSourceResolver::InputSourceResolver(const Arabica::SAX::InputSource& inputSource) : deleteStream_(false), byteStream_(0) { diff --git a/tests/DOM/test_SAX2DOM.hpp b/tests/DOM/test_SAX2DOM.hpp index 67fdd08f..fdbbcdeb 100644 --- a/tests/DOM/test_SAX2DOM.hpp +++ b/tests/DOM/test_SAX2DOM.hpp @@ -28,7 +28,7 @@ class SAX2DOMTest : public TestCase std::stringstream ss; ss << SA::asStdString(str); - Arabica::SAX::basic_InputSource is(ss); + Arabica::SAX::InputSource is(ss); Arabica::SAX::CatchErrorHandler eh; Arabica::SAX2DOM::Parser parser; parser.setErrorHandler(eh); diff --git a/tests/DOM/test_TreeWalker.hpp b/tests/DOM/test_TreeWalker.hpp index 77e0b8ff..c2d9fba0 100644 --- a/tests/DOM/test_TreeWalker.hpp +++ b/tests/DOM/test_TreeWalker.hpp @@ -28,7 +28,7 @@ class TreeWalkerTest : public TestCase std::stringstream ss; ss << SA::asStdString(str); - Arabica::SAX::basic_InputSource is(ss); + Arabica::SAX::InputSource is(ss); Arabica::SAX::CatchErrorHandler eh; Arabica::SAX2DOM::Parser parser; parser.setErrorHandler(eh); diff --git a/tests/SAX/test_WhitespaceStripper.hpp b/tests/SAX/test_WhitespaceStripper.hpp index b9d97e9a..aab39930 100644 --- a/tests/SAX/test_WhitespaceStripper.hpp +++ b/tests/SAX/test_WhitespaceStripper.hpp @@ -125,11 +125,11 @@ class WhitespaceStripperTest : public TestCase } // 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 Arabica::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 813c4469..d131a5aa 100644 --- a/tests/XPath/match_test.hpp +++ b/tests/XPath/match_test.hpp @@ -404,7 +404,7 @@ public: std::stringstream ss; ss << match; - Arabica::SAX::basic_InputSource is(ss); + Arabica::SAX::InputSource is(ss); Arabica::SAX::CatchErrorHandler eh; Arabica::SAX2DOM::Parser parser; parser.setErrorHandler(eh); diff --git a/tests/XSLT/xslt_test.hpp b/tests/XSLT/xslt_test.hpp index ea0574cb..32ab1c0d 100644 --- a/tests/XSLT/xslt_test.hpp +++ b/tests/XSLT/xslt_test.hpp @@ -18,7 +18,7 @@ const std::string SEPERATOR = "/"; Arabica::DOM::Document buildDOM(const std::string& filename) { - Arabica::SAX::InputSource is(filename); + Arabica::SAX::InputSource is(filename); Arabica::SAX2DOM::Parser parser; parser.parse(is); @@ -85,7 +85,7 @@ protected: { Arabica::XSLT::StylesheetCompiler compiler; - Arabica::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; - Arabica::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; - Arabica::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());