- From: Simon Pieters <simonp@opera.com>
- Date: Wed, 17 Jun 2009 18:35:14 +0200
- To: "Grosso, Paul" <pgrosso@ptc.com>, public-xml-core-wg@w3.org
On Mon, 15 Jun 2009 16:12:02 +0200, Grosso, Paul <pgrosso@ptc.com> wrote: > 11. Associating Stylesheets. > There was some discussion about what to do with the values of media="" and href="". HTML4 says about media="": http://www.w3.org/TR/html401/present/styles.html#adef-media which says that the default value is "screen", which is not correct; the default value should be "all". http://www.w3.org/TR/html401/types.html#type-media-descriptors also gives parsing rules for the media value, which are different than the parsing rules given in the Media Queries spec. http://www.w3.org/TR/css3-mediaqueries/ HTML4 says about href="": http://www.w3.org/TR/html401/struct/links.html#adef-href i.e. that it's value is a URI (but it probably meant URI *reference*). HTML4 also has an appendix about what to do with non-ASCII: http://www.w3.org/TR/html401/appendix/notes.html#non-ascii-chars This advice is different from what is specified in DanC's draft (see below). HTML5 basically says that href="" must be a valid IRI reference. "The destination of the link(s) is given by the href attribute, which must be present and must contain a valid URL." where "valid URL" points to http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#valid-url which references the Web Addresses spec: http://www.w3.org/html/wg/href/draft#valid-url ...which, for the purpose of xml-stylesheet, is the same as a valid IRI reference (since the URL encoding weirdness is only relevant for HTML and not for XMLHttpRequest or CSS or xml-stylesheet). We could say in xml-stylesheet that the value must be a valid IRI reference. As for interpreting the value, we should say to resolve the IRI reference against the document's address. If we do so by referencing http://www.w3.org/html/wg/href/draft#resolve-a-url we get HTML-compatible handling of invalid values for free. (Opera already uses the same rules for HTML href="" and xml-stylesheet href="".) -- Simon Pieters Opera Software
Received on Wednesday, 17 June 2009 16:35:56 UTC