By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,264 Members | 1,803 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,264 IT Pros & Developers. It's quick & easy.

The XHTML Factor

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a


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.