markup-validator icon indicating copy to clipboard operation
markup-validator copied to clipboard

inconsistent validation of svg

Open btrem opened this issue 1 year ago • 0 comments

Using the direct input validation form, this snippet

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg">
    <linearGradient id="a">
        <stop stop-color="#0f0"/>
        <stop offset="1" stop-color="#00f"/>
    </linearGradient>
    <rect width="300" height="300" fill="url(#a)" />
</svg>

is validated as xml and passes. But the same extract, when saved as a file and submitted to the validation service via file upload, is validated as SVG 1.1 + URL + HTML + MathML 3.0, and produces a missing attribute error. The same happens if the document is validated via uri: it is validated as SVG 1.1 and produces an error.

I discovered this when a PR in another repo failed an automatic test because validation of an svg file failed. But I couldn't figure out what was wrong because the direct input method did not show any problem.

Is this a limitation of the direct input validation?

btrem avatar Jan 09 '24 01:01 btrem