empty values are indeed a difficult topic in general, but what you describe is actually "as designed".
All normal XMPCore APIs treat empty values just like non-empty values. But there are utility functions like ApplyTemplate, that interpret empty values sometimes different, depending on the parameters they are given.
Please refer to the XMP Toolkit SDK Programmer’s Guide for further details regarding the available parameters for this function.
Thank you for the answer. I have reread the documentation and I can see that I did not read it properly the first time. My mistake.
The ApplyTemplate function in version 5 replaced the AppendProperties function from version 4. The AppendProperties preserved empty properties in the XMP data that was merged in. This is a feature we rely on, so I had to make a few changes to the ApplyTemplate to get it to also merge empty properties.
Would you consider adding another parameter for the ApplyTemple function, so that is possible to get to preserve empty properties ?
I can understand that this API change causes confusion.
The name change for the function should also emphasize the intended semantic of it. The previous function did a mixture of template operations and simple merging of XMP packets which resulted in unexpected results sometimes. The new API was meant to make the expected result more clear.
The second parameter of the new API should really be considered a "template" that defines how properties are treated in a given XMP packet and not a second XMP that is merged into the other one. For a template, empty properties have a certain semantic according to the provided parameters for the template operation. This is a difference to the "normal" empty value behavior. This has mainly historical reasons and cannot be easily changed.
Hope this helps
Europe, Middle East and Africa