Regarding SPDX.
Though doing it with an HTML comment works:
<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: 2021 John Doe <john.doe@email.com>
SPDX-License-Identifier: CC-BY-SA-4.0
-->
<svg version="1.2">
...
when editing the file in a GUI editor (e.g. Inkscape) however, the comment is removed after saving. Thus it is not a viable option.
Maybe these could be (ab-)used?:
- https://spdx.github.io/spdx-spec/v2-draft/snippet-information/#97-snippet-comments-on-license-field
- https://spdx.github.io/spdx-spec/v2-draft/snippet-information/#98-snippet-comments-on-license-field
NOTE
The REUSE tool auto-checks projects for SPDX/licensing conformity, but does not yet support SVG (nor XML specifically). It does support HTML, which is why the HTML comment thing would work, If editors would not strip it.