Custom XMP namespace prefix gets a number suffix?

Started by janspa, January 30, 2019, 05:47:28 PM

Previous topic - Next topic

janspa

Hi,
I am trying to write a few custom XMP tags using a custom namespace on Windows command line. I've managed to create a custom config file with a namespace e.g. 'http://my.company.com/';, a prefix 'cns' and a tag e.g. 'general'. When I run exiftool -xmp-cns:general="test" testfile.pdf the file is processed without errors, but the XMP data is shown in two ways depending on the software used:

  • with "exiftool -xmp -b testfile.pdf" the tag shows correctly <cns:general>true</cns:general>
  • with Adobe Acrobat the tag shows as "cns_1_:general:true"
––> why does Acrobat show the prefix with a "_1_" suffix, where does it come from? Sometimes the suffix might have another number (_2_/_3_/_4_..), too.

Best Regards,
Patrik

StarGeek

Unfortunately, this isn't my area of expertise and Phil (the author) just went on vacation.  So it might be a bit before you can get a definitive answer on this.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

I'm guessing, but it could be that "cns" is a namespace prefix used for other purposes, so maybe Acrobat is changing it to "cns_1_" to avoid a namespace conflict.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

geoffbarrenger

I searched the archive for other instances of this problem, because I'm having the same issue, and I'm wondering if it has something to do with a custom panel in Adobe CC.  Patrik - were you able to find a solution to your issue?  I can see the data from exiftool just fine in the Raw Data in Adobe but it does not map to the custom panel in Photoshop.  Please let me know regardless.  I'm wondering if it's the name or the URL not matching?

Thanks

Geoff

geoffbarrenger

Hello - Just in case anyone ever searches for this similar issue, here's the solution:

make sure that in your exiftool config file:
NAMESPACE => { 'namespace' => 'namespaceURL' },

your URL matches in your Adobe Raw Data Panel
xmlns:namespace="namespaceURL">

If not, change your exiftool config file to match the namespaceURL in your Adobe product, so that there isn't a conflict.  All four fields need to match! 

After that there will not be any "_1_" or "_2_" appended and you can use your exiftool commands as normal.



StarGeek

Thanks for taking time to post your solution.  It was pretty unlikely that janspa/Patrik was going to respond as that was their only post on this forum.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).