HighDots Forums  

Re: JavaScript Document Code Not Cross Platform

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: JavaScript Document Code Not Cross Platform in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Richard Cornford
 
Posts: n/a

Default Re: JavaScript Document Code Not Cross Platform - 05-07-2005 , 11:09 AM






RobG wrote:
<snip>
Quote:
I took a punt that the OP was really after HTML.
Given the IE doesn't understand XHTML, HTML would probably be the OP's
best choice regardless of his intention.

Quote:
It's probably reasonable to infer that the OP was
attempting XHTML, but there seems to be an idea
spreading that closing empty tags is desirable in
HTML also
Many notions that are apparently not harmful are able to freely
propagate. But HTML and XHTML are subject to detailed specification so
they can be understood at a technical level, and they can both be
objectively correct and incorrect. You will be hard pressed to find
anyone with a technical understanding of these mark-up languages
encouraging the mixing of the two styles.

Quote:
- it will still validate OK as HTML 4 strict.
That depends a great deal on the context of the use of the slash at the
end of the tag. The SGML abbreviation '<br />' expands to '<br>>' ,
where the second chevron is text content following the BR element. The
abbreviated version will validate in contexts where text content would
be allowed, but would not validate if the element-terminating slash
implied the following text chevron in a context that did not allow text
content. The strict DTD has fewer contexts in which text is allowed than
the transition DTD.

Regardless of whether this mixed mark-up validates, it is unlikely that
the OP intended to insert a sequence of '>' characters into their page.
The fact that the majority of browsers do not follow the HTML
specification in this respect conceals the error, but it is still an
error to create mark-up that should be expected to produce results other
than those intended. And even browsers that do not handle the mark-up in
the way that they really should still expend additional effort in
disregarding what they perceive as a superfluous character in a tag.
Thus the folly in mixing mark-up styles should be pointed out when it is
observed, and discouraged.

Quote:
There is also no character encoding, title or closing
form tag.
As Mike said, character encoding is handled by required HTTP headers so
the absence of an optional (and theoretically superfluous) META element
is not an error. Other obvious mark-up errors could be pointed out to
the OP, or the blanket recommendation to create valid mark-up provided
(though the ill-conceived use of XHTML style mark-up in HTML would need
to be pointed out separately as, as you observer, it will often
validate).

Richard.




Reply With Quote
  #2  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: JavaScript Document Code Not Cross Platform - 05-15-2005 , 12:03 PM






Richard Cornford wrote:

Quote:
RobG wrote:
It's probably reasonable to infer that the OP was
attempting XHTML, but there seems to be an idea
spreading that closing empty tags is desirable in
HTML also

Many notions that are apparently not harmful are able to freely
propagate. But HTML and XHTML are subject to detailed specification so
they can be understood at a technical level, and they can both be
objectively correct and incorrect. You will be hard pressed to find
anyone with a technical understanding of these mark-up languages
encouraging the mixing of the two styles.
<rant>
Yes, I thought that, too, when reading the HTML Compatibility Guidelines
of the XHTML 1.0 Specification. They are flawed for exactly that reason.
</rant>


PointedEars
--
There are two possibilities: Either we are alone in the
universe or we are not. Both are equally terrifying.
-- Arthur C. Clarke


Reply With Quote
  #3  
Old   
Jim Ley
 
Posts: n/a

Default Re: JavaScript Document Code Not Cross Platform - 05-15-2005 , 12:06 PM



On Sun, 15 May 2005 18:03:00 +0200, Thomas 'PointedEars' Lahn
<PointedEars (AT) web (DOT) de> wrote:

Quote:
rant
Yes, I thought that, too, when reading the HTML Compatibility Guidelines
of the XHTML 1.0 Specification. They are flawed for exactly that reason.
/rant
The W3c is required to address all comments from the public, including
ones that arrive after it becomes a rec, rather than rant pointlessly
on usenet, www-html-editor (AT) w3 (DOT) org is the place to send your comments.

Jim.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.