question xhtml transitional or strict !?

B

Beauregard T. Shagnasty

Do you mean you see the W3C XHTML 1.0 spec as the XML source?
No.

It displays OK in all IE browsers I use.

See if you can find a definition for "tag soup." Oh heck, I'll do it for
ya. Here's one:

http://en.wikipedia.org/wiki/Tag_soup#HTML_compared_to_XHTML
Probably it is the <?xml version="1.0"?> first line.
Are there pages with XHTML doctype
and with content type text/html and
without the <?xml version="1.0"?> first line
that display as 'tag soup' in your browser?

I refer you once again to the hixie.ch page. Search the page for the
string 'tag soup'.
I still think that an XHTML doctype is better.

Well then, you go right ahead and continue to think that, despite all
the evidence to the contrary.
For example if you want to serve the same page as
content type text/html for IE or Firefox and
as application/xhtml+xml for mobile phones you
can use (for example) an XHTML Basic doctype
and just change the content type in the header

You cannot be sure that a <meta> content type will work. Especially if
the server is set to send as something else. You can't see it in my test
page, because the content-type is called by PHP:

header("Content-Type: application/xhtml+xml; charset=utf-8");

I believe I am now finished repeating myself...
 
B

Beauregard T. Shagnasty

On Feb 20, 8:48 pm, "Jonathan N. Little" <[email protected]> wrote:
[Restore snipped attribute, (e-mail address removed) wrote:]
Exactly, a page with strict doctype and valid (X)HTML mark-up
linking to a page using <meta http-equiv="window-target"
would be a contradiction, because a strict (X)HTML doctype
does not accept the target attribute for links.

A meta statement is not the "link" in question with target attributes -
you are confusing it with <a> elements here.
 
J

Jukka K. Korpela

Scripsit C A Upsdell:
One thing you may wish to consider is that XHTML is stricter than
HTML, which MIGHT be helpful while you are learning.

Yes and no. It is stricter in the sense of allowing less variation in
syntax, or being "more picky". It is partly looser in the sense that the
syntactic metalanguage (XML) is more primitive and hence the formalized
syntax is partly _less_ restrictive.
For example, if
you validate an XHTML file, it will complain if end tags are missing:
if you validate an HTML file, it will not complain about this.

It depends on the elements. And you could use a modified HTML DTD that
makes all end tags compulsory, if that's what you want.

And if you have nested <a> elements, which is forbidden in all versions
of HTML and XHTML, then a validator will report this error when you are
using HTM but not when you are using XHTML. The XHTML formal syntax is
unable to express the prohibition.
Using XHTML Strict is better than XHTML Transitional for learning,
again because the validator will warn you if you use depecated
features, which you really should not use.

Technically, the validator only looks at DTDs, not any statements about
deprecation. For the most of it, deprecated features do not belong to
Strict versions of either HTML and XHTML, but it's not quite the same
thing to be deprecated and to be outside Strict.
 
J

Jonathan N. Little

Exactly, a page with strict doctype and valid (X)HTML mark-up
linking to a page using <meta http-equiv="window-target"
would be a contradiction, because a strict (X)HTML doctype
does not accept the target attribute for links.
My point is simple: things are not that simple in
the world of the world wide web...

Firstly you are confusing an 'A' element with a 'META' element. Two
entirely different things

http://www.w3.org/TR/html4/struct/links.html#edef-A

Which are located within the BODY element

http://www.w3.org/TR/html4/struct/global.html#edef-META

Which are located within the HEAD element

UA may or may *not* use/parse/follow/obey META elements, for example
using a META element to refresh or redirect a page. From the W3.org

<cite>
Note. Some user agents support the use of META to refresh the current
page after a specified number of seconds, with the option of replacing
it by a different URI. Authors should not use this technique to forward
users to different pages, as this makes the page inaccessible to some
users. Instead, automatic page forwarding should be done using
server-side redirects.
</cite>

Lastly, just because your can improperly serve an XHTML document as
text/html and current UAs will parse that page as tag soup does not make
it proper nor guarantee that is will always "work".

All long as M$ refuse to make their browsers handle XHTML there is no
advantage to using XHTML over HTML. Only caveat is if your require the
"extensible" feature of XHTML in your application. If so, your have a
difficulty deployment if you want IE users access...
 
M

mynameisnobodyodyssea

You cannot be sure that a <meta> content type will work. Especially if
the server is set to send as something else. You can't see it in my test
page, because the content-type is called by PHP:
header("Content-Type: application/xhtml+xml; charset=utf-8");

Why do you mention content-type set by meta?
I cannot see the source of your PHP script, but I can
see the content type of your URL in my browser
(for example from Page Info)
and it is easy to assume that you set content type
in the HTTP header via your PHP script.
In the same way (via the CGI script) content type can be changed
according to HTTP Accept environment variable,
to serve content type text/html to user-agents which
accept text/html and...
application/xhtml+xml to user-agents which accept
application/xhtml+xml and so on.

About the <meta http-equiv="window-target"
in your example, it applies to the same thing as
the target attribute of the <a> tag for a link to
your example URL in another URL,
and if that other URL has a strict doctype,
the strict doctype does not accept the target attribute for
<a> tags. Someone might even call this a tag soup?

About tag soups, I still do not understand what is wrong
with the way the W3C XHTML spec document displays
in your browser.
Can you give the URL of a screenshot?
 
B

Beauregard T. Shagnasty

Why do you mention content-type set by meta?

Because you asked.
I cannot see the source of your PHP script, but I can see the content
type of your URL in my browser (for example from Page Info) and it is
easy to assume that you set content type in the HTTP header via your
PHP script. In the same way (via the CGI script) content type can be
changed according to HTTP Accept environment variable, to serve
content type text/html to user-agents which accept text/html

...which would be just about all browsers, I suspect.
and...
application/xhtml+xml to user-agents which accept
application/xhtml+xml and so on.

Look. It is a *test* page. Designed to show what happens in inferior
browsers that cannot interpret true XHTML, served properly. This means
Internet Explorer versions.

In today's world, I would not serve a web site as application/xhtml+xml,
at least not until Internet Explorer disappears from my server logs -
which is not likely to happen anytime soon.
About the <meta http-equiv="window-target"
in your example, it applies to the same thing as
the target attribute of the <a> tag for a link to
your example URL in another URL,

No, it does not. Meta and anchor elements are not the same. The
validator seems to agree with this, as it does not flag the meta element
and if that other URL has a strict doctype,
the strict doctype does not accept the target attribute for
<a> tags. Someone might even call this a tag soup?

Feel free to do so.
About tag soups, I still do not understand what is wrong
with the way the W3C XHTML spec document displays
in your browser.

Three is nothing wrong with the way W3C displays in my browsers. Where
did I ever say such a thing?
Can you give the URL of a screenshot?

Of what? The W3C page? It looks the same in my browsers as it does in
your browsers.
 
M

mynameisnobodyodyssea

The W3C page? It looks the same in my browsers as it does in
your browsers.

You write that there are no problems in your browsers with the
W3C XHTML spec document at http://www.w3.org/TR/xhtml1/
an example that uses XHTML doctype and content type text/html,
and this is the same thing that I wrote all through this thread.

and... I never mentioned content type set via meta tag.
 
J

Jonathan N. Little

You write that there are no problems in your browsers with the
W3C XHTML spec document at http://www.w3.org/TR/xhtml1/
an example that uses XHTML doctype and content type text/html,
and this is the same thing that I wrote all through this thread.

and... I never mentioned content type set via meta tag.

&deity; This is getting tiring! Look at the summary table:

http://www.w3.org/TR/xhtml-media-types/#summary
XHTML Media Types

Notice the green bits and the red bits. Notice "may", "should" & "should
not". If you serve xhtml properly, in other words "the right way", as
strict it *should* be sent as "application/xhtml+xml". Now if you send a
page as "application/xhtml+xml" all current versions and past of IE
browsers fail.

SO if want a webpage to be valid and properly handled by all browsers
including IE then HTML 4.01 Strict is the way.
 
M

mynameisnobodyodyssea

Look at the summary table:
http://www.w3.org/TR/xhtml-media-types/#summary
XHTML Media Types

The document you are referring to states that XHTML 1.0
HTML compatible can (may)
be served with content-type text/html.

There is a W3C document about XHTML/HTML compatibility
guidelines at http://www.w3.org/TR/xhtml1/guidelines.html

Do you know examples of XHTML 1.0 documents HTML compatible,
with content-type text/html that have problems because they have
an XHTML doctype and not HTML?

When doing a template for a site with many pages,
some pages might contain later
applications needing an XHTML doctype,
it is simpler to use XHTML doctype and mark-up
even if not all pages will need XHTML.
 
J

Jonathan N. Little

The document you are referring to states that XHTML 1.0
HTML compatible can (may)
be served with content-type text/html.

XHTML 1.0 (HTML compatible)is the "Transitional" doctype not the strict.
And notice that it also says it *Should* have a content type of
application/xhtml+xml

New documents *Should* be composes with a strict doctype because they
are not transitioning from anything.
There is a W3C document about XHTML/HTML compatibility
guidelines at http://www.w3.org/TR/xhtml1/guidelines.html

Do you know examples of XHTML 1.0 documents HTML compatible,
with content-type text/html that have problems because they have
an XHTML doctype and not HTML?

It is obvious that you do not understand how a browser parses a document
and what "tag soup" means. You have been given ample explanation and
links to resources to enlighten you. It appears enlightenment is not
your goal.
When doing a template for a site with many pages,
some pages might contain later
applications needing an XHTML doctype,
it is simpler to use XHTML doctype and mark-up
even if not all pages will need XHTML.

Do what you wish. If you cannot recognize the issues involved in using
xhtml then nothing I or anyone else can say will matter.
 
B

Beauregard T. Shagnasty

Jonathan said:
Do what you wish. If you cannot recognize the issues involved in using
xhtml then nothing I or anyone else can say will matter.

Unfortunately, that has become apparent. :-(
 
B

Beauregard T. Shagnasty

Jonathan said:
Do what you wish. If you cannot recognize the issues involved in using
xhtml then nothing I or anyone else can say will matter.

Unfortunately, that has become apparent. :-(
 
M

mynameisnobodyodyssea

XHTML 1.0 (HTML compatible)is the "Transitional" doctype not the strict.

Why do you write this?
And anyway a Transitional doctype might be necessary for some
browsers, especially the ones that might have problems with
an XHTML doctype served as text/html.
 
B

Beauregard T. Shagnasty

And anyway a Transitional doctype might be necessary for some
browsers, especially the ones that might have problems with an XHTML
doctype served as text/html.

Not likely.
 
M

mynameisnobodyodyssea

Not likely.

If you look with 'view source' you can see that most
sites with a great, forward-looking feel,
have an XHTML doctype, not HTML.

When a site does not download well and it does not look that good
it has most of the time an HTML doctype that usually,
I do not know why, comes with the dreaded nested tables layout.

XHTML is a newer spec than HTML, why not use
the power of XML syntax with HTML, even if
some browsers cannot handle XML?
Browsers like IE do not handle application/xhtml+xml content type,
but they work well with XHTML 1.0 served with content-type text/html.
Newer web applications are very likely to need to
use an XHTML doctype.
Why tell people they 'should' use the older HTML doctype,
when actually they 'may' chose the newer XHTML doctype.
The web and web browsers change all the time,
they are forward looking.
 
B

Beauregard T. Shagnasty

If you look with 'view source' you can see that most sites with a
great, forward-looking feel, have an XHTML doctype, not HTML.

That is not so at all. Not even close.
When a site does not download well

Nothing to do with the doctype.
and it does not look that good

Nothing to do with the doctype.
it has most of the time an HTML doctype that usually, I do not know
why, comes with the dreaded nested tables layout.

Not true at all. There is a *lot* of crap out there with XHTML doctype
and nested tables.

My sites are all validated HTML 4.01 Strict and use no dreaded nested
table layouts.
XHTML is a newer spec than HTML, why not use the power of XML syntax
with HTML, even if some browsers cannot handle XML?

So you either want to cheat, or exclude half the browsing public. Well,
that is certainly your choice.
Browsers like IE do not handle application/xhtml+xml content type, but
they work well with XHTML 1.0 served with content-type text/html.

Newer web applications are very likely to need to use an XHTML
doctype.

Why tell people they 'should' use the older HTML doctype, when
actually they 'may' chose the newer XHTML doctype. The web and web
browsers change all the time, they are forward looking.

I have decided you are just trolling, and will now ignore your posts on
this matter.
 

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

Similar Threads


Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top