Change to html 4.01?

A

Andrew

Hi,

I have a 150 page site that I would like to convert from XHTML 1.0 Strict
to HTML 4.01 Strict:

http://www.strong-family.org

It has fairly clean html but I need to change doctype, get rid of closed
tags in header (link) and adjust img, br etc. Easy enough to do but for
150 pages I was wondering if there was a tool that could do this for me?

My other alternative is search and replace I guess.

Thanks for your trouble,

Andrew
 
D

dorayme

Andrew said:
Hi,

I have a 150 page site that I would like to convert from XHTML 1.0 Strict
to HTML 4.01 Strict:

http://www.strong-family.org

It has fairly clean html but I need to change doctype, get rid of closed
tags in header (link) and adjust img, br etc. Easy enough to do but for
150 pages I was wondering if there was a tool that could do this for me?

My other alternative is search and replace I guess.

Thanks for your trouble,

Andrew

Depends a bit on your platform perhaps, but "Tidy" has conversion
facilities...
 
J

Jukka K. Korpela

Scripsit Andrew:
I have a 150 page site that I would like to convert from XHTML 1.0
Strict to HTML 4.01 Strict:

Why? That's almost as pointless as the opposite conversion. XHTML 1.0 works
well enough when you masquerade it as good old HTML by sending it as
text/html and comply with the (in)famous Appendix C.

Just let it be as it is. Use HTML 4.01 for new pages and for rewritten
pages, but don't waste your time fixing something that isn't really broken.
Any fixes, especially automatic conversions, are error-prone.
 
A

Andy Dingley

Scripsit Andrew:


Why? That's almost as pointless as the opposite conversion.

Maybe he's been listening to the regular advice posted in this ng?

Yes, it's "pointless", as is any conversion on the "If it ain't broke,
don't fix it" basis. OTOH, there are more things about web development
than merely coding one-off pages. Perhaps the OP is writing a
tutorial, or putting forward best practices to a large team, or
posting a portfolio site for a design house (we've criticised enough
of those for being in "pointless XHTML"), or just wants to have a
consistent doctype across all their pages.

Maybe he's just worried about browsers rendering the extra "/" as
character data? As you're so fond of reminding us, XHTML Appendix C
does rely on an error that not all browsers demonstrate.

It's not necessary to do this. Nor is it wrong to do it. It's not our
place to say whether or not the OP should, especially not when we
don't know the whole story.



As to tools, then Tidy is good if the markup is perhaps less than
valid. If it is well-formed XML and mostly valid XHTML, then XSLT can
do it too -- perhaps more safely than Tidy. Just use a simple identity-
copy stylesheet with a HTML output method.


(I wouldn't make any real effort to do this XHTML -> HTML though. The
inherent advantage is indeed tiny, unless you have some other reason
to do it.)
 
J

Jukka K. Korpela

Scripsit Andy Dingley:
Maybe he's been listening to the regular advice posted in this ng?

That's what I suspect too, and that's why I wrote that the conversion is
pointless.
Perhaps the OP is writing a tutorial,
or putting forward best practices to a large team,

This was about converting existing pages.
It's not our
place to say whether or not the OP should, especially not when we
don't know the whole story.

You can be (or could have been) silent about the matter, but this doesn't
mean others shouldn't comment on the idea. It's much more useful to tell
that something shouldn't be done (if that statement is correct) than to
describe how to do that; the latter could actually do some harm, if it helps
someone to do something he shouldn't be doing.
 
A

Andy Dingley

the latter could actually do some harm, if it helps
someone to do something he shouldn't be doing.

There is no significant reason at all why the OP _shouldn't_ do this,
merely reasons why it's not important to. That's a difference.

As the zeitgeist of this ng is clearly "HTML good, XHTML bad", then
it's puzzling (to say the least) to see one of the respected regulars
post an apparently "pro-XHTML" post that's semingly at variance with
history. That was my real reason for posting, not the OP's original
question.
 
C

Chaddy2222

There is no significant reason at all why the OP _shouldn't_ do this,
merely reasons why it's not important to. That's a difference.

As the zeitgeist of this ng is clearly "HTML good, XHTML bad", then
it's puzzling (to say the least) to see one of the respected regulars
post an apparently "pro-XHTML" post that's semingly at variance with
history. That was my real reason for posting, not the OP's original
question.

Yes, I must admit it was odd to say the least to read of Jukka, not
supporting the change back to HTML 3\4.01. But I do agree that it
would be a bit pointless, if the XHTML was transitional maybe, but
it's not in this case.
 
D

dorayme

"Andy Dingley said:
There is no significant reason at all why the OP _shouldn't_ do this,
merely reasons why it's not important to. That's a difference.

As the zeitgeist of this ng is clearly "HTML good, XHTML bad", then
it's puzzling (to say the least) to see one of the respected regulars
post an apparently "pro-XHTML" post that's semingly at variance with
history. That was my real reason for posting, not the OP's original
question.

Ah, but it was not a pro XHTML post, any more than advice to a
person who already has a fair sized old working site using a
simple 2 col table to keep a nav on the left and the rest on the
right is pro 'table as display'.

Still, you are right in that someone might have a legitimate
reason to change it to html from xhtml. You gave one or two,
there are others too. JK is basically saying there is no point in
going to the trouble for no good reason.
 
J

Joe (GKF)

There is no significant reason at all why the OP _shouldn't_ do this,
merely reasons why it's not important to. That's a difference.

As the zeitgeist of this ng is clearly "HTML good, XHTML bad", then
it's puzzling (to say the least) to see one of the respected regulars
post an apparently "pro-XHTML" post that's semingly at variance with
history. That was my real reason for posting, not the OP's original
question.
I read JKK's post as saying "if it ain't broke, don't fix it".
 
A

Andrew

I read JKK's post as saying "if it ain't broke, don't fix it".

Hi,

Thanks for this (and many other!) comments. Indeed the site is not
broken and it has been for the most part written with scrupulously
careful XHTML 1.0 Strict.

The site has actually been the one where I learnt to use CSS effectively
and write semantically correct (X)HTML. But I will admit that my doubts
about XHTML have been worn away in part by this NG (I mean this in a
constructive way!) and especially by the recent rumbles from the W3C
about a return to HTML.

I shall ponder a little more. I have just spent untold hours on this site
recently (actually my father's research and material) and will not be
touching it again until he has new material for me to incorporate. Then I
will rethink :)

Thanks for all the trouble!

Andrew
 
A

Andrew

>But I will admit that my doubts
about XHTML have been worn away in part by this NG (I mean this in a
constructive way!) and especially by the recent rumbles from the W3C
about a return to HTML.

Of course I meant "my faith in XHTML has been worn away..."
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top