- From: vlakoff via GitHub <noreply@w3.org>
- Date: Thu, 16 Apr 2026 23:45:58 +0000
- To: public-svg-issues@w3.org
I agree with the original report. The current wording in the conformance section is misleading because it suggests that SVG content may need to be _valid XML_, while in practice and in the rest of the specification only _well‑formed XML_ is required. ### Why this matters * SVG 2 does not define or rely on any DTD. Therefore, XML _validity_ (in the XML 1.0 sense) is not a meaningful conformance criterion. * Browsers do not perform DTD‑based validation when parsing SVG. * None of the examples in the specification include a `<!DOCTYPE>` declaration, which would be required for XML validity. * Likewise, the examples do not include an XML declaration (`<?xml version="1.0"?>`), and authors are not expected to use one. Both constructs are unnecessary and often undesirable in real‑world SVG usage. ### What authors actually need SVG content must be **well‑formed XML**, meaning: * elements are properly nested, * attributes are correctly quoted, * there is a single root element, * no invalid characters appear, * etc. But SVG content **does not need to be valid XML**, and the specification should not imply otherwise. ### Suggested clarification for the conformance section Here are two possible formulations that would make the intent unambiguous: **Option A (more explicit and author‑friendly)** SVG content is required to be _well‑formed XML_. SVG content is not required to be _valid XML_, and user agents do not perform DTD‑based validation. In particular, SVG documents do not need a `<!DOCTYPE>` declaration or an XML declaration (`<?xml …?>`). **Option B (spec‑style explanatory note)** **Note:** SVG is defined using XML syntax, but conformance only requires _well‑formedness_. XML validity (i.e., DTD‑based validation) is not required for SVG documents, and including a DOCTYPE or XML declaration is neither necessary nor recommended. -- GitHub Notification of comment by vlakoff Please view or discuss this issue at https://github.com/w3c/svgwg/issues/960#issuecomment-4264183033 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 16 April 2026 23:45:59 UTC