Question to short form of flattened tagnames

Started by herb, November 15, 2018, 07:04:37 AM

Previous topic - Next topic

herb

Hello Phil,

In order to explain my question I have to start with DarwinCore used as SimpleDarwinCore.
SimpleDarwinCore is identical to DarwinCore, but it does not use any structure.

Exiftool Structure DCEvent has e.g. the element eventID.
This element has the flattened tagname: EventEventID -  also known by short flattened tagname: EventID.

In order to come to SimpleDarwinCore I did the following:
(1) File .exiftool_config got this new entry

%Image::ExifTool::UserDefined = (
  'Image::ExifTool::DarwinCore::Main' => {
    eventID => { },
}, ...

which defines a new tag outside of all DarwinCore structures.

(2) In order to avoid naming conficts with existing short flattened tagname I removed line 76 of DarwinCore.pm file:
EventEventID      => { Name => 'EventID',       Flat => 1 },

With command
exiftool.exe -xmp-dwc:eventID=newID test.xmp
I created an xmp file and the result was:

<rdf:Description rdf:about=''
  xmlns:dwc='http://rs.tdwg.org/dwc/index.htm'>
  <dwc:Event rdf:parseType='Resource'>
   <dwc:eventID>newID</dwc:eventID>
  </dwc:Event>
  <dwc:eventID>newID</dwc:eventID>
</rdf:Description>


To my surprise the file contains eventID twice.
It is totally unclear to me why exiftool did also create eventID inside structure dwc:Event (= DCEvent)
I thought, that eventID - as element of structure DCEvent - is unknown.
 
Thanks for your comments in advance.
Best regards
Herb

Phil Harvey

Hi Herb,

You may also need to remove the eventid definition from TagLookup.pm.  ExifTool will automatically regenerate a tag with id EventEventID (with name EventEventID), but the existing entry in TagLookup.pm with name "eventid" will point to this tag.

It would be a bit of work to properly support the simple DarwinCore schema. :(

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

herb

Hello Phil,

wow - what a quick response. You answered my question before I had posted it.

Thanks for your help. All works fine now.

Best regards
Herb