Re: frameset and frame borders

On Thu, 20 May 2004, Aapo Romu wrote:

> I guess I'm not the only one with this problem and I also found some answers
> from web authoring FAQ.

I presume you are referring specifically to
http://www.htmlhelp.com/faq/html/frames.html#frame-noborder
That FAQ is a fine resource, but a bit dusty. At present, IE 6 supports
frameset="0" in <frame> elements (as permitted by the Frameset DTD), so
by using such constructs you solve the problem in the great majority of
browsing situations. To be exact, that attribute does not remove the small
spacing between frames, so if this essential, you may wish to resort to
nonstandard markup.

> My problem is that I want to use frames without any
> borders or border spacing.

Generally, that increases the problems that frames cause. But on the
technical side, you are right in the observation:

> Solution is to use following attributes in
> frameset tag:
>
> <FRAMESET ... BORDER=0 FRAMEBORDER=0 FRAMESPACING=0>
>
> However after this has been done the document does not validate anymore with
> xhtml-frameset.dtd.

"Anymore"? XHTML didn't change anything in this respect. It is not valid
for any DTD issued by the W3C.

> My question is that would it be possible to get some
> kind of transitional version of the DTD that would allow those attributes?

Transitional? Please don't obscure the situation by such ideas.
"Transitional" refers to very specific DTDs and they do not contain any
frame elements.

> Is there any known workaround for this problem?

As a _validation_ problem this is fairly simple. Your document currently
isn't valid. If you wish to use the attributes you mention, you simply
need to write a suitable DTD. In practice, you could take the HTML 4.01
Transitional DTD or the XHTML 1.0 Transitional DTD (have you really
got a _reason_ to use XHTML?) and modify it a bit. Note that the Frameset
DTDs effectively just set a parameter and "call" a Transitional DTD.
What you could do is this:
- create a copy of the Transitional DTD
- modify <!ENTITY % HTML.Version "-//W3C//DTD HTML 4.01 Transitional//EN"
  as desired (e.g. replace W3C by your name and change Transitional to
  Frames without borders :-))
- replace <!ENTITY % HTML.Frameset "IGNORE"> by
          <!ENTITY % HTML.Frameset "INCLUDE">
- the real change: inside the declaration that starts with
    <!ATTLIST FRAMESET
  add the lines
    border NUMBER #IMPLIED
    frameborder NUMBER #IMPLIED
    framespacing  NUMBER #IMPLIED

Then you would just use
<!DOCTYPE HTML SYSTEM "http://www.cs.tut.fi/~jkorpela/html/frames.dtd">
naturally replacing the URL by one of your own.

Oh, and you need a markup validator, such as
http://www.htmlhelp.com/tools/validator/

It seems that the W3C product isn't really a validator any more - when I
ask it to validate my (valid) SGML document using the DOCTYPE above,
it reports
This page is not Valid HTML 4.01 Transitional!
and then lists "the results of attempting to parse this document with an
SGML parser", something that isn't true at all - it has processed it as if
I had actually used the W3C HTML 4.01 Transitional DTD.

It seems that http://validator.w3.org cannot process any "custom DTDs"
(i.e., DTDs other than the fixed set of specific DTDs it has been
programmed to know) any more.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Thursday, 20 May 2004 16:11:28 UTC