Why is my home page not valid XHTML?

D

Dennis M. Marks

Why is my home page not valid XHTML? Everything except for the iframe
validates ok. Iframe is valid for XHTML 1.0 Strict.




This page is not Valid XHTML 1.0 Strict!

Below are the results of attempting to parse this document with an SGML
parser.

1. Line 33, column 12: there is no attribute "id" (explain...).
<iframe id="commentframe" src="comments.html">

2. Line 33, column 31: there is no attribute "src" (explain...).
<iframe id="commentframe" src="comments.html">

3. Line 33, column 46: element "iframe" undefined (explain...).
...id="commentframe" src="comments.html">
 
D

DU

Dennis said:
Why is my home page not valid XHTML? Everything except for the iframe
validates ok. Iframe is valid for XHTML 1.0 Strict.




This page is not Valid XHTML 1.0 Strict!

Below are the results of attempting to parse this document with an SGML
parser.

1. Line 33, column 12: there is no attribute "id" (explain...).
<iframe id="commentframe" src="comments.html">

2. Line 33, column 31: there is no attribute "src" (explain...).
<iframe id="commentframe" src="comments.html">

3. Line 33, column 46: element "iframe" undefined (explain...).
...id="commentframe" src="comments.html">

<iframe> is *not* supported in XHTML strict.
http://www.w3.org/TR/2002/REC-xhtml1-20020801/dtds.html#a_dtd_XHTML-1.0-Strict

<iframe> is *only* supported in XHTML transitional.
http://www.w3.org/TR/2002/REC-xhtml1-20020801/dtds.html#dtdentry_xhtml1-transitional.dtd_iframe

DU
 
E

Els

Dennis said:
Why is my home page not valid XHTML? Everything except for the iframe
validates ok. Iframe is valid for XHTML 1.0 Strict.

This page is not Valid XHTML 1.0 Strict!

Below are the results of attempting to parse this document with an SGML
parser.

1. Line 33, column 12: there is no attribute "id" (explain...).
<iframe id="commentframe" src="comments.html">

2. Line 33, column 31: there is no attribute "src" (explain...).
<iframe id="commentframe" src="comments.html">

3. Line 33, column 46: element "iframe" undefined (explain...).
...id="commentframe" src="comments.html">

iframes have names, iirc
name="commentframe"

don't know if in addition to that class would work for the
use of css?
 
M

Mitja

Els said:
iframes have names, iirc
name="commentframe"

don't know if in addition to that class would work for the
use of css?

Sure it would. "Class" property has nothing to do with the id or name of
the tag

Mitja
 
D

Dennis M. Marks

I have read the following message from "Mitja" <[email protected]>
and have decided to lend my vast knowledge.

The writer said:
Sure it would. "Class" property has nothing to do with the id or name of
the tag

Mitja

and my reply is:
The only problem was the iframe is not valid in strict xhtml. I changed
it to transitional. I don't know of a replacement for iframe in strict
xhtml.

BTW: Id replaces Name in xhtml.
 
K

Kris

Dennis M. Marks said:
I don't know of a replacement for iframe in strict
xhtml.

Use CSS to make it look like a frame. The feature of embedding one
document into the other, client side, as was done by frames is lost.
Instead, you can opt to include things through server side scripting.
 
J

Jukka K. Korpela

Toby A Inkster said:
Anything wrong with <object/>?

Is that a trick question?

Virtually everything is wrong with <object>, but most importantly,
implementations range from poor to horrendous. You cannot even safely
embed an image or a plain text file using <object>.

But if http://www.dcs-chico.com/~denmarks/ is the page in question, as
I suspect, I really wonder why XHTML 1.0 Strict compliance vs.
XHTML 1.0 Transitional compliance would matter, when the page says
"This site requires javascript and will not work without it. Sorry."
Why would formal compliance to this or that specification matter after
that?

For including an HTML document into another, several methods exist.
Using <iframe> with a link as the fallback content is safe. But most
servers support some kind of server-side inclusion. There used to be
a FAQ that discusses such issues...
 
D

Dennis M. Marks

I have read the following message from Toby A Inkster
<[email protected]>
and have decided to lend my vast knowledge.

The writer said:
Anything wrong with <object/>?

and my reply is:
Do you know how I could use it. My experiments did not succeed.

BTW. On your web page the left column overlaps the main page by 1/4
inch on Netscape 7.02 on a Mac.
 
D

Dennis M. Marks

I have read the following message from Toby A Inkster
<[email protected]>
and have decided to lend my vast knowledge.

The writer said:
Anything wrong with <object/>?

and my reply is:
I finally got the following to work as a replacement for iFrame:

<object id="commentframe" data="comments.html" type="text/html">Object
is not supported by your browser</object>

I define the size and border as a style. My page is now strict xhtml. I
know it won't work on old browsers or browsers with no javascript but I
do it as a challenge for myself.
 
J

Jukka K. Korpela

Dennis M. Marks said:
I finally got the following to work as a replacement for iFrame:

<object id="commentframe" data="comments.html"
type="text/html">Object is not supported by your browser</object>

Really? Meanwhile here on Earth, IE 6 still doesn't support that.
It won't even render your (clueless*)) alternate content.

*) It's clueless because there's very obvious useful content you could
put there, if you just think about it.
My page is now strict xhtml.

As the next exercise in futility, you could move to XHTML 1.1.
 
J

Jukka K. Korpela

Spartanicus said:
Define "doesn't support".

It neither renders the object specified for embedding
nor presents the content of the object element.
Didn't you test it?
 
S

Spartanicus

Jukka K. Korpela said:
Really? Meanwhile here on Earth, IE 6 still doesn't support that.
It won't even render your (clueless*)) alternate content.

*) It's clueless because there's very obvious useful content you could
put there, if you just think about it.

This statement about "clueless" content also needs re-evaluating. I
would distinguish 3 levels of usage:

1) To embed content that UAs don't handle natively.
2) To embed content that UAs do commonly handle.
3) To embed text/html content.

For instances of (1) usage of the object method may be unwise, due to
the current buggy implementation of <object> in UAs alternative content
is likely not to be presented to the user. It's essential that it does
since the chance of a embedding failure is quite high.

The chance of an embedding failure with type (2) usage is less likely as
the type of object that is to be embedded is natively supported by the
UA. When for example embedding an image there's still the risk of for
example image display being switched off in the UA, requiring the
element's content to be displayed, which again due to the buggy
implementation in UAs may not happen.

However if as the OP did you are embedding text/html (type 3), then
there's *in principle* no point in specifying alternate content. It may
however still be useful to do that, due to UAs buggy implementation of
<object> a situation could occur where the embedding fails despite the
fact that the text/html content type is inherently supported by the UA,
or perhaps a UA does not support <object>, in such a case alt content
would be useful.
 
S

Steve Pugh

Unless there's CSS that sets a height and width for #commentframe. Of
course relying on having CSS styles applied in order to make content
available is a flawed idea so the HTML width and height attributes
should be used instead/as well.
It won't even render your (clueless*)) alternate content.

*) It's clueless because there's very obvious useful content you could
put there, if you just think about it.

This statement about "clueless" content also needs re-evaluating. I
would distinguish 3 levels of usage:
[snip]

However if as the OP did you are embedding text/html (type 3), then
there's *in principle* no point in specifying alternate content. It may
however still be useful to do that, due to UAs buggy implementation of
<object> a situation could occur where the embedding fails despite the
fact that the text/html content type is inherently supported by the UA,
or perhaps a UA does not support <object>, in such a case alt content
would be useful.

I think Jukka's point was that any clueful content would have included
a link to comments.html at the very minimum, regardless of the
situations in which that content might be used. Users have to be able
to get to comments.html one way or another - unless that fundamental
is covered, everything else is rather pointless.

Steve
 

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,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top