src/reportlab/platypus/paraparser.py
branchpy33
changeset 4059 9b48d0d9f137
parent 4004 ebd460ef8d2f
child 4067 712e1822ca31
equal deleted inserted replaced
4058:a97a88afcfe8 4059:9b48d0d9f137
   929         self.handle_data(output)
   929         self.handle_data(output)
   930 
   930 
   931     def end_seq(self):
   931     def end_seq(self):
   932         pass
   932         pass
   933 
   933 
   934     def start_onDraw(self,attr):
   934     def start_ondraw(self,attr):
   935         defn = ABag()
   935         defn = ABag()
   936         if 'name' in attr: defn.name = attr['name']
   936         if 'name' in attr: defn.name = attr['name']
   937         else: self._syntax_error('<onDraw> needs at least a name attribute')
   937         else: self._syntax_error('<onDraw> needs at least a name attribute')
   938 
   938 
   939         if 'label' in attr: defn.label = attr['label']
   939         if 'label' in attr: defn.label = attr['label']
   940         defn.kind='onDraw'
   940         defn.kind='onDraw'
   941         self._push(cbDefn=defn)
   941         self._push(cbDefn=defn)
   942         self.handle_data('')
   942         self.handle_data('')
   943         self._pop()
   943         self._pop()
   944     end_onDraw=end_seq
   944     start_onDraw=start_ondraw 
       
   945     end_onDraw=end_ondraw=end_seq
   945 
   946 
   946     def start_index(self,attr):
   947     def start_index(self,attr):
   947         attr=self.getAttributes(attr,_indexAttrMap)
   948         attr=self.getAttributes(attr,_indexAttrMap)
   948         defn = ABag()
   949         defn = ABag()
   949         if 'item' in attr:
   950         if 'item' in attr:
  1007     #----------------------------------------------------------------
  1008     #----------------------------------------------------------------
  1008 
  1009 
  1009     def __init__(self,verbose=0, caseSensitive=0, ignoreUnknownTags=1):
  1010     def __init__(self,verbose=0, caseSensitive=0, ignoreUnknownTags=1):
  1010         HTMLParser.__init__(self)
  1011         HTMLParser.__init__(self)
  1011         self.verbose = verbose
  1012         self.verbose = verbose
       
  1013         #HTMLParser is cas insenstive anyway, but the rml interface still needs this
       
  1014         #all start/end_ methods should have a lower case version for HMTMParser
  1012         self.caseSensitive = caseSensitive
  1015         self.caseSensitive = caseSensitive
  1013         self.ignoreUnknownTags = ignoreUnknownTags
  1016         self.ignoreUnknownTags = ignoreUnknownTags
  1014 
  1017 
  1015     def _iReset(self):
  1018     def _iReset(self):
  1016         self.fragList = []
  1019         self.fragList = []