Re: [SMARTY] standart plugin(s) suggestion

From: Date: Wed, 19 Feb 2003 09:43:38 +0000
Subject: Re: [SMARTY] standart plugin(s) suggestion
References: 1 2 3 4 5 6  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7861@lists.php.net to get a copy of this message
Hi André, > I have searched for the HTML versions and only found 4.01, 3.2 and 2.0. All > other version specifications were superceded. > So using 4.0 isn't correct I think?! In this case it would be wrong to use > the DTD of > 4.01. This is the reason why I check the strings and not the integer value. Hmm, when looking at the sites of the big browser creators (at Microsoft and at Mozilla) the situation is as follows: - Microsoft does always talk about "4.0", not about "4.01" (maybe because the pages were written before 4.01 was out?) - Mozilla knows about both DOCTYPES and makes no difference - the w3 organization only talks about "4.01" So what to do? I think if somebody wants to use your plugin, the plugin should look at the string and replace "4.0" with "4.01". What do you think ?! Another thing I found at http://www.htmlhelp.com/tools/validator/doctype.html : It seems, that the official DCOTYPE setting for HTML v3.2 is that: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> and for HTML v2.0 it is that: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> I don't know if there is really anybody which still uses such old versions, but who knows :-) > > - as far as I know, $dtd= true and $html="HTML" and $version >= 4 and > > no $type set should lead to an "strict"-DTD string > > Why? I thought most of the users don't create strict HTML output. So using a > strict > doctype could lead in errors with validating browsers. This is the reason > why I used Transitional by default. It's OK to have the Transitional as default, that's not what I wanted to suggest. I meant that if somebody calls the plugin with $dtd = true, $html="HTML" and $version="4.01" and $type="" then you should produce a strict-DTD string. BTW: I'm not sure if the string "Strict" as type is officially allowed, at w3c I found the following: http://www.w3.org/TR/REC-html40/struct/global.html#version-info and there the string <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> is the official DOCTYPE for strict DTD-settings (that means without "Strict" in the string). > I have checked this again and here's what I've found: w4.org uses "HTML" > (uppercase) for > HTML doctypes and "html" (lowercase) for XHTML doctypes. Don't know why but > I have implemented this check now :-? Yes you're right. Really strange... :-) I'll check your changes later... with regards, Matthias

« previous php.smarty.general (#7861) next »