Author Topic: Strange bahaviour with the structured keywords  (Read 7247 times)

Offline Lars

  • Member
  • **
  • Posts: 87
    • View Profile
    • DESGphoto / elementalSPORTS
Strange bahaviour with the structured keywords
« on: December 02, 2009, 12:29:57 AM »
Kirk,

I noticed a strange behaviour in PM within the handling of the hierarchical keywords written by LR. Following scenario:

1.) open an image in Lightroom and assign some keywords. The xmp-output is then for example:

   <dc:subject>
       <rdf:Bag>
        <rdf:li>Athlet</rdf:li>
        <rdf:li>Damen</rdf:li>
        <rdf:li>Detail</rdf:li>
        <rdf:li>Ehemalige</rdf:li>
        <rdf:li>Eisschnelllauf</rdf:li>
        <rdf:li>GER</rdf:li>
        <rdf:li>Gesichter</rdf:li>
        <rdf:li>Gunda Niemann-Stirnemann</rdf:li>
        <rdf:li>Sport</rdf:li>
       </rdf:Bag>
   </dc:subject>

   <lr:hierarchicalSubject>
       <rdf:Bag>
        <rdf:li>Sport|Eisschnelllauf|Athlet|GER|Ehemalige|Damen|Gunda Niemann-Stirnemann</rdf:li>
        <rdf:li>Sport|Eisschnelllauf|Detail|Gesichter</rdf:li>
       </rdf:Bag>
   </lr:hierarchicalSubject>

2.) now open the image in PM and make some changes within the IPTC/XMP data. The very bad thing is that the xmp file will be changed by PM to the following:

      <dc:subject>
            <rdf:Bag>
               <rdf:li>Athlet</rdf:li>
               <rdf:li>Damen</rdf:li>
               <rdf:li>Detail</rdf:li>
               <rdf:li>Ehemalige</rdf:li>
               <rdf:li>Eisschnelllauf</rdf:li>
               <rdf:li>GER</rdf:li>
               <rdf:li>Gesichter</rdf:li>
               <rdf:li>Gunda Niemann-Stirnemann</rdf:li>
               <rdf:li>Sport</rdf:li>
               <rdf:li>Sport|Eisschnelllauf|Athlet|GER|Ehemalige|Damen|Gunda Niemann-Stirnemann</rdf:li>
               <rdf:li>Sport|Eisschnelllauf|Detail|Gesichter</rdf:li>
            </rdf:Bag>
      </dc:subject>

   <lr:hierarchicalSubject>
       <rdf:Bag>
        <rdf:li>Sport|Eisschnelllauf|Athlet|GER|Ehemalige|Damen|Gunda Niemann-Stirnemann</rdf:li>
        <rdf:li>Sport|Eisschnelllauf|Detail|Gesichter</rdf:li>
       </rdf:Bag>
   </lr:hierarchicalSubject>


Why is PM adding the "hierarchicalSubject" content as a normal keyword to the IPTC keyword list? There seems to be no reason to do this. Is there a way to turn this off? The major effect is, that there are now double keywords available and in the IPTC/XMP keyword. This bahaviour is very bad for example when the user wants to use the {keywords} variable, e.g. to add the keywords to the subject field when saving the image.

Another very bad side effect is also that the hierarchical keywords which became "normal" keywords are also shown in LR keyword panel in the wrong way:

false: Gesichter,  Gunda Niemann-Stirnemann, Gesichter > Detail > Eisschnelllauf, Gunda Niemann-Stirnemann > Damen > Ehemalige > GER
right: Gesichter, Gunda Niemann-Stirnemann, Gesichter

Furthermore LR is creating new but identical keyword hierarchies when re-importing these modified images.

It would be much better and straight forward when there would be a keyword field with the keywords only and an additional field for the "hierarchicalSubject" or structured keywords.





regards,
Lars

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25052
    • View Profile
    • Camera Bits, Inc.
Re: Strange bahaviour with the structured keywords
« Reply #1 on: December 02, 2009, 06:41:53 AM »
Lars,

Why is PM adding the "hierarchicalSubject" content as a normal keyword to the IPTC keyword list? There seems to be no reason to do this. Is there a way to turn this off? The major effect is, that there are now double keywords available and in the IPTC/XMP keyword. This bahaviour is very bad for example when the user wants to use the {keywords} variable, e.g. to add the keywords to the subject field when saving the image.

Because if we don't do this, then every other program in existence besides Lightroom and Photo Mechanic won't see those keyword hierarchies.

Quote from: Lars
Another very bad side effect is also that the hierarchical keywords which became "normal" keywords are also shown in LR keyword panel in the wrong way:

false: Gesichter,  Gunda Niemann-Stirnemann, Gesichter > Detail > Eisschnelllauf, Gunda Niemann-Stirnemann > Damen > Ehemalige > GER
right: Gesichter, Gunda Niemann-Stirnemann, Gesichter

Furthermore LR is creating new but identical keyword hierarchies when re-importing these modified images.

Then perhaps we'll need to have an option to turn off this behavior.  LR used to not do this in the past.

Quote from: Lars
It would be much better and straight forward when there would be a keyword field with the keywords only and an additional field for the "hierarchicalSubject" or structured keywords.

Not necessary if we have an option to not write hierarchical keywords into anything but the XMP hierarchicalSubject field.

-Kirk

Offline Lars

  • Member
  • **
  • Posts: 87
    • View Profile
    • DESGphoto / elementalSPORTS
Re: Strange bahaviour with the structured keywords
« Reply #2 on: December 02, 2009, 07:13:33 AM »
Because if we don't do this, then every other program in existence besides Lightroom and Photo Mechanic won't see those keyword hierarchies.

hmm ok, but why does PM not write its hierarchy into the same XMP tag as Lightroom does (hierarchicalSubject)? I guess this would be the finest solution and you would prevent any conflicts with other programs.

Then perhaps we'll need to have an option to turn off this behavior.  LR used to not do this in the past.

Such an option would be helpfull to prevent conflics or even better to have an option that would allow PM to write (append/merge) the hierarchy into the "hierarchicalSubject" as suggested above.

Lars

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25052
    • View Profile
    • Camera Bits, Inc.
Re: Strange bahaviour with the structured keywords
« Reply #3 on: December 02, 2009, 07:55:34 AM »
Lars,

Because if we don't do this, then every other program in existence besides Lightroom and Photo Mechanic won't see those keyword hierarchies.

hmm ok, but why does PM not write its hierarchy into the same XMP tag as Lightroom does (hierarchicalSubject)? I guess this would be the finest solution and you would prevent any conflicts with other programs.

It does do this in version 4.6.2 and higher.  What version of Photo Mechanic are you running?

-Kirk

Offline Lars

  • Member
  • **
  • Posts: 87
    • View Profile
    • DESGphoto / elementalSPORTS
Re: Strange bahaviour with the structured keywords
« Reply #4 on: December 02, 2009, 08:01:14 AM »
Lars,

Because if we don't do this, then every other program in existence besides Lightroom and Photo Mechanic won't see those keyword hierarchies.

hmm ok, but why does PM not write its hierarchy into the same XMP tag as Lightroom does (hierarchicalSubject)? I guess this would be the finest solution and you would prevent any conflicts with other programs.

It does do this in version 4.6.2 and higher.  What version of Photo Mechanic are you running?

-Kirk



4.6.2.1  :-\

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25052
    • View Profile
    • Camera Bits, Inc.
Re: Strange bahaviour with the structured keywords
« Reply #5 on: December 02, 2009, 08:05:57 AM »
Lars,

Because if we don't do this, then every other program in existence besides Lightroom and Photo Mechanic won't see those keyword hierarchies.

hmm ok, but why does PM not write its hierarchy into the same XMP tag as Lightroom does (hierarchicalSubject)? I guess this would be the finest solution and you would prevent any conflicts with other programs.

It does do this in version 4.6.2 and higher.  What version of Photo Mechanic are you running?

4.6.2.1  :-\

And you've added additional structured keywords with the Structured Keywords panel and they don't show up in the lr:hierarchicalSubject field?

-Kirk

Offline Lars

  • Member
  • **
  • Posts: 87
    • View Profile
    • DESGphoto / elementalSPORTS
Re: Strange bahaviour with the structured keywords
« Reply #6 on: December 02, 2009, 09:55:39 AM »
Lars,

Because if we don't do this, then every other program in existence besides Lightroom and Photo Mechanic won't see those keyword hierarchies.

hmm ok, but why does PM not write its hierarchy into the same XMP tag as Lightroom does (hierarchicalSubject)? I guess this would be the finest solution and you would prevent any conflicts with other programs.

It does do this in version 4.6.2 and higher.  What version of Photo Mechanic are you running?

4.6.2.1  :-\

And you've added additional structured keywords with the Structured Keywords panel and they don't show up in the lr:hierarchicalSubject field?

-Kirk


No no, this isn't the problem (but I haven't tested it yet  :-X). The problem is that PM adds the hierarchicalSubject content to the IPTC keywords in the case when the hierarchicalSubject was created by Lightroom. This causes the problems.

But when PM writes the hierarchicalSubject by itself, it doesn't make sense to write the content to the keywords, does it?

Lars

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25052
    • View Profile
    • Camera Bits, Inc.
Re: Strange bahaviour with the structured keywords
« Reply #7 on: December 02, 2009, 10:19:59 AM »
Lars,

Because if we don't do this, then every other program in existence besides Lightroom and Photo Mechanic won't see those keyword hierarchies.

hmm ok, but why does PM not write its hierarchy into the same XMP tag as Lightroom does (hierarchicalSubject)? I guess this would be the finest solution and you would prevent any conflicts with other programs.

It does do this in version 4.6.2 and higher.  What version of Photo Mechanic are you running?

4.6.2.1  :-\

And you've added additional structured keywords with the Structured Keywords panel and they don't show up in the lr:hierarchicalSubject field?

-Kirk


No no, this isn't the problem (but I haven't tested it yet  :-X). The problem is that PM adds the hierarchicalSubject content to the IPTC keywords in the case when the hierarchicalSubject was created by Lightroom. This causes the problems.

But when PM writes the hierarchicalSubject by itself, it doesn't make sense to write the content to the keywords, does it?

Yes, it does, for everyone that uses something other than Lightroom.  All other apps won't see those hierarchical keywords at all and that would indeed upset a lot of users.

-Kirk

Offline Lars

  • Member
  • **
  • Posts: 87
    • View Profile
    • DESGphoto / elementalSPORTS
Re: Strange bahaviour with the structured keywords
« Reply #8 on: December 02, 2009, 10:39:31 AM »
Kirk,

sorry, but I don't understand this! Maybe we are talking about different things:

- Lightroom uses the hierarchicalSubject for the hierarchical keywords
- PM uses the hierarchicalSubject for the hierarchical keywords, as well

As far as I understood the definition then the keywords contain all nodes and leafs of the hierarchicalSubject. For example:

hierarchicalSubject - "Sport > Athlet > Germany > GER > Claudia Pechstein" will become and written as single lined
keywords -> "Sport, Athlet, Germany, GER, Claudia Pechstein"

This makes sense, but PM writes:

Sport, Athlet, Germany, GER, Claudia Pechstein, Sport > Athlet > Germany > GER > Claudia Pechstein

That doesn't make a real sense, because all leafs and nodes are already contained as keywords.
You wrote that other problems uses this to interpret this for the keyword hierarchy. But which program interprets "Sport > Athlet > Germany > GER > Claudia Pechstein" as a keyword hierarchy, when it is only written as a single keyword XMP tag?

As far as I know the hierarchicalSubject and/or the keyword-trees are more or less Adobe proprietary (but commonly used today).
So I would assume that programs that are able to handle keyword hierarchies are able and willing to read the hierarchicalSubject, too.

What do you think?

Lars

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25052
    • View Profile
    • Camera Bits, Inc.
Re: Strange bahaviour with the structured keywords
« Reply #9 on: December 02, 2009, 11:54:26 AM »
Lars,

sorry, but I don't understand this! Maybe we are talking about different things:

- Lightroom uses the hierarchicalSubject for the hierarchical keywords
- PM uses the hierarchicalSubject for the hierarchical keywords, as well

As far as I understood the definition then the keywords contain all nodes and leafs of the hierarchicalSubject. For example:

hierarchicalSubject - "Sport > Athlet > Germany > GER > Claudia Pechstein" will become and written as single lined
keywords -> "Sport, Athlet, Germany, GER, Claudia Pechstein"

This makes sense, but PM writes:

Sport, Athlet, Germany, GER, Claudia Pechstein, Sport > Athlet > Germany > GER > Claudia Pechstein

That doesn't make a real sense, because all leafs and nodes are already contained as keywords.
You wrote that other problems uses this to interpret this for the keyword hierarchy. But which program interprets "Sport > Athlet > Germany > GER > Claudia Pechstein" as a keyword hierarchy, when it is only written as a single keyword XMP tag?

As far as I know the hierarchicalSubject and/or the keyword-trees are more or less Adobe proprietary (but commonly used today).
So I would assume that programs that are able to handle keyword hierarchies are able and willing to read the hierarchicalSubject, too.

We had structured keywords before Adobe 'invented' hierarchicalSubject.  If we don't write the hierarchical (structured keywords in our terminology) keywords into the regular keywords field then there are apps that won't see them.  For instance, there are apps out there that don't know anything about XMP at all.  The IPTC data structure doesn't have any way to represent hierarchical keywords in its own field at all.  Thus the need to put hierarchical keywords into the keywords field.

Having an option to leave hierarchical keywords out of the standard keywords field will solve your problem with Lightroom and people who need to have the hierarchy available to all existing applications will not use this new feature.

Everyone should be happy then, no?

-Kirk

Offline Lars

  • Member
  • **
  • Posts: 87
    • View Profile
    • DESGphoto / elementalSPORTS
Re: Strange bahaviour with the structured keywords
« Reply #10 on: December 02, 2009, 12:02:04 PM »
We had structured keywords before Adobe 'invented' hierarchicalSubject. 

oh, sorry  ::)

Having an option to leave hierarchical keywords out of the standard keywords field will solve your problem with Lightroom and people who need to have the hierarchy available to all existing applications will not use this new feature.

Everyone should be happy then, no?

that's absolutely true and everything would be fine.
Thank you Kirk for your support!


best regards,
Lars