Discussion:
[cc-devel] How to XMP-tag an image with a CC licence?
Andrew Smith
2015-03-24 20:55:00 UTC
Permalink
Hi everyone

We are trying to write some code that inserts correct XMP metadata into
CC-licenced images. I am having a very hard time figuring out what
exactly that means. Would appreciate some help from people who've been
working with this stuff much longer than me:

First of all, are there any sample images with confirmed valid metadata
in them? That would help a lot in trying to figure it out.

Trying to interpret this:
https://wiki.creativecommons.org/XMP#Specifying_License_Information

My questions:

* xmpRights:WebStatement sounds to me a little unlikely to be used by
anyone. If I read it correctly it's supposed to be a different URL for
every single piece of content. Is that what it's supposed to be? If I
assume that's not realistic (and I'm definitely not providing one
myself) - what should I set it to? Missing? Empty? The url to the CC
licence same as cc:license?

* dc:rights I guess I do with this exactly the same thing as the
WebStatement in all cases?

* xmpRights:UsageTerms sounds like a human-readable and not
machine-readable text. If I don't care about human-readable licence text
embedded in my images, what should I do for this field?

* Do xmlns:xmpRights and xmlns:cc need to be in separate <Description>
elements as the example on page 18 of CC-Rel?
https://wiki.creativecommons.org/images/d/d6/Ccrel-1.0.pdf or can all of
these attributes go in one <Description> element?

* cc:license - Where do I get an exhaustive list of links such as
http://creativecommons.org/licenses/by-sa/2.0/ ? I'm assuming these are
forever, will not be deleted or moved? So I can hard-code them in
software for comparison purposes?

* cc:morePermissions and cc:attributionURL can be safely left blank if I
don't have content for those values?

Basically, in a simple use case where I know the name of the author and
the licence to use for the work - what do I set as values for the
attributes listed above?

Thanks in advance,

Andrew
Matt Lee
2015-03-24 21:49:13 UTC
Permalink
Hey Andrew,

Thanks for helping out with this part of the puzzle. For those
following along, this work is part of The List app, or rather, some of
the server side processing components.

I generated a license using https://creativecommons.org/choose/ and
chose XMP as my output, I got this:

http://paste.debian.net/plain/163046

<?xpacket begin='' id=''?>
<x:xmpmeta xmlns:x='adobe:ns:meta/'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<rdf:Description rdf:about=''
xmlns:xapRights='http://ns.adobe.com/xap/1.0/rights/'>
<xapRights:Marked>True</xapRights:Marked>
</rdf:Description>
<rdf:Description rdf:about=''
xmlns:xapRights='http://ns.adobe.com/xap/1.0/rights/'
<xapRights:UsageTerms>
<rdf:Alt>
<rdf:li xml:lang='x-default' >This work is licensed under a &lt;a
rel=&#34;license&#34;
href=&#34;http://creativecommons.org/licenses/by/4.0/&#34;&gt;Creative
Commons Attribution 4.0 International License&lt;/a&gt;.</rdf:li>
<rdf:li xml:lang='en_US' >This work is licensed under a &lt;a
rel=&#34;license&#34;
href=&#34;http://creativecommons.org/licenses/by/4.0/&#34;&gt;Creative
Commons Attribution 4.0 International License&lt;/a&gt;.</rdf:li>
<rdf:li xml:lang='en' >This work is licensed under a &lt;a
rel=&#34;license&#34;
href=&#34;http://creativecommons.org/licenses/by/4.0/&#34;&gt;Creative
Commons Attribution 4.0 International License&lt;/a&gt;.</rdf:li>
</rdf:Alt>
</xapRights:UsageTerms>
</rdf:Description>
<rdf:Description rdf:about=''
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<dc:title>
<rdf:Alt>
<rdf:li xml:lang='x-default'>Photo of a cat</rdf:li>
<rdf:li xml:lang='en_US'>Photo of a cat</rdf:li>
</rdf:Alt>
</dc:title>
</rdf:Description>
<rdf:Description rdf:about=''
xmlns:cc='http://creativecommons.org/ns#'>
<cc:license rdf:resource='http://creativecommons.org/licenses/by/4.0/'/>
</rdf:Description>
<rdf:Description rdf:about=''
xmlns:cc='http://creativecommons.org/ns#'>
<cc:attributionName>Matt Lee</cc:attributionName>
</rdf:Description>

</rdf:RDF>
</x:xmpmeta>
<?xpacket end='r'?>
Andrew Smith
2015-03-26 03:43:27 UTC
Permalink
Thanks, that helped a lot.

To answer my own questions (in case someone else is looking for the same):

* xmpRights:WebStatement has conflicting definitions. This set of wiki
pages says it should point to a work-specific URL:

https://wiki.creativecommons.org/XMP#Specifying_License_Information
https://wiki.creativecommons.org/WebStatement
https://wiki.creativecommons.org/Embedded_Metadata

but the following documents (including the CC chooser) say no such thing:

https://creativecommons.org/choose/
http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf
XMPSpecificationPart1.pdf

So I will assume that the wiki pages were written before or despite both
the common and specified rules and will ignore them (should fix them at
some point). I will use xmpRights:WebStatement to point to an author's
URL, not necessarily specific to the work.

* dc:rights and cc:AttributionURL will be set to the same as
xmpRights:WebStatement

* I'll set xmpRights:UsageTerms to a human-readable string though I
don't really see the point.

* Things can be both in the same and in separate <Description> elements.
And according to the XMP specification they can just as well be
attributes as elements. I shiver thinking of what it takes to write a
proper parser for this horror.

Cheers,

Andrew
Post by Matt Lee
Hey Andrew,
Thanks for helping out with this part of the puzzle. For those
following along, this work is part of The List app, or rather, some of
the server side processing components.
I generated a license using https://creativecommons.org/choose/ and
http://paste.debian.net/plain/163046
<?xpacket begin='' id=''?>
<x:xmpmeta xmlns:x='adobe:ns:meta/'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<rdf:Description rdf:about=''
xmlns:xapRights='http://ns.adobe.com/xap/1.0/rights/'>
<xapRights:Marked>True</xapRights:Marked>
</rdf:Description>
<rdf:Description rdf:about=''
xmlns:xapRights='http://ns.adobe.com/xap/1.0/rights/'
<xapRights:UsageTerms>
<rdf:Alt>
<rdf:li xml:lang='x-default' >This work is licensed under a &lt;a
rel=&#34;license&#34;
<rdf:li xml:lang='en_US' >This work is licensed under a &lt;a
rel=&#34;license&#34;
<rdf:li xml:lang='en' >This work is licensed under a &lt;a
rel=&#34;license&#34;
</rdf:Alt>
</xapRights:UsageTerms>
</rdf:Description>
<rdf:Description rdf:about=''
xmlns:dc='http://purl.org/dc/elements/1.1/'>
<dc:title>
<rdf:Alt>
<rdf:li xml:lang='x-default'>Photo of a cat</rdf:li>
<rdf:li xml:lang='en_US'>Photo of a cat</rdf:li>
</rdf:Alt>
</dc:title>
</rdf:Description>
<rdf:Description rdf:about=''
xmlns:cc='http://creativecommons.org/ns#'>
<cc:license rdf:resource='http://creativecommons.org/licenses/by/4.0/'/>
</rdf:Description>
<rdf:Description rdf:about=''
xmlns:cc='http://creativecommons.org/ns#'>
<cc:attributionName>Matt Lee</cc:attributionName>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end='r'?>
Loading...