Looking for sample rights.xml file

2 posts / 0 new
Last post

I understand that /META-INF/rights.xml can be used to define rights-related details however I cannot find an example of an epub that contains such a file. Can anyone provide me with an example? Thanks.

Since the IDPF doesn't define DRM, it's up to vendors to decide whether to use this file and how.

If you're looking for an example, a simple way to see Adobe's adept:rights element is to load an ebook into Digital Editions and then go to the directory on your computer where the ebook is stored (My Documents\My Digital Editions on Windows). If you open the EPUB in that directory you'll see a structure like this in the rights.xml file:

<adept:rights xmlns:adept="http://ns.adobe.com/adept">
    <licenseToken xmlns="http://ns.adobe.com/adept">
       <user>...</user>
       <resource>...</resource>
       <resourceItemType>application/epub+zip</resourceItemType>
       <voucher>...</voucher>
       <licenseURL>...</licenseURL>
       <operatorURL>...</operatorURL
       <encryptedKey>...</encryptedKey>
       <permissions>
           <display></display>
       </permissions>
       <signature>...</signature>
   </licenseToken>
   <adept:licenseServiceInfo>
      <adept:licenseURL>...</adept:licenseURL>
      <adept:certificate>...</adept:certificate>
   </adept:licenseServiceInfo>
</adept:rights>
Of course, none of this is terribly interesting or useful unless you're using adept (and probably not even then). If you're going to build your own DRM, you're going to be creating your own structure. The only requirement in OCF is that you place whatever element you use in a namespace.

Secondary menu