I write this because the latest release version of Django (2.1) broke my

On my site I serve my html documents with the unusual, but perfectly
valid, mimetype application/xhtml+xml. That is I tell the browser to
parse my html documents as XML. I do this because I prefer the stricter
parsing and error messages for invalid documents.

It is perfectly valid to serve HTML5 as application/xhtml+xml, this is
called XHTML5. Some might thinks that HTML5 have replaced XHTML so we
should not care any more. But HTML5 has not replaced XHTML (as an XML
version of HTML), it has replaced the XHTML-Transitional and Strict
standards. You can think of XHTML5 as HTML5 serialized as XML.

As Django is a framework I think it should output HTML that can be
served as both text/html and application/xhtml+xml, and leave the
decision of what to use to the developer.

As valid XHTML5 is also valid HTML5, but not vice versa, all HTML
generated by the framework need to be written as XHTML5.

I reopened ticket #29038, but there is more that need to be fixed. I am
happy to provide a pull-request for this.

- https://www.w3.org/TR/html/introduction.html#html-vs-xhtml
- https://www.w3.org/TR/html/the-xhtml-syntax.html


Nils Fredrik Gjerull
"Ministry of Eternal Affairs"
Computer Department
( Not an official title :) )

You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to