mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-30 08:38:15 +01:00
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:
parent
481a59a813
commit
34cba250a6
7 changed files with 31 additions and 28 deletions
|
@ -189,4 +189,3 @@ typedef basic_AttributeList<std::wstring> wAttributeList;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// end of file
|
// end of file
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,8 @@ public:
|
||||||
* @return The index of the attribute, or -1 if it does not
|
* @return The index of the attribute, or -1 if it does not
|
||||||
* appear in the list.
|
* 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.
|
* 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
|
* attribute is not in the list or if qualified names
|
||||||
* are not available.
|
* are not available.
|
||||||
*/
|
*/
|
||||||
virtual stringT getValue(const stringT& qname) const = 0;
|
virtual stringT getValue(const stringT& qName) const = 0;
|
||||||
|
|
||||||
}; // class Attributes
|
}; // class Attributes
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// $Id$
|
// $Id$
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <SAX/SAXException.h>
|
#include <SAX/SAXParseException.h>
|
||||||
|
|
||||||
namespace SAX
|
namespace SAX
|
||||||
{
|
{
|
||||||
|
@ -62,7 +62,7 @@ public:
|
||||||
* SAX parse exception.
|
* SAX parse exception.
|
||||||
* @see basic_SAXParseException
|
* @see basic_SAXParseException
|
||||||
*/
|
*/
|
||||||
virtual void warning(const SAXException& exception) = 0;
|
virtual void warning(const SAXParseException& exception) = 0;
|
||||||
/**
|
/**
|
||||||
* Receive notification of a recoverable error.
|
* Receive notification of a recoverable error.
|
||||||
*
|
*
|
||||||
|
@ -86,7 +86,7 @@ public:
|
||||||
* SAX parse exception.
|
* SAX parse exception.
|
||||||
* @see basic_SAXParseException
|
* @see basic_SAXParseException
|
||||||
*/
|
*/
|
||||||
virtual void error(const SAXException& exception) = 0;
|
virtual void error(const SAXParseException& exception) = 0;
|
||||||
/**
|
/**
|
||||||
* Receive notification of a non-recoverable error.
|
* Receive notification of a non-recoverable error.
|
||||||
*
|
*
|
||||||
|
@ -105,7 +105,7 @@ public:
|
||||||
* SAX parse exception.
|
* SAX parse exception.
|
||||||
* @see basic_SAXParseException
|
* @see basic_SAXParseException
|
||||||
*/
|
*/
|
||||||
virtual void fatalError(const SAXException& exception) = 0;
|
virtual void fatalError(const SAXParseException& exception) = 0;
|
||||||
}; // class ErrorHandler
|
}; // class ErrorHandler
|
||||||
|
|
||||||
}; // namespace SAX
|
}; // namespace SAX
|
||||||
|
|
|
@ -79,7 +79,8 @@ public:
|
||||||
* default behaviour.
|
* default behaviour.
|
||||||
* @see basic_EntityResolver#resolveEntity
|
* @see basic_EntityResolver#resolveEntity
|
||||||
*/
|
*/
|
||||||
virtual InputSourceT resolveEntity(const stringT&, const stringT&)
|
virtual InputSourceT resolveEntity(const stringT& publicId,
|
||||||
|
const stringT& systemId)
|
||||||
{
|
{
|
||||||
return InputSourceT();
|
return InputSourceT();
|
||||||
} // resolverEntity
|
} // resolverEntity
|
||||||
|
@ -100,9 +101,9 @@ public:
|
||||||
* @param systemId The notation system identifier.
|
* @param systemId The notation system identifier.
|
||||||
* @see basic_DTDHandler#notationDecl
|
* @see basic_DTDHandler#notationDecl
|
||||||
*/
|
*/
|
||||||
virtual void notationDecl(const stringT&,
|
virtual void notationDecl(const stringT& name,
|
||||||
const stringT&,
|
const stringT& publicId,
|
||||||
const stringT&) { }
|
const stringT& systemId) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Receive notification of an unparsed entity declaration.
|
* Receive notification of an unparsed entity declaration.
|
||||||
|
@ -118,10 +119,10 @@ public:
|
||||||
* @param notationName The name of the associated notation.
|
* @param notationName The name of the associated notation.
|
||||||
* @see basic_DTDHandler#unparsedEntityDecl
|
* @see basic_DTDHandler#unparsedEntityDecl
|
||||||
*/
|
*/
|
||||||
virtual void unparsedEntityDecl(const stringT&,
|
virtual void unparsedEntityDecl(const stringT& name,
|
||||||
const stringT&,
|
const stringT& publicId,
|
||||||
const stringT&,
|
const stringT& systemId,
|
||||||
const stringT&) { }
|
const stringT& notationName) { }
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// Default implementation of DocumentHandler interface.
|
// Default implementation of DocumentHandler interface.
|
||||||
|
@ -137,7 +138,7 @@ public:
|
||||||
* @see basic_DocumentHandler#setDocumentLocator
|
* @see basic_DocumentHandler#setDocumentLocator
|
||||||
* @see basic_Locator
|
* @see basic_Locator
|
||||||
*/
|
*/
|
||||||
virtual void setDocumentLocator(const LocatorT&) { }
|
virtual void setDocumentLocator(const LocatorT& locator) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Receive notification of the beginning of the document.
|
* Receive notification of the beginning of the document.
|
||||||
|
@ -174,7 +175,8 @@ public:
|
||||||
* @param attributes The specified or defaulted attributes.
|
* @param attributes The specified or defaulted attributes.
|
||||||
* @see basic_DocumentHandler#startElement
|
* @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.
|
* Receive notification of the end of an element.
|
||||||
*
|
*
|
||||||
|
@ -186,7 +188,7 @@ public:
|
||||||
* @param name The element type name.
|
* @param name The element type name.
|
||||||
* @see basic_DocumentHandler#endElement
|
* @see basic_DocumentHandler#endElement
|
||||||
*/
|
*/
|
||||||
virtual void endElement(const stringT&) { }
|
virtual void endElement(const stringT& name) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Receive notification of character data inside an element.
|
* Receive notification of character data inside an element.
|
||||||
|
@ -199,7 +201,7 @@ public:
|
||||||
* @param ch The characters.
|
* @param ch The characters.
|
||||||
* @see basic_DocumentHandler#characters
|
* @see basic_DocumentHandler#characters
|
||||||
*/
|
*/
|
||||||
virtual void characters(const stringT&) { }
|
virtual void characters(const stringT& ch) { }
|
||||||
/**
|
/**
|
||||||
* Receive notification of ignorable whitespace in element content.
|
* Receive notification of ignorable whitespace in element content.
|
||||||
*
|
*
|
||||||
|
@ -211,7 +213,7 @@ public:
|
||||||
* @param ch The whitespace characters.
|
* @param ch The whitespace characters.
|
||||||
* @see basic_DocumentHandler#ignorableWhitespace
|
* @see basic_DocumentHandler#ignorableWhitespace
|
||||||
*/
|
*/
|
||||||
virtual void ignorableWhitespace(const stringT&) { }
|
virtual void ignorableWhitespace(const stringT& ch) { }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Receive notification of a processing instruction.
|
* Receive notification of a processing instruction.
|
||||||
|
@ -226,7 +228,8 @@ public:
|
||||||
* none is supplied.
|
* none is supplied.
|
||||||
* @see basic_DocumentHandler#processingInstruction
|
* @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.
|
// Default implementation of the ErrorHandler interface.
|
||||||
|
@ -243,7 +246,7 @@ public:
|
||||||
* @see basic_ErrorHandler#warning
|
* @see basic_ErrorHandler#warning
|
||||||
* @see basic_SAXParseException
|
* @see basic_SAXParseException
|
||||||
*/
|
*/
|
||||||
virtual void warning(const SAXException&) { }
|
virtual void warning(const SAXException& e) { }
|
||||||
/**
|
/**
|
||||||
* Receive notification of a recoverable parser error.
|
* Receive notification of a recoverable parser error.
|
||||||
*
|
*
|
||||||
|
@ -256,7 +259,7 @@ public:
|
||||||
* @see basic_ErrorHandler#warning
|
* @see basic_ErrorHandler#warning
|
||||||
* @see basic_SAXParseException
|
* @see basic_SAXParseException
|
||||||
*/
|
*/
|
||||||
virtual void error(const SAXException&) { }
|
virtual void error(const SAXException& e) { }
|
||||||
/**
|
/**
|
||||||
* Report a fatal XML parsing error.
|
* Report a fatal XML parsing error.
|
||||||
*
|
*
|
||||||
|
|
|
@ -66,7 +66,7 @@ public:
|
||||||
* @throws std::invalid_argument exception when the supplied names
|
* @throws std::invalid_argument exception when the supplied names
|
||||||
* does not identify an attribute
|
* 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
|
}; // class basic_Attributes2
|
||||||
|
|
||||||
typedef basic_Attributes2<std::string> Attributes2;
|
typedef basic_Attributes2<std::string> Attributes2;
|
||||||
|
|
|
@ -116,7 +116,7 @@ public:
|
||||||
*
|
*
|
||||||
* @param index The attribute's index (zero-based).
|
* @param index The attribute's index (zero-based).
|
||||||
* @return The attribute's type, "CDATA" if the type is unknown, or an empty
|
* @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)
|
* @see basic_Attributes#getType(int)
|
||||||
*/
|
*/
|
||||||
virtual stringT getType(unsigned int index) const
|
virtual stringT getType(unsigned int index) const
|
||||||
|
|
|
@ -324,7 +324,7 @@ public:
|
||||||
* @see ErrorHandler#warning
|
* @see ErrorHandler#warning
|
||||||
* @see SAXParseException
|
* @see SAXParseException
|
||||||
*/
|
*/
|
||||||
virtual void warning(const SAXException&) { }
|
virtual void warning(const SAXParseException& e) { }
|
||||||
/**
|
/**
|
||||||
* Receive notification of a recoverable parser error.
|
* Receive notification of a recoverable parser error.
|
||||||
*
|
*
|
||||||
|
@ -339,7 +339,7 @@ public:
|
||||||
* @see ErrorHandler#warning
|
* @see ErrorHandler#warning
|
||||||
* @see SAXParseException
|
* @see SAXParseException
|
||||||
*/
|
*/
|
||||||
virtual void error(const SAXException&) { }
|
virtual void error(const SAXParseException& e) { }
|
||||||
/**
|
/**
|
||||||
* Report a fatal XML parsing error.
|
* Report a fatal XML parsing error.
|
||||||
*
|
*
|
||||||
|
@ -357,7 +357,7 @@ public:
|
||||||
* @see ErrorHandler#fatalError
|
* @see ErrorHandler#fatalError
|
||||||
* @see SAXParseException
|
* @see SAXParseException
|
||||||
*/
|
*/
|
||||||
virtual void fatalError(const SAXException& ex)
|
virtual void fatalError(const SAXParseException& e)
|
||||||
{
|
{
|
||||||
} // fatalError
|
} // fatalError
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue