Re: [SMARTY] standart plugin(s) suggestion

From: Date: Wed, 19 Feb 2003 08:38:56 +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-7859@lists.php.net to get a copy of this message
> I have checked this again and here's what I've found: w4.org uses "HTML" > (uppercase) for Wow w4.org !!! This is the developer of Internet Version 2.0 :-D "André Rabold" <arabold@nero.com> schrieb im Newsbeitrag news:20030219083649.93264.qmail@pb1.pair.com... > Hi Matthias, > > "Matthias Mohr" <MMohr@sysdesign-edv.de> schrieb im Newsbeitrag > news:003201c2d792$9f2c41b0$7600a8c0@mohr.loc... > > > Nice idea, so I have tried to implement such a plugin function and added > it > > > to the Wikki: > > > > > > http://smarty.incutio.com/?page=SmartyPlugins > > Looks good! > > > > Here are a few notes (which are only suggestions, no "laws"-my knowledge > > about that things are not so good, so I may be wrong :-) > > - wouldn't it be better to do the $version-tests after converting it to > a number? > > Then you could do tests like "if( $version_nr >= 4 )"; > > then the code would also work for HTML-version v4.0 (I don't know if > there > > is a difference between a DOCTYPE with 4.0 and one with 4.01) > > 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. > > > - make the tests for the type case-insensitive: if ( strtolower($type) > == "strict" ) > > Oops, you are right. > > > - 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. > > > - as far as I know, the case of the DOCTYPE-string matters "officially" > (but at least > > Mozilla ignores it as you can read at > > > > http://www.mozilla.org/docs/web-developer/quirks/doctypes.html ) > > But I think it would be best to let the generated string look > "officially" :-) (that means > > write "html" as "HTML"; make sure, that $html is always in uppercase > and that > > $type is always written with first letter in uppercase, the rest in > lowercase) > > 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 :-? > > Bye, > André > > (Newest update can be found on the Wiki page) > > > > > with regards, > > Matthias > > > > > >

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