html5_doctype icon indicating copy to clipboard operation
html5_doctype copied to clipboard

Add switch for HTML5 and XHTML5

Open designermonkey opened this issue 11 years ago • 11 comments

We should have a switch to allow the use of XHTML5

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title></title>
<meta charset="UTF-8" />
</head>

<body>
</body>
</html>

The above is valid markup for XHTML5 and allows the use of namespaces in the HTML. This has been an issue raised on the forum for how to use namespaces like the (horrible) Facebook ones in HTML5.

A switch in the Preferences page would allow a choice in output, and would switch regular expressions.

designermonkey avatar Jun 13 '13 22:06 designermonkey

I don't see the problem. Do you say that namespaces are not allowed in HTML5?

michael-e avatar Jun 13 '13 22:06 michael-e

They don't validate without the xmlns on the html tag.

designermonkey avatar Jun 13 '13 22:06 designermonkey

Do you say that namespaces are not allowed in HTML5?

I'm not going to say that again. o_O

designermonkey avatar Jun 13 '13 22:06 designermonkey

Well, you are right. I just did some research on the matter. So it sounds like a good idea, if you really want HTML5 to validate. :-)

(I myself am somehow disappointed by the fact that it doesn't need to validate. So why should I try?)

I somehow feel bad about changing the extension just because someone invents his own namespaces. Can you give an example of FB namespaces that are useful to a document???

michael-e avatar Jun 13 '13 22:06 michael-e

None. There are no useful Facebook anythings.

Just thought that it might be useful to some.

designermonkey avatar Jun 13 '13 22:06 designermonkey

So shouldn't we wait for a useful example before hacking the extension? :-)

michael-e avatar Jun 13 '13 22:06 michael-e

Or we could hack it and make it available as an alternate branch: xhtml5

bauhouse avatar Jun 13 '13 23:06 bauhouse

Bonza!

designermonkey avatar Jun 14 '13 09:06 designermonkey

:-)

michael-e avatar Jun 14 '13 10:06 michael-e

I've been reading a lot more about XHTML, polyglot syntax, HTML5 etc etc, and it is correct to leave the xmlns attribute at least, as we are using a system that deals with XML to output HTML5, we should definitely change the behaviour of this extension.

Personally, I would now just make the change without any kind of choice, but in favour of not ruffling feathers, it should be a choice in the preferences.

I will make the change in a branch, and ask for support before merging.

designermonkey avatar May 08 '14 15:05 designermonkey

Nope, the work was already done.

I've been away too long :(

designermonkey avatar May 08 '14 16:05 designermonkey