|
Posted by Jukka K. Korpela on 12/18/05 09:49
Mark Simon <mark@comparity.not.example.net> wrote:
> I like to use the <base> tag in, say, the contents frame of a frameset.
Just don't use frames. Problem solved. Now, assuming you still wish to create
problems by using frames,...
> The idea is that the target attribute will direct all of the links into
> another frame.
Then you would need to use a Transitional DTD, since Strict DTDs disallow the
target attribute.
> The base tag technically has a required href attribute,
Only in Strict DTDs, which are out of the question anyway when you use the
target attribute.
I hadn't noticed that Strict DTDs make the href attribute required, but
that's actually quite logical: since the target attribute is disallowed, the
only possible purpose for the <base> tag would be to set the base address for
URLs. Thus, if you are using a Strict DTD and you use a <base> element
without a href attribute, you have made some error in your thinking or
coding, so it's useful to regard this as a syntax error.
> However, without it, the page won't validate properly.
Posting the URL would, as so often, made it possible to others to help you
better. Yet, it seems pretty obvious that the analysis above is correct.
> Is there a valid href value I can use which will allow other relative
> links on the page to work?
No. The <base href="..."> construct by definition sets the base address for
_all_ relative URLs (not just links).
P.S. There's no point in using XHTML instead of HTML 4.01 on the web; it just
causes confusion.
> The only "correct" solutions I can think of are either to simply put
> targets into all of my links, or to use absolute addresses ... ?
The correct solution is to stop using frames.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
[Back to original message]
|