Re: Warning about self-closing syntax in embedded SVG within HTML file

Michael – thank you. I will check it out.

MathML – I hadn’t thought of that.

The specific docs I was validating are a specification and a best practice guide for a standard called ONIX that is used in the publishing and bookselling industry, and in an effort to make each doc self-contained, the CSS, font data, JS and SVG diagrams are all embedded directly within the HTML file rather than linked via src attributes (or similar). They are both huge docs – at least, huge compared to typical web pages (4MB). One day, I’ll turn them into EPUB files…

Regards
Graham


On 27 Sep 2022, at 12:21, Michael[tm] Smith <mike@w3.org<mailto:mike@w3.org>> wrote:

Hi Graham,

"Michael[tm] Smith" <mike@w3.org<mailto:mike@w3.org>>, 2022-09-27 17:38 +0900:
Archived-At: <https://www.w3.org/mid/YzK2gHeFk1iFFnL3@w3.org>

Graham Bell <graham@editeur.org<mailto:graham@editeur.org>>, 2022-09-27 08:19 +0000:
Archived-At: <https://www.w3.org/mid/8C5492A0-AAF5-40D8-8A48-A6ACD61982FA@editeur.org>

The validators (old and nu) now provide a warning against the use of the self-closing syntax. This is fine for void elements like <br> or <meta>.

But should it also warn against self-closing syntax within SVG that is directly embedded within the HTML (not a separate SVG file linked using <img>)?

This snippet generates warnings. Is this expected behaviour? It is not the same as recommending the removal of a / from an HTML void element.
...
<path d="M 5 35 l 60 -25 10 5 5 10" />
<path d="M 75 55 l 60 -25 10 5 5 10" />

This should be fixed now — the checker should not longer be warning about
SVG or MathML elements that use self-closing-tag syntax.

Thanks again for catching this and reporting. If you find that the checker
is still doing anything unexpected, please let me know.

 –Mike

--
Michael[tm] Smith https://people.w3.org/mike

Received on Tuesday, 27 September 2022 11:57:29 UTC