Fixes to the following issues:

*   Mis-capitalised parameter names.
*   Un-named parameters.
*   Use of SAXException by ErrorHandler (SAX 2.0 API uses SAXParseException
    here).
This commit is contained in:
pwalford 2002-10-08 02:49:59 +00:00
parent 481a59a813
commit 34cba250a6
7 changed files with 31 additions and 28 deletions

View file

@ -189,4 +189,3 @@ typedef basic_AttributeList<std::wstring> wAttributeList;
#endif
// end of file

View file

@ -155,7 +155,8 @@ public:
* @return The index of the attribute, or -1 if it does not
* appear in the list.
*/
virtual int getIndex(const stringT& uri, const stringT& localPart) const = 0;
virtual int getIndex(const stringT& uri, const stringT& localName) const = 0;
/**
* Look up the index of an attribute by XML 1.0 qualified name.
*
@ -218,7 +219,7 @@ public:
* attribute is not in the list or if qualified names
* are not available.
*/
virtual stringT getValue(const stringT& qname) const = 0;
virtual stringT getValue(const stringT& qName) const = 0;
}; // class Attributes

View file

@ -5,7 +5,7 @@
// $Id$
#include <string>
#include <SAX/SAXException.h>
#include <SAX/SAXParseException.h>
namespace SAX
{
@ -62,7 +62,7 @@ public:
* SAX parse exception.
* @see basic_SAXParseException
*/
virtual void warning(const SAXException& exception) = 0;
virtual void warning(const SAXParseException& exception) = 0;
/**
* Receive notification of a recoverable error.
*
@ -86,7 +86,7 @@ public:
* SAX parse exception.
* @see basic_SAXParseException
*/
virtual void error(const SAXException& exception) = 0;
virtual void error(const SAXParseException& exception) = 0;
/**
* Receive notification of a non-recoverable error.
*
@ -105,7 +105,7 @@ public:
* SAX parse exception.
* @see basic_SAXParseException
*/
virtual void fatalError(const SAXException& exception) = 0;
virtual void fatalError(const SAXParseException& exception) = 0;
}; // class ErrorHandler
}; // namespace SAX

View file

@ -79,7 +79,8 @@ public:
* default behaviour.
* @see basic_EntityResolver#resolveEntity
*/
virtual InputSourceT resolveEntity(const stringT&, const stringT&)
virtual InputSourceT resolveEntity(const stringT& publicId,
const stringT& systemId)
{
return InputSourceT();
} // resolverEntity
@ -100,9 +101,9 @@ public:
* @param systemId The notation system identifier.
* @see basic_DTDHandler#notationDecl
*/
virtual void notationDecl(const stringT&,
const stringT&,
const stringT&) { }
virtual void notationDecl(const stringT& name,
const stringT& publicId,
const stringT& systemId) { }
/**
* Receive notification of an unparsed entity declaration.
@ -118,10 +119,10 @@ public:
* @param notationName The name of the associated notation.
* @see basic_DTDHandler#unparsedEntityDecl
*/
virtual void unparsedEntityDecl(const stringT&,
const stringT&,
const stringT&,
const stringT&) { }
virtual void unparsedEntityDecl(const stringT& name,
const stringT& publicId,
const stringT& systemId,
const stringT& notationName) { }
//////////////////////////////////////////////////////////////////////
// Default implementation of DocumentHandler interface.
@ -137,7 +138,7 @@ public:
* @see basic_DocumentHandler#setDocumentLocator
* @see basic_Locator
*/
virtual void setDocumentLocator(const LocatorT&) { }
virtual void setDocumentLocator(const LocatorT& locator) { }
/**
* Receive notification of the beginning of the document.
@ -174,7 +175,8 @@ public:
* @param attributes The specified or defaulted attributes.
* @see basic_DocumentHandler#startElement
*/
virtual void startElement(const stringT&, const AttributeListT&) { }
virtual void startElement(const stringT& name,
const AttributeListT& attributes) { }
/**
* Receive notification of the end of an element.
*
@ -186,7 +188,7 @@ public:
* @param name The element type name.
* @see basic_DocumentHandler#endElement
*/
virtual void endElement(const stringT&) { }
virtual void endElement(const stringT& name) { }
/**
* Receive notification of character data inside an element.
@ -199,7 +201,7 @@ public:
* @param ch The characters.
* @see basic_DocumentHandler#characters
*/
virtual void characters(const stringT&) { }
virtual void characters(const stringT& ch) { }
/**
* Receive notification of ignorable whitespace in element content.
*
@ -211,7 +213,7 @@ public:
* @param ch The whitespace characters.
* @see basic_DocumentHandler#ignorableWhitespace
*/
virtual void ignorableWhitespace(const stringT&) { }
virtual void ignorableWhitespace(const stringT& ch) { }
/**
* Receive notification of a processing instruction.
@ -226,7 +228,8 @@ public:
* none is supplied.
* @see basic_DocumentHandler#processingInstruction
*/
virtual void processingInstruction(const stringT&, const stringT&) { }
virtual void processingInstruction(const stringT& target,
const stringT& data) { }
//////////////////////////////////////////////////////////////////////
// Default implementation of the ErrorHandler interface.
@ -243,7 +246,7 @@ public:
* @see basic_ErrorHandler#warning
* @see basic_SAXParseException
*/
virtual void warning(const SAXException&) { }
virtual void warning(const SAXException& e) { }
/**
* Receive notification of a recoverable parser error.
*
@ -256,7 +259,7 @@ public:
* @see basic_ErrorHandler#warning
* @see basic_SAXParseException
*/
virtual void error(const SAXException&) { }
virtual void error(const SAXException& e) { }
/**
* Report a fatal XML parsing error.
*

View file

@ -66,7 +66,7 @@ public:
* @throws std::invalid_argument exception when the supplied names
* does not identify an attribute
*/
virtual bool isSpecified(const stringT& uri, const stringT& locaName) const = 0;
virtual bool isSpecified(const stringT& uri, const stringT& localName) const = 0;
}; // class basic_Attributes2
typedef basic_Attributes2<std::string> Attributes2;

View file

@ -116,7 +116,7 @@ public:
*
* @param index The attribute's index (zero-based).
* @return The attribute's type, "CDATA" if the type is unknown, or an empty
* empty string if the index is out of bounds.
* string if the index is out of bounds.
* @see basic_Attributes#getType(int)
*/
virtual stringT getType(unsigned int index) const

View file

@ -324,7 +324,7 @@ public:
* @see ErrorHandler#warning
* @see SAXParseException
*/
virtual void warning(const SAXException&) { }
virtual void warning(const SAXParseException& e) { }
/**
* Receive notification of a recoverable parser error.
*
@ -339,7 +339,7 @@ public:
* @see ErrorHandler#warning
* @see SAXParseException
*/
virtual void error(const SAXException&) { }
virtual void error(const SAXParseException& e) { }
/**
* Report a fatal XML parsing error.
*
@ -357,7 +357,7 @@ public:
* @see ErrorHandler#fatalError
* @see SAXParseException
*/
virtual void fatalError(const SAXException& ex)
virtual void fatalError(const SAXParseException& e)
{
} // fatalError