GSSAXHandler $Revision$ $Date$ GSSAXHandler GSXML.h

XML SAX Handler.

GSSAXHandler is a callback-based interface to the XML parser that operates in a similar (though not identical) manner to SAX.

Each GSSAXHandler object is associated with a GSXMLParser object. As parsing progresses, the mathods of the GSSAXHandler are invoked by the parser, so the handler is able to deal with the elements and entities being parsed.

The callback methods in the GSSAXHandler class do nothing - it is intended that you subclass GSSAXHandler and override them.

handler

Create a new SAX handler.

lib

Return pointer to xmlSAXHandler structure.

parser

Return the parser object with which this handler is associated. This may occasionally be useful.

startDocument

Called when the document start being processed.

endDocument

Called when the document end has been detected.

isStandalone

Called if the document is standalone.

startElement: elementName attributes: elementAttributes

Called when an opening tag has been processed.

endElement elementName

Called when the end of an element has been detected.

attribute: name value: value

Handle an attribute that has been read by the parser.

characters: name

Receiving some chars from the parser.

ignoreWhitespace: ch

Receiving some ignorable whitespaces from the parser.

processInstruction: targetName value: PIData

A processing instruction has been parsed.

comment: value

A comment has been parsed.

cdataBlock: value

Called when a pcdata block has been parsed.

globalNamespace: name href: href prefix: prefix

An old global namespace has been parsed.

error: message

Called when found a error.

fatalError: message

Called when found a fatal error.

warning: message

Called when found a warning.

hasInternalSubset:

Does this document have an internal subset?

Return 1 for yes Return 0 for no Return -1 for don't know (let parser decide)
hasExternalSubset:

Does this document have an external subset.

Return 1 for yes Return 0 for no Return -1 for don't know (let parser decide)
internalSubset: name externalID: externalID systemID: systemID

Callback on internal subset declaration. Return YES if handled, NO if you want the parser to handle it.

externalSubset: name externalID: externalID systemID: systemID

Callback on external subset declaration. Return YES if handled, NO if you want the parser to handle it.

loadEntity: publicID at: locationURL

This method controls the loading of external entities into the system. If it returns an empty string, the entity is not loaded. If it returns a filename, the entity is loaded from that file. If it returns nil, the default entity loading mechanism is used.

The default entity loading mechanism is to construct a file name from the locationURL, by replacing all path separators with underscores, then attempt to locate that file in the DTDs resource directory of the main bundle, and all the standard system locations.

As a special case, the default loader examines the publicID and if it is a GNUstep DTD, the loader constructs a special name from the ID (by replacing dots with underscores and spaces with hyphens) and looks for a file with that name and a '.dtd' extension in the GNUstep bundles.

getEntity: name

Get an entity by name.

getParameterEntity: name

Get a parameter entity by name.

namespaceDecl: name href: href prefix: prefix

A namespace has been parsed.

notationDecl: publicId systemId: systemId

What to do when a notation declaration has been parsed.

entityDecl: name type: type publicId: publicId systemId: systemId content: content

An entity definition has been parsed.

attributeDecl: nameElement name: name type: type typeDefValue: defType defaultValue: value

An attribute definition has been parsed.

elementDecl: name type: type

An element definition has been parsed.

unparsedEntityDecl: name public: publicId system: systemId notationName: notation

What to do when an unparsed entity declaration is parsed.

reference: name

Called when an entity reference is detected.