Semantically correct way to add copyright notice to svg file?

I want to add a copyright notice to my svg files, and it should only be "hidden" text and a watermark. This is not a real protection, because if you open the svg file with a text editor, you can edit everything and remove copyright. But I think that it will be a simple and excellent way to show who made the file and the ability to find unlicensed graphics, if there is any hidden information, and if you are looking for it, you can easily find it.

My main question is: how should copyright text be placed in a file?

  • Element
  • <title> For accessibility purposes, some user agents display a title element as a tooltip.
  • <desc> an element usually improves accessibility, and you should describe what the user sees.
  • Ugly way: text element with inline CSS to hide it. Do not even think about it!:)
  • <!--Copyright info here--> may also be a simple solution.
  • <metadata>: that would be the best way, but I did not find a detailed definition and which children could live inside. Also https://developer.mozilla.org/en-US/DOM/SVGMetadataElement gives 404. In the https://www.w3.org/TR/SVG/metadata.html#MetadataElement section (example 21.3) we can find more detailed information. But is RDF needed?

I think the element <metadata>is the right place, but which children should be used, but just RDF is the way to go?

+4
1

, metadata element. XML, RDF (, RDF/XML).

, RDF , RDF ( , SVG), , , XML, / .

RDF ( RDF/XML) :

<metadata>
  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:schema="http://schema.org/">
    <rdf:Description rdf:about="http://example.com/my-svg-file.svg">
      <schema:license rdf:resource="https://creativecommons.org/licenses/by-sa/4.0/"/>
    </rdf:Description>
  </rdf:RDF>
</metadata>

about IRI ; SVG (= IRI ).

license Schema.org:

, , URL.

( Schema.org .)

+3

Source: https://habr.com/ru/post/1650222/


All Articles