How to use HTML5 in TG2.1?

15 views
Skip to first unread message

Raj

unread,
Sep 8, 2010, 9:49:40 PM9/8/10
to TurboGears
Hi,
I wish to experiment with the HTML5 microdata. Genshi is not allowing
microdata attributes since it is not well formed when using the
default document type.
Does anyone have a solution to use html5 in TG2.1
Thanks
Raj

Daniel Falk

unread,
Sep 9, 2010, 11:43:57 AM9/9/10
to turbo...@googlegroups.com

I have not worked with HTML 5 yet, but your problem could be that you're trying to use HTML in your template, but you should be using XHTML.  Genshi requires XML, and HTML 5 is not based upon XML.  If you want to use HTML 5 features, try using XHTML 5 ( http://www.w3.org/TR/html5/the-xhtml-syntax.html ) in your template.

According to the Genshi tutorial ( http://genshi.edgewall.org/wiki/GenshiTutorial ), just because you're using XHTML in your template does not mean that your template has to generate XHTML.  I would assume the same applies for 5.

You could also use Mako, which is fully supported as an alternate template engine and is not XML based at all.  It's faster too.

Reply all
Reply to author
Forward
0 new messages