472,127 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

The XHTML Factor

So, where are we (as an industry) with regards to XHTML? I've been going
through a book published in 2002 that promotes the idea that we should all
be looking to create new projects as compliant with XHTML (at least using
the transitional DTD). Is the XHTML standard something developers at large
are taking seriously? Has Microsoft taken it seriously and included XHTML
compliance features into VS.NET 2003 (will they for the next version)? Are
any of you who work on large mission-critical Web applications making your
pages XHTML compliant? Are there any good reasons to avoid XHTML and instead
stay with HTML 4.01 for new projects, or should we automatically make new
pages XHTML compliant?

Thoughts? Rationalle?

Thanks!
Nov 18 '05 #1
3 1341
Hi Frank,

Visual Studio 2005 will let you create XHTML compliant code. It sounds like
the way to go for new projects.

http://lab.msdn.microsoft.com/librar...03aab55b97.asp

http://lab.msdn.microsoft.com/librar...03aab55b97.asp

Ken

"Frank Thomas" <No@Spam.org> wrote in message
news:ei**************@TK2MSFTNGP10.phx.gbl...
So, where are we (as an industry) with regards to XHTML? I've been going
through a book published in 2002 that promotes the idea that we should all
be looking to create new projects as compliant with XHTML (at least using
the transitional DTD). Is the XHTML standard something developers at large
are taking seriously? Has Microsoft taken it seriously and included XHTML
compliance features into VS.NET 2003 (will they for the next version)? Are
any of you who work on large mission-critical Web applications making your
pages XHTML compliant? Are there any good reasons to avoid XHTML and
instead
stay with HTML 4.01 for new projects, or should we automatically make new
pages XHTML compliant?

Thoughts? Rationalle?

Thanks!


Nov 18 '05 #2
Ken do you know if a webcontrols Id still is changed (_ctl_) in .Net 2.0,
thus making it impossible to use Id with CSS.

To Frank:
As your book describes the best way to go is transitional XHTML.

Thanks,
Anders
"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:ON**************@TK2MSFTNGP10.phx.gbl...
Hi Frank,

Visual Studio 2005 will let you create XHTML compliant code. It sounds like the way to go for new projects.

http://lab.msdn.microsoft.com/librar...03aab55b97.asp
http://lab.msdn.microsoft.com/librar...03aab55b97.asp
Ken

"Frank Thomas" <No@Spam.org> wrote in message
news:ei**************@TK2MSFTNGP10.phx.gbl...
So, where are we (as an industry) with regards to XHTML? I've been going
through a book published in 2002 that promotes the idea that we should all be looking to create new projects as compliant with XHTML (at least using the transitional DTD). Is the XHTML standard something developers at large are taking seriously? Has Microsoft taken it seriously and included XHTML compliance features into VS.NET 2003 (will they for the next version)? Are any of you who work on large mission-critical Web applications making your pages XHTML compliant? Are there any good reasons to avoid XHTML and
instead
stay with HTML 4.01 for new projects, or should we automatically make new pages XHTML compliant?

Thoughts? Rationalle?

Thanks!

Nov 18 '05 #3


Frank Thomas wrote:
So, where are we (as an industry) with regards to XHTML? I've been going
through a book published in 2002 that promotes the idea that we should all
be looking to create new projects as compliant with XHTML (at least using
the transitional DTD).


Well, XHTML 1.0 has nothing more to offer than HTML 4.01 has, it has
exactly the same elements and attributes with the same semantics as in
HTML 4.01 so you do not gain anything in terms of richer document
structure or richer form controls or better separation of content and
presentation.
And indeed the browser with the most market share, MS Internet Explorer,
doesn't really understand XHTML as XML, instead to have that (and other
browsers like Netscape 4) render your XHTML with the HTML 4.01 semantics
you have to write it according to the HTML backwards compatibility
guides given in
http://www.w3.org/TR/xhtml1/#guidelines
and then serve it as text/html to the browser which in the end means the
browser has to use its HTML tag soup error correcting parser to parse
your XHTML.
If you want to see how XHTML really works you need to send it as
application/xhtml+xml to a browser that understands that, like Opera 7
or Netscape 7 or Mozilla. These browsers use an XML parser to parse
content served as application/xhtml+xml, look for elements in the XHTML
namespace http://www.w3.org/1999/xhtml and render them according to the
defined semantics. But as parsing is done with an XML parser it means
the browser will not render anything but an error message to the browser
user if the source document is not well-formed thus if you look at the
following example
http://home.arcor.de/martin.honnen/j...004071801.html
which is a HTML 4.01 document served as text/html containing two
iframes, one containing a HTML 4.01 document served as text/html with a
deliberate nesting error, and the other iframe containing exactly the
same document but written as XHTML 1.0 and also containing the same
deliberate nesting error, you will see that browsers like Netscape 7,
Mozilla and Opera 7 will still render the HTML 4.01 text/html document
to the reader while there is only a parsing error message presented to
the user for the application/xhtml+xml document.

In my view (and others agreeing with that, see
http://www.hixie.ch/advocacy/xhtml
http://www.hut.fi/u/hsivonen/xhtml-the-point
) there is no point in authoring XHTML if you want to send text/html to
the main browsers, there is with HTML 4.01 a well-defined and powerful
document type (actually there are three variants) for that content type,
you can author your HTML to a specific document type and validate your
documents to it. The most important move people see for document
authoring is to write well-structured documents using the right elements
for their semantics (e.g. a blockquote for a quote and not for any wish
to indent some text) and separate the structure from the presentation,
that can be achieved with HTML 4.01 strict and the use of CSS stylesheets.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

19 posts views Thread by R. Rajesh Jeba Anbiah | last post: by
20 posts views Thread by John Bokma | last post: by
82 posts views Thread by Buford Early | last post: by
24 posts views Thread by Dan Jacobson | last post: by
10 posts views Thread by Daniel R. Tobias | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.