Semantically correct way to add a copyright notice into a svg file?

后端 未结 1 537
一整个雨季
一整个雨季 2021-02-04 13:00

I want to add a copyright notice in my svg files and it should be only \"hidden\" text and no watermark. This is no real protection, because if you open a svg file with a text e

相关标签:
1条回答
  • 2021-02-04 13:32

    I think the metadata element is the correct choice here. It has to contain XML, but it doesn’t have to be a RDF serialization (e.g., RDF/XML).

    But I think it makes sense to use RDF here, because that’s exactly RDF’s job (providing metadata about resources, like SVG documents), and there is probably no other XML-based metadata language that has greater reach / better support.

    A simple RDF statement (in RDF/XML) could look like this:

    <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>
    

    The about attribute takes an IRI as value; for a stand-alone SVG document, you could provide an empty value (= the base IRI of the document).

    In this example I use the license property from Schema.org:

    A license document that applies to this content, typically indicated by URL.

    (The vocabulary Schema.org is supported by several big search engines.)

    0 讨论(0)
提交回复
热议问题