bminer / node-blade

Blade - HTML Template Compiler, inspired by Jade & Haml
Other
320 stars 28 forks source link

Multiple doctypes #119

Closed vslinko closed 11 years ago

vslinko commented 11 years ago

XHTML1.1 document must contain two doctypes from predefined: xml and 1.1. But that code doesn't work:

doctype xml
doctype 1.1
html(xmlns="http://www.w3.org/1999/xhtml")

What better: add PR where 1.1 doctype contains xml or discuss about allow multiply doctypes in one blade document?

vslinko commented 11 years ago

Temporary solution:

blade.Compiler.doctypes['xhtml'] = blade.Compiler.doctypes['xml'] + blade.Compiler.doctypes['1.1'];
bminer commented 11 years ago

I think the best solution is to allow multiple doctype definitions at the beginning of the template. I've never really worried about this since some browsers choke on the XML schema declaration. So, I typically just put doctype 1.1 at the beginning of the file. Thoughts?

vslinko commented 11 years ago

Agree with multiple doctype definitions.

bminer commented 11 years ago

@vslinko - This will be added in the next week or so... before the Blade 3.0 stable release. Will that work, or do you need this feature sooner?

vslinko commented 11 years ago

No I use temporary fix. Thank you.

bminer commented 11 years ago

This will be included in the next version push (probably 3.0.0beta6 or 3.0.0rc1)

vslinko commented 11 years ago

Thank you!