symphonists / html5_doctype

[Symphony 2] A cludge to enforce a basic HTML5 doctype regardless of your XSLT output
Other
17 stars 13 forks source link

Add switch for HTML5 and XHTML5 #8

Open designermonkey opened 11 years ago

designermonkey commented 11 years ago

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.

michael-e commented 11 years ago

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

designermonkey commented 11 years ago

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

designermonkey commented 11 years ago

Do you say that namespaces are not allowed in HTML5?

I'm not going to say that again. o_O

michael-e commented 11 years ago

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???

designermonkey commented 11 years ago

None. There are no useful Facebook anythings.

Just thought that it might be useful to some.

michael-e commented 11 years ago

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

bauhouse commented 11 years ago

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

designermonkey commented 11 years ago

Bonza!

michael-e commented 11 years ago

:-)

designermonkey commented 10 years ago

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 commented 10 years ago

Nope, the work was already done.

I've been away too long :(