ExifTool shortens <--> actual namespace prefixes

Started by mahikeulbody, August 29, 2012, 03:42:58 AM

Previous topic - Next topic

mahikeulbody

I would like to get the standard namespace prefix corresponding to a given Exiftool shorten. For example :
    Iptc4xmpExt = standard namespace prefix(XMP-iptcExt)

Since the file uses standard namespace prefix, Exiftool obviously has a "table" with the correspondance between both names set. Is there an option (-listx ?) to get this table ? If not, is there an Exiftool config file containing it ?

Edit: In fact, I have the same question about tag name since some of them are differents of the "standard" name.

Phil Harvey

The -listx option will give you the standard XMP tag name (called tag ID by ExifTool):

    exiftool -listx -xmp:all -s

You could go to the source code for the XMP module for this.  Search for "%xmpNS" for a table to translate ExifTool XMP group names to standard namespace prefixes, and "%nsURI" for a table of standard prefixes/URI's.  You can also find this in the ExifTool distribution.

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

mahikeulbody

#2
Thank for the answers.

About namespaces
Ok, I found the table %xmpNS and it answers to my question about namespace prefix.
It is a little bit strange to use a different name when the standard one looks ugly : even it is not perfect, it is better to follow the standard (IMHO). But may be Exiftool relies on some logical name construction such as XMP-something ?

About tag names
PH> The -listx option will give you the standard XMP tag name (called tag ID by ExifTool):
tag ids provided by -listx are not ever standard names : they are sometimes Exiftool names for XMP structure fields. It seems there is no way to know the standard name of a XMP structure field (for example the standard name of LocationCreatedCity, which is City).

Phil Harvey

Oh yeah, structures are a bitch.  You're right about this.

The only way to see the structure element names is to go to the code.

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