Understanding HTML, XML and XHTML

24 views
Skip to first unread message

Rob Hudson

unread,
Jun 6, 2008, 2:57:08 PM6/6/08
to Django developers
I'm pretty sure this has been beaten to death, and I was going to pass
on sending this in, but this paragraph made me ask, "What would it
hurt to ask?":

{% block quote %}
Unfortunately, sometimes you are not fully in control of the content
you produce. For example, this very blog, published with WordPress
tags. If you find yourself in this same boat, encourage your tools
vendors to provide support for generating valid HTML.
{% endblock %}

That came from this article which puts up some very strong points
regarding HTML and XHTML and browser rendering (preferring HTML4), and
points out that many leading web standards experts are also
recommending HTML4:
http://webkit.org/blog/68/understanding-html-xml-and-xhtml/

(Donning flame retardant suit b/c I'm sure I'll get flamed for being a
retard here...)

Is Django really the web framework for *perfectionists* if it, by
default, prefers the imperfect XHTML in newforms and the admin (and
other places)? If not a complete switch, could we at least not make
those who are anal about outputting HTML4 not have to work[1]
harder[2] than[3] those who are ok XHTML?

-Rob

[1] http://www.djangosnippets.org/snippets/618/
[2] http://www.djangosnippets.org/snippets/716/
[3] http://code.djangoproject.com/ticket/6925

Rob Hudson

unread,
Jun 10, 2008, 11:38:31 AM6/10/08
to Django developers
Hi Dango devs,

I wanted to publicly apologize for the framing of my question... I
meant it to be humorously provocative but I fear it could be easily
misread to be rude and annoying, and not easily turned into something
productive. That wasn't my intention.

I am curious if anyone thinks having support for outputting html4
compliant markup in Django is a good thing? And if so, what can I do
to help make that become a reality?

In searching for previous discussions I found one that I brought up in
Jan 2007 that never got traction, though most people seemed to agree
that there was some merit to the argument...
http://groups.google.com/group/django-developers/browse_frm/thread/b2ace4f7f69a73f6/78b927bc18d093d5

There was also some discussion (and I believe an attempt) to making
templatetags for newforms, I believe, based on Simon Willison's
suggestion:
http://groups.google.com/group/django-developers/browse_frm/thread/5f3694b8a19fb9a1

Is this important for anyone else besides me?

My humble apologies,
Rob

James Bennett

unread,
Jun 10, 2008, 12:04:26 PM6/10/08
to django-d...@googlegroups.com
On Tue, Jun 10, 2008 at 10:38 AM, Rob Hudson <trebor...@gmail.com> wrote:
> I am curious if anyone thinks having support for outputting html4
> compliant markup in Django is a good thing? And if so, what can I do
> to help make that become a reality?

I for one would appreciate it, because I'm abotu to switch back to
HTML4 Strict and I'm having to write some support code to handle that.


--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

Russell Keith-Magee

unread,
Jun 10, 2008, 7:45:21 PM6/10/08
to django-d...@googlegroups.com
On Tue, Jun 10, 2008 at 11:38 PM, Rob Hudson <trebor...@gmail.com> wrote:
>
> Hi Dango devs,
>
> I wanted to publicly apologize for the framing of my question... I
> meant it to be humorously provocative but I fear it could be easily
> misread to be rude and annoying, and not easily turned into something
> productive. That wasn't my intention.
>
> I am curious if anyone thinks having support for outputting html4
> compliant markup in Django is a good thing? And if so, what can I do
> to help make that become a reality?
...

> Is this important for anyone else besides me?

It's not unimportant - there is certainly an idea in here that
warrants some further discussion.

However, if we _ever_ want to get v1.0 out the door, we're going to
have to draw the line somewhere. This wouldn't be a trivial change -
at the very least, it will require a bit of discussion to work out
exactly what we should be doing. If we spend our time having those
discussions and implementing the result, thats time that isn't being
spent finishing newforms-admin, nailing the stray bugs post-qsrf, or
doing any of the other tasks on the v1.0 todo list.

Can I suggest that you log this as a ticket, mark it someday/maybe,
summarize your thoughts if you feel so enthused, and put a pin in it
until post v1.0. Once we have that out the door, we'll be looking for
something to do, and a HTML4 transition of some sort could be it.

Yours,
Russ Magee %-)

Rob Hudson

unread,
Jun 11, 2008, 12:24:32 PM6/11/08
to django-d...@googlegroups.com
On 6/10/08, Russell Keith-Magee <freakb...@gmail.com> wrote:
> However, if we _ever_ want to get v1.0 out the door, we're going to
> have to draw the line somewhere. This wouldn't be a trivial change -
> at the very least, it will require a bit of discussion to work out
> exactly what we should be doing. If we spend our time having those
> discussions and implementing the result, thats time that isn't being
> spent finishing newforms-admin, nailing the stray bugs post-qsrf, or
> doing any of the other tasks on the v1.0 todo list.
>
> Can I suggest that you log this as a ticket, mark it someday/maybe,
> summarize your thoughts if you feel so enthused, and put a pin in it
> until post v1.0. Once we have that out the door, we'll be looking for
> something to do, and a HTML4 transition of some sort could be it.

I agree any sort of transition should be tabled for now. And a
transition to HTML4 will also likely lead to discussions of having
XHTML support as an alternative.

And supporting HTML4 "in the meantime" (weird, that song by Helmet is
playing in shuffle mode as I typed that) would be nice if it were
easier, but there are some hackish ways to get it to work as is, so
maybe it's not worth the effort of distracting devs when a 1.0 push is
on.

-Rob

Reply all
Reply to author
Forward
0 new messages