On Migrating From HTML 4.0 to XHTML 1.0

F

Fred Mertz

So I have a non trivial ASP.NET 1.1 Web Application with custom controls
emitting HTML markup and good deal of static HTML in the aspx pages.

I'm wanting to make this thing fully XHTML 1.0 compliant.

My primary question is this: Can I reasonably migrate from HTML 4.0 to XHTML
1.0 *incrementally*??? Or would everything totally break.

To clarify, I want to put different pieces into production at different
times (for a bunch of logistical reasons). If I do this, then I'd have
rendered pages sent to the browser with a mix of HTML 4.x and XHTML
1.0-compliant markup.

My secondary question is this: What do I use for the DTD when I have this
mix going on?

Alternatively, is it such an incredibly terrible thing to migrate from HTML
4.0 to XHTML 1.0 incrementally - and I'd really really really be better off
migrating all in one shot?

Thanks for your time and consideration!
 
E

Erik Funkenbusch

My primary question is this: Can I reasonably migrate from HTML 4.0 to XHTML
1.0 *incrementally*??? Or would everything totally break.

Each web page is an entity of itself, for the most part. That means you
can change one page at a time without much trouble in most cases.

How much work that is, depends on how much of your HTML needs to change.
For example, if you use a ton of font tags, then you're going to have some
work ahead of you.

If you already use CSS for most of your styling and aren't using any
deprectated features, and are already using all lower case tags, then it
might be a matter of making sure all your tags are closed (including unary
tags like <br/>) and a little touch up.

Of course there are lots of mitigating factors as well, and you have to be
using ASP.NET 2.0 to get XHTML compliant output.
To clarify, I want to put different pieces into production at different
times (for a bunch of logistical reasons). If I do this, then I'd have
rendered pages sent to the browser with a mix of HTML 4.x and XHTML
1.0-compliant markup.

If by "mix" you mean in the same page, then that could be bad (maybe), but
if you mean one page might be XHTML and another HTML, then that's fine.
My secondary question is this: What do I use for the DTD when I have this
mix going on?

You mean DOCTYPE? If so, then you use an XHTML doctype for XHTML pages,
and HTML doctype for HTML pages.
 
F

Fred Mertz

I read the article at your link, and... Good grief = this is insane. They
come out with a new standard and there are apparently a bunch of problems
with using it. Yes - it all makes sense; but what are we supposed to do?
Apparently the "logical" answer is to WAIT until the browsers come up to
speed. Yes?

What do you recommend? WHEN would it make sense, if ever, to migrate to
anything other than HTML 4.01?

-FM
 
F

Fred Mertz

My "incremental" upgrade path would result in the mix of XHTML with HTML on
the same page...

-FM
 
E

Erik Funkenbusch

My "incremental" upgrade path would result in the mix of XHTML with HTML on
the same page...

Then you need to be more careful. xhtml is essentially a subset of HTML.
That means you can create xhtml pages that conform to HTML. So, as long as
the pages contain some HTML you continue to use an HTML doctype.
 
E

Erik Funkenbusch

What do you recommend? WHEN would it make sense, if ever, to migrate to
anything other than HTML 4.01?

As i said in another message, XHTML is basically a subset of HTML. Nothing
is stopping you from writing code that conforms to the XHTML subset with an
HTML doctype.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top