Exact rules for the creation and use of sidecar files

Indeed? It looks like that particular file has been manhandled by several apps, one of which is digiKam, with its own particular tags.

XMP digiKam Tags

DigiKam namespace tags.

These tags belong to the ExifTool XMP-digiKam family 1 group.

Tag Name Writable Values / Notes
CaptionsAuthorNames lang-alt
CaptionsDateTimeStamps lang-alt
ColorLabel string
ImageHistory string/ (different format from EXIF:ImageHistory)
ImageUnique I D string/
LensCorrectionSettings string
PicasawebGPhotoId string
PickLabel string
TagsList string+

Something that is obvious is that you have no hierarchy, despite the presence of the lr:hierarchicalSubject tag.

There is a hint, in the screenshot of your XMP file, that you might created a hierarchy of - National Trust | Nymans Gardens but, if that were the case, I would expect to see…

    <lr:hierarchicalSubject>
      <rdf:Bag>
        <rdf:li>National Trust</rdf:li>
        <rdf:li>National Trust|Nymans Gardens</rdf:li>
      </rdf:Bag>
    </lr:hierarchicalSubject>

Otherwise, with only those two keywords as standalone, there is no need at all for the lr:hierarchicalSubject tag.

However, even if there is no hierarchical link, DxO has the peculiarity of writing every standalone keyword as a single level hierarchy. This is not standard behaviour and can cause confusion with other software.

Thanks for mentioning this. Let me see if I understand.

If I create a top-level keyword A and tag an image with it, then I gather PL would write:

 <lr:hierarchicalSubject>
      <rdf:Bag>
        <rdf:li>A</rdf:li>
      </rdf:Bag>
    </lr:hierarchicalSubject>

but it should write

 <lr:hierarchicalSubject>
      <rdf:Bag>
      </rdf:Bag>
    </lr:hierarchicalSubject>

or maybe nothing at all.

I now create keyword B under A and tag the same image with B (the A keyword is still selected). Should PL now write

 <lr:hierarchicalSubject>
      <rdf:Bag>
        <rdf:li>A</rdf:li>
        <rdf:li>A|B</rdf:li>
      </rdf:Bag>
    </lr:hierarchicalSubject>

or

<lr:hierarchicalSubject>
     <rdf:Bag>
       <rdf:li>A|B</rdf:li>
     </rdf:Bag>
   </lr:hierarchicalSubject>

?

For completion (and a case I never want to use but some people do), If I remove the A keyword from the image but leave the A|B keyword selected, what should lr:hierarchicalSubject now include?

As long as you’re looking at this and have written your own keyword software, I understand that RGB files should have keyword changes written directly to them, not to XMP files–correct? If you happen to use exiftool, would you know the command line versions to correctly write keywords and hierarchies to the RGB file in all the cases listed above (only A, A and A|B, only A|B)?

Thanks!

@Joanna

and right or wrong so does a lot of software that is "hierarchical! keyword savvy!

It is possible that DxPL had already had a go at that image so I found another directory where there we no xmp sidecar files.

So we have DOPs but no xmp sidecars

and

after adding to digiKam and assigning to an image I got

and

<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:digiKam="http://www.digikam.org/ns/1.0/"
    xmlns:MicrosoftPhoto="http://ns.microsoft.com/photo/1.0/"
    xmlns:lr="http://ns.adobe.com/lightroom/1.0/"
    xmlns:mediapro="http://ns.iview-multimedia.com/mediapro/1.0/"
    xmlns:acdsee="http://ns.acdsee.com/iptc/1.0/"
    xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
    xmlns:xmp="http://ns.adobe.com/xap/1.0/"
    xmlns:exif="http://ns.adobe.com/exif/1.0/"
    xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
   acdsee:categories="&lt;Categories&gt;&lt;Category Assigned=&quot;1&quot;&gt;Shoreham Harbour&lt;/Category&gt;&lt;Category Assigned=&quot;1&quot;&gt;Southwick&lt;/Category&gt;&lt;Category Assigned=&quot;0&quot;&gt;Added with DB om C&lt;Category Assigned=&quot;1&quot;&gt;Kingston&lt;/Category&gt;&lt;/Category&gt;&lt;/Categories&gt;"
   tiff:Orientation="1"
   tiff:XResolution="180/1"
   tiff:YResolution="180/1"
   tiff:ResolutionUnit="2"
   tiff:Make="Panasonic"
   tiff:Model="DC-G9"
   tiff:Software="Ver.2.7  "
   xmp:ModifyDate="2023-12-20T12:51:58.088"
   xmp:CreateDate="2023-12-20T12:51:58.088"
   exif:ExifVersion="0231"
   exif:FlashpixVersion="0100"
   exif:ExposureTime="10/3200"
   exif:FNumber="63/10"
   exif:ExposureProgram="2"
   exif:ExposureBiasValue="0/100"
   exif:MaxApertureValue="925/256"
   exif:MeteringMode="5"
   exif:LightSource="0"
   exif:FocalLength="120/10"
   exif:SensingMethod="2"
   exif:FileSource="3"
   exif:ExposureMode="0"
   exif:WhiteBalance="0"
   exif:FocalLengthIn35mmFilm="24"
   photoshop:DateCreated="2023-12-20T12:51:58.088">
   <digiKam:TagsList>
    <rdf:Seq>
     <rdf:li>Shoreham Harbour</rdf:li>
     <rdf:li>Southwick</rdf:li>
     <rdf:li>Kingston</rdf:li>
    </rdf:Seq>
   </digiKam:TagsList>
   <MicrosoftPhoto:LastKeywordXMP>
    <rdf:Bag>
     <rdf:li>Shoreham Harbour</rdf:li>
     <rdf:li>Southwick</rdf:li>
     <rdf:li>Kingston</rdf:li>
    </rdf:Bag>
   </MicrosoftPhoto:LastKeywordXMP>
   <lr:hierarchicalSubject>
    <rdf:Bag>
     <rdf:li>Shoreham Harbour</rdf:li>
     <rdf:li>Southwick</rdf:li>
     <rdf:li>Kingston</rdf:li>
    </rdf:Bag>
   </lr:hierarchicalSubject>
   <mediapro:CatalogSets>
    <rdf:Bag>
     <rdf:li>Shoreham Harbour</rdf:li>
     <rdf:li>Southwick</rdf:li>
     <rdf:li>Kingston</rdf:li>
    </rdf:Bag>
   </mediapro:CatalogSets>
   <exif:ISOSpeedRatings>
    <rdf:Seq>
     <rdf:li>200</rdf:li>
    </rdf:Seq>
   </exif:ISOSpeedRatings>
   <exif:Flash
    exif:Fired="False"
    exif:Return="0"
    exif:Mode="2"
    exif:Function="False"
    exif:RedEyeMode="False"/>
   <dc:subject>
    <rdf:Bag>
     <rdf:li>Shoreham Harbour</rdf:li>
     <rdf:li>Southwick</rdf:li>
     <rdf:li>Kingston</rdf:li>
    </rdf:Bag>
   </dc:subject>
  </rdf:Description>
 </rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>

If you look at the ACDSee line in the xmp sidecar you will see the problem I got into with digiKam, I added the list of keywords incorrectly and now need to work out how to remove them but somehow digiKam included them in my assignment so I removed them before discovering the image in DxPL!

PL7

@freixas I am not sure if it was you or another poster that asked if DxPL uses ExifTool and given that I crippled ExifTool by accident on my test machine but nothing happened with DxPL I can safely assume that it doesn’t.

It might use Exiv 2 or ??

I will let @Joanna answer the ExifTool question which is way out of my knowledge but the “rules” state that RGB files should have the xmp data embedded and not placed in sidecar files.

In DxPL you will have A & B in the Dc fields as shown in the table I provided in an earlier post in the topic but the ‘hr’ fields will have the following in the first images (P1111331.RW2) with the option shown below selected and the second image (P1111333.RW2) is with the alternative option selected.

With the setting I use I will get both.

So I added A|B to one of the images and got

In PIE that gives A and B in the ‘dc’ fields and A and A|B (A>B) in the ‘hr’ fields

Sorry I am exhausted after that!!

Wasn’t me. I doubt that PL would depend on an external PERL script.

You left out some context:

To clarify, I wasn’t asking @Joanna what PL does since I can check that myself, I was asking what the “standard behavior” she cited would do. In any case, shouldn’t you be in bed? :slight_smile:

Thanks to all who have added to this post. A very interesting read. My two cents worth having trialled numerous DAM packages, including Bridge which I really liked, is that Bridge had the occasion to not write information to the file but only hold it in its data folder. I eventually landed on IMatch as my DAM softawre and to date there has been no issues between the two software as far as I can tell. IMatch also uses the latest version of ExifTool and suggest those who are able to have a look at how it works in the background.

1 Like

What a good question to start and what a complex discussion. I can’t claim to have understood all of it (I’m a naïve user who doesn’t look at code, rather like a car driver who doesn’t open the bonnet / hood) but it does reassure me that I’m not the only one unclear i this area. It strikes me Dxo ought to be either improving / rationalising their tech design so that there isn’t duplication of information and different options about whether to store it in either or both paces (sidecars, database), or - if some kind of rationalisation isn’t for some reason possible, improving their documentation so customers don’t have to do experiments and tests to find out what it actually does.