From: Waylan L. <wa...@gm...> - 2009-01-08 14:10:28
|
Yes, Python-Markdown outputs XHTML. In fact, in the soon to be released 2.0 we are using ElementTree to build the XHTML. As ElementTree is a rather strict XML tool, the output is always guaranteed to be valid XML and, thus, assuming no bugs (such as invalid tags or improper nesting), valid XHTML. Unfortunately, I am not aware of any tool that converts an ElementTree object to HTML4. If anybody else is, I'll happily add it as an option. Of course, there is the lxml package with various helpful html tools. However, being a rather difficult to install C library, we didn't want to make that a dependency of Python-Markdown. That said, there isn't any reason someone couldn't use lxml to write an extension. In fact, I recently wrote an extension which uses Tidy to clean up ElementTree's poorly done whitespace (the insignificant kind) and convert between XHTML and HTML. But, again, a C library has to be installed for it to work. That's not an option on most shared hosting servers - where python-markdown is most likely used. On Thu, Jan 8, 2009 at 7:54 AM, tchomby <tc...@go...> wrote: > What standard(s) does python-markdown's output conform to, XHTML 1.0, > XHTML 1.1, HTML 4.01, etc.? > > I know that the original perl markdown produces valid XHTML by default > or HTML (with the --html4tags option). Python-markdown doesn't seem to > have the --html4tags option, so is it XHTML then? > > Thanks > > ------------------------------------------------------------------------------ > Check out the new SourceForge.net Marketplace. > It is the best place to buy or sell services for > just about anything Open Source. > http://p.sf.net/sfu/Xq1LFB > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > -- ---- Waylan Limberg wa...@gm... |