News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Tag names with period ('.')

Started by Tr, December 13, 2013, 05:00:50 PM

Previous topic - Next topic

Tr

Hello:

I have image files with tag names containing a period ('.')

When I extract them using exiftool into a .csv and the '.' is removed:

XMP-avm:Spatial.Quality  ===> XMP-avm:SpatialQuality

When I run exif to write the .csv tags back into the image, a new tag (without the '.') is created, leaving the original one unchanged.  If I insert a period ('.') back into the tag name in the .csv, exiftool states it is an illegal tag name.

Reading other posts in this forum, the response usually states that periods ('.') are illegal for tag names in EXIF.  However the XMP standard is based on XML and XML does allow period in tag names ('.'). 

So I'm fairly confused and could use some help. 

References:
XMP Standard: http://www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/cs6/XMPSpecificationPart1.pdf
XML Tag Names with a period ('.'): http://www.java2s.com/Tutorial/XML/0020__Introduction/XMLNamingConventions.htm
AVM Tag Standard: http://virtualastronomy.org/AVM_12_ref_table_rlh02_print2.pdf

Thanks so much,
Tr

Phil Harvey

You tell me that a period is legal in an XMP property name, but it is not legal in an ExifTool tag name.  In the config file where you define this tag, you must specify a legal tag "Name" in the tag properties, something like this:

    'Spatial.Quality' => { Name => 'SpatialQuality' },

I know that you must have a config file containing this user-defined tag because you mentioned that you can write it (and it isn't one of the pre-defined XMP tags).

- 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 ($).

Phil Harvey

I tried this out, and could duplicate your problem with a user-defined tag.

It makes sense for me to add some protection against ExifTool automatically generating an illegal user-defined tag Name like this.  I'll add this in version 9.45.  But as I said, the solution for now is to specify a legal "Name".

- 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 ($).

Tr

Hi Phil:

Here is the Exiftool_config I am using:  https://github.com/clr/astronomy_visualization_metadata_exiftool_profile/blob/master/.ExifTool_config

Where do I insert the this line ?

    'Spatial.Quality' => { Name => 'SpatialQuality' },

I have attempted many times, but can't get the 'Spatial.Quality' Tag to update in the Image. :-(

Sorry, I am not a Perl guy :-(

Tr

Phil Harvey

Hmmm.  There are a number of other tags with "." in that config file.  If you aren't in a hurry, you could just wait for ExifTool 9.45.  But to get this working now, you just have to add the Name definition to all necessary tags. For example, change

    'Spatial.Quality' => { },

to

    'Spatial.Quality' => { Name => 'SpatialQuality' },

in your config file.

- 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 ($).

Tr

Bingo !!!  Thanks Phil.

I will use this technique and modify the ExifTool_config for each of these custom tags.

I assume this is how do I set 2 properties on a Tag in Perl:

'Subject.Category' => { List => 'Bag' },

'Subject.Category' => { Name => 'SubjectCategory', List => 'Bag' },

Thanks again!

ExifT :) :) L Rocks !!!
Tr

Phil Harvey

Quote from: Tr on December 16, 2013, 03:55:44 PM
I assume this is how do I set 2 properties on a Tag in Perl:

'Subject.Category' => { Name => 'SubjectCategory', List => 'Bag' },

Correct.   Pretty good for not a Perl guy... ;)

- 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 ($).