[whatwg] Validator.nu Bug: Error: XHTML element noscript not allowed as child of XHTML element head in this context.
I am using noscript as permitted, In a head element of an HTML document, if there are no ancestor noscript elements. but still getting an error from Validator.nu saying it's not allowed. Settings: Encoding: as set by server/page Schemas: http://s.validator.nu/xhtml5-aria-rdf-svg-mathml.rnc http://s.validator.nu/html5/assertions.sch http://c.validator.nu/all/ Preset: XHTML5+ARIA, SVG 1.1 plus MathML 2.0 Parser: XML; don't load external entities XMLNS Filter: [blank] [ ] Be lax about HTTP Content-Type [ ] Show Image Report [x] Show Source Original input: ?xml version=1.0 encoding=utf-8? !DOCTYPE html html xmlns=http://www.w3.org/1999/xhtml; head title/title script type=text/javascript src=http://use.typekit.com/uys3rrk.js;/script script type=text/javascripttry{Typekit.load();}catch(e){}/script noscript link href=/styles/typekit-fallback.css rel=stylesheet media=all / /noscript /head body p/p /body /html Result: Error: XHTML element noscript not allowed as child of XHTML element head in this context. (Suppressing further errors from this subtree.) From line 6, column 1; to line 6, column 10 /title↩noscript↩link Contexts in which element noscript may be used: In a head element of an HTML document, if there are no ancestor noscript elements. Where phrasing content is expected in HTML documents, if there are no ancestor noscript elements. Content model for element head: If the document is an iframe srcdoc document or if title information is available from a higher-level protocol: Zero or more elements of metadata content. Otherwise: One or more elements of metadata content, of which exactly one is a title element.
Re: [whatwg] Validator.nu Bug: Error: XHTML element noscript not allowed as child of XHTML element head in this context.
On Fri, 27 Aug 2010 11:10:44 +0200, Hugh Guiney hugh.gui...@gmail.com wrote: I am using noscript as permitted, In a head element of an HTML document, if there are no ancestor noscript elements. but still getting an error from Validator.nu saying it's not allowed. noscript is HTML-only. I.e. not allowed in XHTML. -- Anne van Kesteren http://annevankesteren.nl/
Re: [whatwg] Validator.nu Bug: Error: XHTML element noscript not allowed as child of XHTML element head in this context.
On 27.08.2010 12:32, Hugh Guiney wrote: Ah, thanks. I guess the error is just confusing then in that it calls it XHTML element noscript, which led me to think that it was indeed part of XHTML. I think some indication otherwise might prove beneficial to users. But, I thought XHTML5 was just an XML serialization of HTML5, so why is this the case? I just read the rationale behind it, but despite not being best practice shouldn't it be at the very least allowed? ... The HTML WG is currently discussing whether it should be deprecated (in HTML), see http://www.w3.org/Bugs/Public/show_bug.cgi?id=10068. If the outcome of this is that there are good use cases for noscript, I'd expect that it will also be allowed in XHTML. Best regards, Julian
Re: [whatwg] Validator.nu Bug: Error: XHTML element noscript not allowed as child of XHTML element head in this context.
On Fri, Aug 27, 2010 at 6:32 AM, Hugh Guiney hugh.gui...@gmail.com wrote: But, I thought XHTML5 was just an XML serialization of HTML5, so why is this the case? I just read the rationale behind it, but despite not being best practice shouldn't it be at the very least allowed? This is guesswork on my part, but maybe it's correct. noscript in text/html has magical parsing effects, which cannot be replicated in XML. Specifically, if scripting is enabled, its contents will be parsed as plaintext, which is then hidden. In XML, you'd have to specify for every single element that its effects are ignored if it's a descendant of noscript and scripting is enabled. For instance, the text/html markup noscriptmeta http-equiv=foo content=barmeta http-equiv=baz content=quuz/noscript will result in a DOM with a noscript element and a single text node child. The equivalent markup in XML must instead result in two elements as children, which the rest of the UA then has to specially ignore at some higher level than the parser. So I'm guessing that browsers didn't implement noscript in XML since it would have been a pain and lots of people don't like it anyway; and nobody wants to change it now because it would still be a pain and few sites use XML. But that's just a guess, someone else can give a more informed answer. On Fri, Aug 27, 2010 at 9:59 AM, Julian Reschke julian.resc...@gmx.de wrote: The HTML WG is currently discussing whether it should be deprecated (in HTML), see http://www.w3.org/Bugs/Public/show_bug.cgi?id=10068. If the outcome of this is that there are good use cases for noscript, I'd expect that it will also be allowed in XHTML. I'm quite sure that noscript was not banned from XHTML just because it lacked use-cases, and the editor currently thinks it has use-cases regardless, so I don't expect it to be allowed in XHTML regardless. Note that it's not just invalid in XHTML -- it actually has no effect, as an *implementation* requirement.