XnView XMP Subject not writing parent info?

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: XnTriq, helmut, xnview

stealth95l
Posts: 4
Joined: Sun Mar 20, 2022 6:53 pm

XnView XMP Subject not writing parent info?

Post by stealth95l »

Hi I was just doing some testing cause I love how easy this is to sort and tag your photo's, but I ran into a issue with my Synology Photo Station 6 not reading some of the tags so I got looking into it more closer... when I go into Tools/Settings/Metadata I have Export Catalog's Category to XMP Subject and IPTC Keyword ticked, Create XMP data ticked, Create IPTC data ticked, Read/Write hierarchical keywords ticked and Automaticly apply parent keywords ticked.. so when I look at info on ExifTool I scroll down and look at XMP the Hierarchical Subject is in the correct format but the Subject doesn't match it, my Photo Station software is looking at the XMP Subject data, If I go to Tools/Meta Data/Transfer and then click Add / XMP:subject then do {IPTC:Keywords} then it will overwrite the XMP Subject with the parent data so it matches the XMP Hierarchical Subject (Example: Parent|Kid ) if I don't it shows Parent, Kid in XMP Subject. I'm not sure if thats intended but wanted to report it, because the Export Catalog says it's exporting to the XMP Subject or the Automaticly apply parent keywords isn't applying to the XMP Subject.

Also another question and it's not a big deal but is there a way to change the Write Hierarchical seperator the '|' between the parent and child to a different symbol like a dash or a forward slash? Thank you!
User avatar
michel038
XnThusiast
Posts: 1381
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: XnView XMP Subject not writing parent info?

Post by michel038 »

1) XMP
As far as I know, the standard for XMP keywords (XMP-DC:Subject) is to write without hierarchy (flattened keywords).
Subject is a "list" metadata, with a comma as separator.

The hierarchy is carried by other metadata like xmp-lr:hierachicalsubject or xmp-digiKam:TagsList or
Xmp-MicrosoftPhoto:LastKeywordXMP

XnViewMp has chosen to follow the Adobe standard (xmp-lr:hierachicalsubject)

Other softwares (PhotoMechanics, Photostation ?) seem to have chosen other methods to challenge the domination of Adobe...

I don't know the result of the standardization efforts of the MWG (Metadata Working Group),( all this is in english , it's difficult for me to dig in this mass of documents )

2) IPTC
IPTC keywords are usually used without hierarchy. (IPTC:Keywords , list type , flat keywords)

Some softwares used hierarchical methods in this field before xmp was created, so Xnviewmp has developed a setting to read these hierarchical keywords by specifying the separator character. (compatibility with old tagged pictures).

3) Parent keywords
This setting (settings, metadata) is used only when adding a category.
Another setting (Tools > Metadata > Edit iptc > Keywords > Use parent keywords ) allows (maybe ?) to write a hierarchy in IPTC keywords

You found a workaround for your own purpose, I think it's the best solution ...
stealth95l
Posts: 4
Joined: Sun Mar 20, 2022 6:53 pm

Re: XnView XMP Subject not writing parent info?

Post by stealth95l »

I only mentioned it because it's worded wrong in the options then because it does say it will write the keywords to the Subject of the XMP which it does but when parent option is ticked it doesn't label it parent style. Good to know on the standards though! Thank you! for now I'll just use the work around I found, thanks!
stealth95l
Posts: 4
Joined: Sun Mar 20, 2022 6:53 pm

Re: XnView XMP Subject not writing parent info?

Post by stealth95l »

Is there a way to run a script or bat file in windows with XnView MP after a file change? I know with exiftool I can run a command to copy/overwrite the subject with the hierarchical subject by making an outside bat file and running it, it looks like ExifTool is built into XnView. If I run a bat and do exiftool -r -overwrite_original "-xmp-dc:subject<xmp:HierarchicalSubject" drive:\pathtofolder or replace that drive:\pathtofolder with the file name and take out the -r it will do what I want, the -r and path to folder digs through everything, so pretty much I can run this bat file when I'm done inside XnView tagging etc to update it the way I need to but what sucks is if I update a tag on a photo it changes the subject back, any way to run custom exiftool scripts on file change? That would be awesome! :P I hope that wasn't to confusing. I'm running the windows version btw.
User avatar
michel038
XnThusiast
Posts: 1381
Joined: Tue Sep 27, 2016 8:18 am
Location: France

Re: XnView XMP Subject not writing parent info?

Post by michel038 »

When using XnViewMP :
You can create an "Open with" entry ( Tools > Open with> Configure programs > Add ...)
Then select ExifTool (in \XnViewMP\AddOn\ folder) , and enter your parameters for the second column (-r -overwrite_original "-xmp-dc:subject<xmp:HierarchicalSubject" )

You can now select a set of files, or a folder (in the right side of the browser) , right click > open with > exiftool ... to update your xmp suject.

But for a better (future?) compatibility you should consider using normalized keywords: flattened for xmp-dc:subject, and hierarchized for xmp-Lr:hierarchicalsubject ...

There are no automatic folder monitoring options in XnViewMP yet


:shock: But we are here in the "xnview classic" part of the forum
stealth95l
Posts: 4
Joined: Sun Mar 20, 2022 6:53 pm

Re: XnView XMP Subject not writing parent info?

Post by stealth95l »

michel038 wrote: Mon Mar 21, 2022 10:05 pm When using XnViewMP :
You can create an "Open with" entry ( Tools > Open with> Configure programs > Add ...)
Then select ExifTool (in \XnViewMP\AddOn\ folder) , and enter your parameters for the second column (-r -overwrite_original "-xmp-dc:subject<xmp:HierarchicalSubject" )

You can now select a set of files, or a folder (in the right side of the browser) , right click > open with > exiftool ... to update your xmp suject.

But for a better (future?) compatibility you should consider using normalized keywords: flattened for xmp-dc:subject, and hierarchized for xmp-Lr:hierarchicalsubject ...

There are no automatic folder monitoring options in XnViewMP yet


:shock: But we are here in the "xnview classic" part of the forum
Woops my bad wrong place XD thank you for the help I'll give that a shot! Thanks!