Thanks for an interesting question and for outlining your application goal. There is no support in the MLA core code for this type of mapping but it could be accomplished with a custom plugin that uses the hooks MLA provides. Your specific question is a variation on this old support topic:
Lightroom Hierarchical Subject XMP | www.remarpro.com
The example plugin developed for that topic is included in the MLA “Example Plugins”. You can access it by navigating to the Settings/Media Library Assistant Documentation tab, clicking the “Example Plugins” button and entering “Hierarchical” in the search box.
It should be feasible to expand that example to handle your application. The examples you gave in your post are somewhat different from those in the “IPTC Photo Metadata Reference Image”. The Reference Image shows an array of two location elements:
xmp:Iptc4xmpExt.LocationShown.0.City => City (Location shown1) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.0.CountryCode => R22
xmp:Iptc4xmpExt.LocationShown.0.CountryName => CountryName (Location shown1) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.0.LocationId.0 => Location Id 1a(Location shown1) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.0.LocationId.1 => Location Id 1b(Location shown1) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.0.LocationName => Location Name (Location shown1) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.0.ProvinceState => Province/State (Location shown1) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.0.Sublocation => Sublocation (Location shown1) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.0.WorldRegion => Worldregion (Location shown1) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.0.GPSAltitude => 140/1
xmp:Iptc4xmpExt.LocationShown.0.GPSLatitude => 48,8.82N
xmp:Iptc4xmpExt.LocationShown.0.GPSLongitude => 17,5.88E
xmp:Iptc4xmpExt.LocationShown.1.City => City (Location shown2) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.1.CountryCode => R22
xmp:Iptc4xmpExt.LocationShown.1.CountryName => CountryName (Location shown2) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.1.LocationId.0 => Location Id 2a(Location shown2) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.1.LocationId.1 => Location Id 2b(Location shown2) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.1.LocationName => Location Name (Location shown2) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.1.ProvinceState => Province/State (Location shown2) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.1.Sublocation => Sublocation (Location shown2) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.1.WorldRegion => Worldregion (Location shown2) (ref2022.1)
xmp:Iptc4xmpExt.LocationShown.1.GPSAltitude => 120/1
xmp:Iptc4xmpExt.LocationShown.1.GPSLatitude => 47,57.12N
xmp:Iptc4xmpExt.LocationShown.1.GPSLongitude => 16,49.8E
As you can see, there’s no “LocationShownCountryName
” element. It would be very helpful if you could post a link to one or more of your images so I can verify the exact format of the location metadata. You could instead contact me at my web site?and send one or more images by email.
I will leave this topic unresolved and I hope to hear more from you; any additional details or test images would be helpful. Thanks for your interest in MLA.