- From: Simon Pieters <simonp@opera.com>
- Date: Wed, 22 Jun 2016 11:32:43 +0200
- To: public-html@w3.org, "Dr. Olaf Hoffmann" <Dr.O.Hoffmann@gmx.de>
On Tue, 21 Jun 2016 17:33:15 +0200, Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de> wrote: > Simon Pieters: > .... >> >> An element does not need to be defined by a specification in order to >> exist in a document. Just take this document: > > Sure, but it will not exist in a valid document of some specific format. Indeed. > Obviously, there is no way to avoid, that people create arbitrary > content in > documents, those just have no defined meaning. > > .... >> >> You can get into the exact same situation if you pretend that only the >> XHTML 1.0 spec is relevant. This has nothing to do with spec versioning >> or >> schemas. > > Not really, this will result in an invalid document, if one adds > arbitrary > nonsense. How is it different? It's invalid HTML if you add arbitrary nonsense to it, too. > I have not much interest in invalid documents not related somehow to a > defined > meaning. > Ok, it might be relevant for tag soup parsers to care about any > nonsense, but > it is not relevant for authors of meaningful documents. Then why are you interested in the default styles that UAs have to support invalid documents? > .... >>> This seems to imply that those CSS rules/suggestions apply only to the >>> XML >>> variant of HTML5 anyway. > >> No, it doesn't. > > Hmm, isn't this the purpose of this namespace indication in an CSS file, > to > indicate that the rules apply only to elements within some specific > namespace? Yes. Including invalid elements in that namespace. > If there is a namespace-aware HTML5 tag soup document, why should it > apply? It's how selectors work. Selectors don't care about whether an element is defined in a spec or not. If you have an element "foo" in the XHTML namespace and this stylesheet @namespace url(http://www.w3.org/1999/xhtml); foo { ... } then it matches that element. > Another example - if an XML-document indicates, that those elements > belong to > the bar-namespace, why should the rule apply? It shouldn't. The selector only matches elements in the XHTML namespace. > On the other hand, if we have a proper XHTML-document, it will not > contain the > mentioned elements. If you have an improper XHTML document with such an element, the selector matches. > Again, the rule never applies. It doesn't match anything in valid documents since they are not allowed to contain such elements. But HTML also covers how UAs are to handle invalid documents, whether you care about such documents or not. -- Simon Pieters Opera Software
Received on Wednesday, 22 June 2016 09:33:23 UTC