[Django] #29681: Support XHTML5 (XML serialization of HTML5)

8 views
Skip to first unread message

Django

unread,
Aug 16, 2018, 6:33:03 PM8/16/18
to django-...@googlegroups.com
#29681: Support XHTML5 (XML serialization of HTML5)
------------------------------------------------+------------------------
Reporter: Nils Fredrik Gjerull | Owner: nobody
Type: Uncategorized | Status: new
Component: Forms | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Frameworks and libraries that generate html should output well-formed html
that can be used for both HTML serialization (text/html) and XML
serialization (application/xhtml+xml). This implies that Django should
continue to output XML compatible markup even for HTML5.

This do not mean that Django need to be restricted by the XHTML-
Transitional and XHTML-Strict standard. It only means that HTML5 needs to
be written in a XML compatible style.

This affects Django in three ways:
1. HTML must be well-formed. All start-tags needs an end-tag (except self-
closing tags). This is already the case.
1. All self-closing tags must end with '/>'.
2. All boolean attributes must have a value e.g 'checked="checked"'.

I will say that this time is the best time ever to serve pages with
application/xhtml+xml, because all browsers supports it. IE was the road
blocker for year, but since IE9 it supports it as well. Se a list of the
[https://developer.mozilla.org/en-
US/docs/Web/HTTP/Content_negotiation/List_of_default_Accept_values default
value of the Accept header] for various browsers from Mozilla.

See:
* [https://www.w3.org/TR/html/introduction.html#html-vs-xhtml]
* [https://www.w3.org/TR/html/the-xhtml-syntax.html]
* [https://en.wikipedia.org/wiki/HTML5#XHTML_5_(XML-serialized_HTML_5)]

--
Ticket URL: <https://code.djangoproject.com/ticket/29681>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 16, 2018, 9:03:49 PM8/16/18
to django-...@googlegroups.com
#29681: Support XHTML5 (XML serialization of HTML5)
-------------------------------------+-------------------------------------
Reporter: Nils Fredrik | Owner: nobody
Gjerull |
Type: | Status: closed
Cleanup/optimization |
Component: Forms | Version: 2.1
Severity: Normal | Resolution: wontfix

Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* status: new => closed
* resolution: => wontfix
* type: Uncategorized => Cleanup/optimization


Comment:

The [https://groups.google.com/d/topic/django-
developers/G4Rz1_Bmh7w/discussion django-developers discussion] hasn't
yielded a consensus to make this change. As I said on the mailing list,
please look into
[https://docs.djangoproject.com/en/stable/ref/forms/renderers/ custom
widget templates] for this.

--
Ticket URL: <https://code.djangoproject.com/ticket/29681#comment:1>

Reply all
Reply to author
Forward
0 new messages