Missing empty structure-object in display

Started by herb, January 19, 2022, 04:17:37 AM

Previous topic - Next topic

herb

Hello Phil,

In the shorter past I tried to enhance my application, in order to handle xmp-structures.
Because of coding errors it created many structure lists containing also empty objects.
I am working on a Windows 10 system with Exiftool 12.39.

I have a structure-list XMPTestList containing
- an integer Int1 and
- a (sub) structure-list which contains 2 strings
All is well defined within the used config file.

Because of the errors in my application I run into a situation in which Exiftool does not display an empty list-object, when it is the last object of the list.
I could reproduce the problem using commands in DOS-box:
(1) Create such a list-object, containing an empty object at the end:
exiftool.exe -XMPTestList=[{},{Int1=111},{}] testfile.jpg
(2) Looking into the xmp part of this file the list and all of its objects is created well
(3) BUT: in display with exiftool.exe -xmp:all -struct testfile.jpg
    gives the following
XMP Test List : [,{Int1=111}]

The 3rd object, which is an empty object, is not contained in output.

Best regards
herb

Phil Harvey

This will take some work.  I'll post back here after I have had a chance to look into this.

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

Phil Harvey

Hi Herb,

Dealing with empty structures turns out to be a real pain.  I've spent a few hours on this and I think I've improved the situation, but it would help if I had your XMP file for testing.  Could you post it?  Thanks.

I'm hoping the output will look like this with the updates:

XMP Test List : [,{Int1=111},]

But there will still be discrepancy between the way empty structures are written and the way they are read back.

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

herb

Hello Phil,

thank you very much for your investigations.

Because I am not 100% sure what infos you need/want, attached please find a *.txt file which contains:
- the (main) part of the structure list I use for tests of my application
- xmp-file created with command (1): exiftool.exe -XMPTestList=[{},{Int1=111},{}] testfile.xmp
- xmp-file created with command (2): exiftool.exe -XMPTestList=[{Int1=111,StructListThings=[{},{what=what},{}]}] testfile.xmp
- and also the output of: exiftool.exe -XMP:all -g0:1 -struct testfile.xmp

To my surprise the display of command (2) shows all 3 objects of StructListThings
XMP Test List     : [{Int1=111,StructListThings=[,{What=what},]}]

and command (1) shows only 2 objects (as stated previous)
XMP Test List     : [,{Int1=111}]

I hope this helps a little bit.

Thanks again for your help
Best regards
herb

herb

Hello Phil,

thanks for the new version 12.40 of ExifTool.
In history I read "Improved handling of empty XMP structures in lists"; so I hoped a correction to this problem was done.

But sorry to say: I have not seen any change.
Exiftool still behaves as decribed in previous post (2022/1/29) with details in attached file.

Best regards
herb