[Bese-devel] [patch] Add plain HTML generation

Aankhen aankhen at gmail.com
Wed Feb 4 08:26:45 UTC 2009


On Wed, Feb 4, 2009 at 02:44, Clinton Ebadi <clinton at unknownlamer.org> wrote:
> Why would you want to generate HTML4? The xhtml produced by yaclml is
> valid html (note things like "<empty />" and whatnot).

Actually, the XHTML produced by YACLML is *well-formed* (i.e. there
are no syntactical errors) XHTML (i.e. not HTML).  Producing invalid
code with YACLML is easy.  Observe:

  (:span (:div "Hi")) ⇒ <span><div>Hi</div></span> ; invalid because
`span' is an inline element; it is not allowed to contain block-level
elements like `div'

Of course, that's a *good* thing, IMO.  YACLML generates markup.  It
should not be enforcing validity.

As for your question, the choice between XHTML and HTML is (at this
point) rather philosophical, hence why I avoided getting into the
"why" of it in my original post.  Suffice to say that there is nothing
to be gained from using XHTML unless you're actually making use of the
fact that it's XML, by integrating other vocabularies or parsing it
using XML tools in a way that you couldn't if it were HTML.  All that
requires you actually serve it as `application/xhtml+xml'—which
Internet Explorer, happily enough, doesn't support—or else the browser
just takes it to be regular HTML tag soup.

…I'll stop here rather than clutter up the list with more in that vein. :-)

Aankhen




More information about the bese-devel mailing list