[Pro] HTML 4.01 vs XHTML 1.0

If I switch from HTML 4.01 Transitional to XHTML 1.0 Transitional encoding in an existing Freeway Pro document am I likely to break anything?

If so, how difficult will it be to locate and find the syntax problems?

And finally, is it better to use Transitional or Strict encoding?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Anything that you hand-coded in one of the Markup Item or Page Markup areas would need to be policed for syntax differences. But anything that Freeway wrote would automatically be correct at either DOCTYPE. Freeway doesn’t work in HTML at all, it just outputs it at the end. That’s why you can change canoes in the middle of the stream like this with impunity. The layout (as an abstract thing) is converted (maybe sampled is a better word) into the chosen DOCTYPE at the moment of publishing, and the result is output – but never stored in the Freeway document. So you can change this around willy-nilly and your code will always be valid.

If you did write anything long-hand, the major differences between HTML 4.01 Transitional and XHTML Strict are as follows:

  • DOCTYPE and Meta tags describe the content type, naturally
  • All singleton tags <br>, <hr>, <link> have to be self-closed like this: <br/>, <hr/>, <link/>
  • Links cannot have a target attribute
  • Anchors go to the id attribute, not the name attribute, so you won’t ever see <a name="foo"></a> anywhere in your code to define a jump point; you’ll just see <div id="foo"… and that will be a valid anchor target.
  • All tags and their attributes are lower-case

There’s probably some more I’m forgetting, but that’s about it.

As far as better goes, there’s really no difference except personal preference. Neither one is “better” as long as it is written in a valid manner. Put another way, XHTML did not supersede HTML, it’s just a different branch of the same tree.

Proponents of XHTML point out that you can validate it as XML, which means that it has more inherent quality checks possible. In practical terms, though, browsers are written to be extraordinarily tolerant of badly-coded markup. (Nothing else really explains the success of Microsoft FrontPage.)

There is a school of (extremely pedantic) thought that says that you should not use XHTML unless you are serving the page under a “application/xhtml+xml” mime-type (something that’s set at the Apache server level). Otherwise (the argument goes) the browser just interprets XHTML as HTML anyway, so why bother? The reason nobody does this is that any version of IE < 10 (I think – maybe it’s 11) only shows a blank white page when you do.

Walter

On Sep 25, 2012, at 2:13 AM, RavenManiac wrote:

If I switch from HTML 4.01 Transitional to XHTML 1.0 Transitional encoding in an existing Freeway Pro document am I likely to break anything?

If so, how difficult will it be to locate and find the syntax problems?

And finally, is it better to use Transitional or Strict encoding?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
List Options | FreewayTalk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

So, it sounds like the only thins I may to check is the syntax used in code I’ve inserted into FWP using Crowbar. I know a couple of
will be affected.

Thanks Walter.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The quickest thing to do would be to run your page through the W3C validator and see what pops out. http://validator.w3.org

Walter

On Sep 25, 2012, at 9:46 AM, RavenManiac wrote:

So, it sounds like the only thins I may to check is the syntax used in code I’ve inserted into FWP using Crowbar. I know a couple of
will be affected.

Thanks Walter.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

There is also Transitional vs. Strict for either flavors of html
discussion. The Strict DTD gave me the opportunity to learn ‘cleaner’ code.
I don’t know what passes for ‘strict’ under the new html5 guidelines – but
as Walter has already indicated, browsers seem to be highly forgiving.

I think XHTML was also at one point recommended for mobile or otherwise
scaled-down browsers, though maybe that was never really exploited to its
fullest.


Ernie Simpson

On Tue, Sep 25, 2012 at 9:55 AM, Walter Lee Davis email@hiddenwrote:

The quickest thing to do would be to run your page through the W3C
validator and see what pops out. http://validator.w3.org

Walter

On Sep 25, 2012, at 9:46 AM, RavenManiac wrote:

So, it sounds like the only thins I may to check is the syntax used in
code I’ve inserted into FWP using Crowbar. I know a couple of
will be
affected.

Thanks Walter.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hey Ernie, so you think I should use Strict instead of Transitional?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I think it is something you should consider - why are you using
Transitional?

I used it years ago, when XHTML was much newer and I was less sure about
what I was doing. It’s more forgiving, and I felt I needed room to make
mistakes. However, as Walter points out, Freeway Pro is really good at
generating rock-solid code that validates to the chosen dtd. That helped me
to commit to work with strict-only code… something far easier than I had
imagined. Working strict I think allows for better focus on semantics and
less-wasteful code – neither of which I am master, but definitely aspire
to. :slight_smile:


Ernie Simpson

On Tue, Sep 25, 2012 at 10:47 AM, RavenManiac email@hiddenwrote:

Hey Ernie, so you think I should use Strict instead of Transitional?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I just tried switching an existing FWP document from HTML 4.01 Transitional to XHTML 1.0 Strict in Document Setup and it didn’t work. The uploaded file is still a 4.01 document.

What am I doing wrong?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I also checked “External Stylesheets” before the upload and that didn’t work either.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Check the local site files as well. Try a “Force Republish” too.

Sent from my iPad

On Sep 26, 2012, at 1:42 AM, “RavenManiac” email@hidden wrote:

I also checked “External Stylesheets” before the upload and that didn’t work either.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Changes made at the Document Setup level of this nature only affect the pages you make after you change the setting. Each page has its own DOCTYPE setting, in the Output pane of the Inspector. Change it in the Document Setup, sure, but also change each page (or if you’re lucky, and they haven’t detached themselves) at the Master Page level. Once you change that, and publish again, you will have the new site, same as the old site but shinier (not really, nobody will notice anything except codaphiles who view source).

Walter

On Sep 26, 2012, at 1:39 AM, RavenManiac wrote:

I just tried switching an existing FWP document from HTML 4.01 Transitional to XHTML 1.0 Strict in Document Setup and it didn’t work. The uploaded file is still a 4.01 document.

What am I doing wrong?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Changing the master pages worked perfectly. Thanks Walter.

BTW, Is [Show Page Source] in Safari 6.0’s developer tools problematic?

I find myself frequently having to restart that feature because it tends to lock web pages up. Plus, you can’t select a specific button, like the [Issue] icon and have it stay selected when changing web pages.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

When you notice it locking up, click on the little flag icon (kind of looks like this: [___> ) and click the “Play” icon at the bottom of that screen. What is happening is some JavaScript has paused at a breakpoint due to an error. This stops the entire browser window from doing anything – even reloading. These new developer tools are powerful, but not for the meek! There was an option in the Developer menu to revert to the old inspector in 6.0, but they took it out in 6.0.1. Progress!

Walter

On Sep 26, 2012, at 10:20 AM, RavenManiac wrote:

Changing the master pages worked perfectly. Thanks Walter.

BTW, Is [Show Page Source] in Safari 6.0’s developer tools problematic?

I find myself frequently having to restart that feature because it tends to lock web pages up. Plus, you can’t select a specific button, like the [Issue] icon and have it stay selected when changing web pages.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options