- From: Terje Bless <link@tss.no>
- Date: Tue, 10 Oct 2000 00:46:46 +0200
- To: W3C Validator <www-validator@w3.org>
On 09.10.00 at 14:59, Hugo Haas <hugo@w3.org> wrote: >According to the HTML 4.01 specification[1]: > > When present, the BASE element must appear in the HEAD section of an > HTML document, before any element that refers to an external source. > >So I think that the following document is invalid: [...] > <HEAD> > <LINK type="text/css" rel="stylesheet" href="style.css"> > <BASE href="http://example.org/bar/"> > </HEAD> [...] I expect SP is using the fallback rules for resolving the relative URI (well, it would have if it tried to resolve it ;D) in the 'link' element instead of warning about the later 'base' element. >The HTML validator seems to be pretty happy about it though. We rely entirely on James Clark's SP for these things. It's either a bug or a limitation there unless there is something in how we call it and I find that highly ulikely. IOW, it's hard to do anything about it. IFF indeed it's not intended behaviour. In particular, neither the Validator nor SP knows anything about stuff that is specified in the prose. Only generic SGML rules, and information gleaned from the SGML Declaration and DTD are considered. > <!-- %head.misc; defined [as] "SCRIPT|STYLE|META|LINK|OBJECT" --> > <!ENTITY % head.content "TITLE & BASE?"> > <!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head --> > >My understanding is that %head.content; must appear before %head.misc; >(well, it's not very clear by reading [3]), which means that it is a >validator problem. That's not how I read it. To require a specific order it would have to be specified as '<!ELEMENT HEAD O O %head.content;,+(%head.misc;)*>'. The DTD only specifies the common content model for the head and splits it into two groups because some are optional (%head.misc;) and some not (%head.content;). An independant implementation[0] agrees with me, but I'm no SGML expert so I may well be *way* off base here. [0] - BBEdit[1] from Bare Bones Software[2]. [1] - <URL:http://www.barebones.com/products/bbedit.html> [2] - <URL:http://www.barebones.com/> -- As a cat owner, I know this for a fact... Nothing says "I love you" like a decapitated gopher on your front porch.
Received on Monday, 9 October 2000 18:53:20 UTC