From: <am...@us...> - 2010-04-16 18:50:09
|
Revision: 7030 http://jython.svn.sourceforge.net/jython/?rev=7030&view=rev Author: amak Date: 2010-04-16 18:50:03 +0000 (Fri, 16 Apr 2010) Log Message: ----------- A full set of handlers for the LexicalHandler methods. Some will need to be implemented, e.g. the startCDATA and endCDATA methods. Modified Paths: -------------- trunk/jython/Lib/xml/sax/drivers2/drv_javasax.py Modified: trunk/jython/Lib/xml/sax/drivers2/drv_javasax.py =================================================================== --- trunk/jython/Lib/xml/sax/drivers2/drv_javasax.py 2010-04-16 18:22:42 UTC (rev 7029) +++ trunk/jython/Lib/xml/sax/drivers2/drv_javasax.py 2010-04-16 18:50:03 UTC (rev 7030) @@ -211,9 +211,32 @@ def processingInstruction(self, target, data): self._cont_handler.processingInstruction(target, data) + # Lexical handler methods def comment(self, char, start, len): - self._cont_handler.comment(unicode(String(char, start, len))) + try: + # Need to wrap this in a try..except in case the parser does not support lexical events + self._cont_handler.comment(unicode(String(char, start, len))) + except: + pass + def startCDATA(self): + pass # TODO + + def endCDATA(self): + pass # TODO + + def startDTD(self, name, publicId, systemId): + pass # TODO + + def endDTD(self): + pass # TODO + + def startEntity(self, name): + pass # TODO + + def endEntity(self, name): + pass # TODO + class AttributesImpl: def __init__(self, attrs = None): self._attrs = attrs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |