Generic Methods for SAX callbacks
DESCRIPTION: This is a collection of generic functions
for which one can write methods
so that they are called in response to
different SAX events.
The idea is that one defines methods for different
classes of the
.state
argument
and dispatch to different methods based on that
argument.
The functions represent the different SAX events.
USAGE:
startElement.SAX(name, atts, .state = NULL)
endElement.SAX(name, .state = NULL)
comment.SAX(content, .state = NULL)
processingInstruction.SAX(target, content, .state = NULL)
text.SAX(content, .state = NULL)
entityDeclaration.SAX(name, base, sysId, publicId, notationName, .state = NULL)
ARGUMENTS:
name
the name of the XML element or entity being declared
atts
the attributes of the XML element or entity
content
the value/string in the processing instruction or comment
target
the target of the processing instruction, e.g. the R in
<?R....>
base
the base for this entity
sysId
the system identifier for this entity
publicId
the public identifier for the entity
notationName
name of the notation specification
.state
the state object on which the user-defined methods
should dispatch.
VALUE:
Each method should return the (potentially modified)
state value. The supplied methods for virtual class SAXState return
the unmodified state value.
NOTE:
This no longer requires the Expat XML parser to be installed.
Instead, we use libxml's SAX parser.
AUTHOR(S):
Duncan Temple Lang
REFERENCES:
http://www.w3.org/XML ,
http://www.xmlsoft.org
SEE ALSO:
EXAMPLES: