reportlab/platypus/paraparser.py
changeset 211 52541f1643b6
parent 209 f46e0d4d113b
child 218 274db2129c04
equal deleted inserted replaced
210:3253b7cf59b1 211:52541f1643b6
    30 # OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    30 # OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    31 # PERFORMANCE OF THIS SOFTWARE. 
    31 # PERFORMANCE OF THIS SOFTWARE. 
    32 #
    32 #
    33 ###############################################################################
    33 ###############################################################################
    34 #	$Log: paraparser.py,v $
    34 #	$Log: paraparser.py,v $
       
    35 #	Revision 1.16  2000/05/15 12:15:29  rgbecker
       
    36 #	CDATA handler added
       
    37 #
    35 #	Revision 1.15  2000/05/13 16:04:06  rgbecker
    38 #	Revision 1.15  2000/05/13 16:04:06  rgbecker
    36 #	made size alias of fontsize for <para>
    39 #	made size alias of fontsize for <para>
    37 #
    40 #	
    38 #	Revision 1.14  2000/05/11 14:05:17  rgbecker
    41 #	Revision 1.14  2000/05/11 14:05:17  rgbecker
    39 #	Use reportlab.lib.xmllib
    42 #	Use reportlab.lib.xmllib
    40 #	
    43 #	
    41 #	Revision 1.13  2000/04/25 13:07:57  rgbecker
    44 #	Revision 1.13  2000/04/25 13:07:57  rgbecker
    42 #	Added license
    45 #	Added license
    43 #	
    46 #	
    44 __version__=''' $Id: paraparser.py,v 1.15 2000/05/13 16:04:06 rgbecker Exp $ '''
    47 __version__=''' $Id: paraparser.py,v 1.16 2000/05/15 12:15:29 rgbecker Exp $ '''
    45 import string
    48 import string
    46 import re
    49 import re
    47 from types import TupleType
    50 from types import TupleType
    48 import sys
    51 import sys
    49 import os
    52 import os
   397 		if frag.greek: frag.fontName = 'symbol'
   400 		if frag.greek: frag.fontName = 'symbol'
   398 		# bold, italic, and underline
   401 		# bold, italic, and underline
   399 		frag.fontName = tt2ps(frag.fontName,frag.bold,frag.italic)
   402 		frag.fontName = tt2ps(frag.fontName,frag.bold,frag.italic)
   400 
   403 
   401 		self.fragList.append(frag)
   404 		self.fragList.append(frag)
       
   405 
       
   406 	def handle_cdata(self,data):
       
   407 		self.handle_data(data)
   402 
   408 
   403 	#----------------------------------------------------------------
   409 	#----------------------------------------------------------------
   404 	def parse(self, text, style):
   410 	def parse(self, text, style):
   405 		"""Given a formatted string will return a list of
   411 		"""Given a formatted string will return a list of
   406 		ParaFrag objects with their calculated widths.
   412 		ParaFrag objects with their calculated widths.
   534 but listen while I tell you the prophecy that Teiresias made me, and
   540 but listen while I tell you the prophecy that Teiresias made me, and
   535 how carefully Aeaean Circe warned me to shun the island of the blessed
   541 how carefully Aeaean Circe warned me to shun the island of the blessed
   536 sun-god, for it was here, she said, that our worst danger would lie.
   542 sun-god, for it was here, she said, that our worst danger would lie.
   537 Head the ship, therefore, away from the island.''')
   543 Head the ship, therefore, away from the island.''')
   538 	check_text('''&lt; &gt; &amp; &quot; &apos;''')
   544 	check_text('''&lt; &gt; &amp; &quot; &apos;''')
       
   545 	check_text('''<![CDATA[<>&'"]]>''')