- From: Graham Hannington <graham_hannington@fundi.com.au>
- Date: Tue, 3 Jan 2017 11:23:24 +0800
- To: "Michael[tm] Smith" <mike@w3.org>
- Cc: "www-validator@w3.org" <www-validator@w3.org>
- Message-ID: <OF543234FB.C41CD39B-ON4825809D.000D4BA6-4825809D.00129F50@LocalDomain>
Mike, Thanks for humoring me, and not for the first time. Turns out I knew the answer as recently as last April, but had forgotten. From an email I sent to someone at the time: > I'm considering doing two things: > 1. Adding a "Polyglot" (check box) setting to the v.Nu linter (linter-vnu) > Atom package, which would do the following: > a. Use v.Nu to check the current document as XHTML5 > b. If the current document is valid XHTML5, check it again, > this time as HTML5; the idea being to identify empty tags such as <p/> > that are valid in XHTML5, but not in HTML5, and so are not allowed in > polyglot markup. > ... > 2. Creating a "Polyglot XHTML Checker" web page ... > to do more-or-less the same as described above. > This web page would be a "front end" for the Nu Html Checker > And perhaps then - via in-browser JavaScript - > other, more specific, polyglot requirements. This happens to me when I revisit a topic after working on other things for a while. I forget. :-( Moving on... I prefer developing web pages as XML. Even when I know they will be served as text/html, not application/xhtml+xml. And even though serving the same document using a different media type can result in different behavior that can cause problems, such as a browser barfing if you try to use JavaScript to inject invalid XML characters into a page that has been served as XHTML. I can offer reasons for my preference, if asked, but in the interest of brevity, I'll get to the point. I want to use v.Nu to check polyglot XHTML. More specifically: - I want to use the v.Nu REST API. - I want to send the document to v.Nu only once. Not once to check XHTML conformance, and then again to check HTML conformance. - If the document contains markup that is an error in both HTML and XHTML, then I would prefer v,Nu to return only a single error for that markup, rather than one error from XHTML checking and another error from HTML checking. (I have observed v.Nu messages from XHTML and HTML checking can be different for the same markup.) Your thoughts? For example, do you have any advice on how I can do that without building my own version of v.Nu? You're going to suggest I fork v.Nu and provide code, right? :-) -- Graham Hannington Fundi Software Pty Ltd 2016 ABN 89 009 120 290 This message has been scanned for malware by Websense. www.websense.com
Received on Tuesday, 3 January 2017 03:24:01 UTC