Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: radio buttons for selecting each version of a calculator?


Message #1 by "Jay Man" <jman11587@h...> on Sun, 2 Mar 2003 00:12:17
Well, it's not strange there are incompatibilities. After all, XHTML 1.0 
was created to overcome the problems of HTML 4.0 and earlier versions.
Technically, XHTML 1.0 is just a reformulation of HTML 4.01 into XML. That 
is, the same set of elements and attributes are used, except they are now 
supposed to follow specific rules about empty tags and minimized attributes.

However, I don't fully agree with what you wrote below.

C.10 of the XHTML specs says this:

<quote>
Some HTML user agents are unable to interpret boolean attributes when these 
appear in their full (non-minimized) form, as required by XML 1.0. Note 
this problem doesn't affect user agents compliant with HTML 4. The 
following attributes are involved: compact, nowrap, ismap, declare, 
noshade, checked, disabled, readonly, multiple, selected, noresize, defer.
</quote>

Most browsers these days will more or less understand HTML 4, so it's 
likely they understand full attributes. If you are coding for earlier 
browsers, there are a zillion features you should leave out anyway. Up 
until now, I never had any troubles using full attributes in most 
day-to-day browsers. This means that right-now I don't have any backwards 
compatibility problems. However, by following XHTML 1.0 rules, I can also 
ensure I won't get forward compatibility issues. Although it may take some 
time, some day browsers may stop supporting old, and incorrect HTML and 
other mark-up. I truly hope this will happen, as it will increase 
maintainability and exchangeability of documents.

The second link you provided also talks about minimized attributes. 
However, since this is the old version (HTML 4 and not XHTML 1) you can't 
expect it to follow the new rules. That's why it's an older standard, about 
to be replaced by the newer XHTML 1.0

So, if you look at the distinction between XML and XHTML as related to 
parsing, then XHTML _is_ XML. It's an XML implementation designed to markup 
documents. Nothing more, nothing less. HTML is also almost XML, except the 
rules are a lot less strict, so it doesn't validate as true XML.

By writing standards compliant browsers _and_ standard compliant websites, 
I believe we'll finally end up building better web sites with better tools 
that can better support and understand the standard.

My 2 cents.......



Imar





At 07:14 PM 3/3/2003 +0100, you wrote:
>         Really ?  Well, I did notice your use of ending slashes in empty
>elements. But concerning boolean attributes, that's not exactly how I
>understand from XHTML guideline (look at C.10) :
>http://www.w3.org/TR/xhtml1/#guidelines
>
>         And also the last sentence of HTML 4 recommendation here :
>http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.3.4.2
>
>         However, personally, I agree that there're lots of condractions (or
>incompatibilities) between HTML4 and XML (XHTML).  My choice of coding is
>based on the following thought :
>since it's more about HTML than X(HT)ML, that is, the browser acts like an
>HTML parser more than XML parser, I would better adapt myself to HTML
>standard than XML.
>
>         Actually, this situation isn't new.  About 5 years ago, there was a
>transition from HTML2 to HTML4 passing through HTML3.2.  During that time,
>the coding consideration was horrible.  But with time, new standard
>"prevails" as old browsers are dying out, the same phenomenon should
>reproduce again in the future.  But right now, HTML is still dominant, so
>maybe it's not a good idea to stick to XML in HTML document.
>
>         Well, this is my personal opinion ......



  Return to Index