[py-dev] py.xml.html

holger krekel hpk at trillke.net
Fri Apr 15 00:11:11 CEST 2005


Hi William, 

On Thu, Apr 14, 2005 at 16:42 -0500, William McVey wrote:
> I've recently started using the py.xml.html package and ran across some
> additional HTML elements that would be nice to see get added to the
> defined __tagspec__ of the html class. Namely:
> 	"colgroup,col,map,area,blockquote,dl,dt,dd"
> 	"strong,script,style"

thanks, added (apart from script and style, which already existed in my tree). 

> Also, it would be nice if there were a flag that could turn off the XML
> short cut of <emptyelement />. In particular, when generating HTML for
> older browsers, it is much better to generate elements using the syntax
> of <emptyelement></emptyelement>. I've hacked this feature into
> xmlobj/visit.py in a very non-elegant fashion (always favoring the
> HTML-friendly approach, which works for me, but probably isn't
> appropriate for all cases). Let me know if other people think this is a
> good idea, and I can try to polish this up based off of an instantiation
> flag or something.

This sounds familiar.  I just added a flag to the Core visitor
(shortempty) and made html turn that off by default.  So the
tags should now serialize as you expect. 

A question: are you also using the CSS features? 
And please feel free to make suggestions and contributions. 

cheers, 

    holger



More information about the Pytest-dev mailing list