- From: Michael[tm] Smith <mike@w3.org>
- Date: Mon, 19 Dec 2016 10:38:28 +0900
- To: "Rainald.Koch@t-online.de" <Rainald.Koch@t-online.de>
- Cc: "www-validator@w3.org" <www-validator@w3.org>
- Message-ID: <20161219013828.rsrllilyszcf2n46@sideshowbarker.net>
"Rainald.Koch@t-online.de" <Rainald.Koch@t-online.de>, 2016-12-17 02:20 +0100: > Archived-At: <http://www.w3.org/mid/1481937602762.98199.d508c1fffdb8f3be30fae8605c38af969654f040@spica.telekom.de> > ... > the following direct input to the validator (with SVG 1.1 selected from > Doctype list): > > <?xml version="1.0" encoding="utf-8"?> > <svg version="1.1" ... > > led to the warning > <quote>The DOCTYPE Declaration for "SVG 1.1" has been inserted at the start > of the document, but even if no errors are shown below the document will > not be Valid until you add the new DOCTYPE Declaration.</quote> So yeah that message is wrong, but unfortunately we don’t have anybody committed to actively fixing problems like that in the legacy validator. Because of that and a lot of other reasons, I recommend you instead use the checker at https://validator.w3.org/nu/ (which is very actively maintained and which is much more up to date with the current SVG specs). If you pass a (namespaced) SVG document to that checker, it will check it as SVG as expected; for example: https://validator.w3.org/nu/?doc=http://w3c-test.org/svg/shapes/rect-01.svg In fact that also allows SVG containing embedded XHTML, MathML, and ARIA markup too. And it does the checking using a RelaxNG schema, which enables it to do some checks that aren’t possible using the legacy W3C DTD-based validator. It will also work as expected if you use the “file upload” option to upload a document. However, it won’t work as expected with the “text input” option. But if you want to check SVG content through direct text input, you can use https://validator.nu/ (built on the same backend as validator.w3.org/nu/) and manually set the Preset option there to SVG 1.1. —Mike > Context: I had just removed the DTD declaration after reading > [1] https://www.w3.org/TR/SVG11/intro.html#NamespaceAndDTDIdentifiers > <https://www.w3.org/TR/SVG11/intro.html#NamespaceAndDTDIdentifiers> > <quote>It is not recommended that a DOCTYPE declaration be included in SVG > documents.</quote> > [2] https://www.w3.org/QA/2002/04/valid-dtd-list.html > <https://www.w3.org/QA/2002/04/valid-dtd-list.html> > <quote>Beyond the specificities of (X)HTML processing, Doctype declarations > in XML languages are only useful to declare named entities and to > facilitate the validation of documents based on DTDs. This means that in > many XML languages, doctype declarations are not necessarily > useful.</quote> -- Michael[tm] Smith https://people.w3.org/mike
Received on Monday, 19 December 2016 01:38:59 UTC