Re: [Tracker] Handling arrays in XMP



As far as I can tell, Tracker only does a one to one mapping of keys to
values.  For example, there can only be one value for DC:Title.

For the dc:subject example, I'm talking about how to index this
example.  I can only have one value mapped to DC:Subject in the
database, so I'm wondering if I should just separate each array item
with a comma and then store that as the DC:Subject value.

Jon Phillips wrote:
On Mon, 2007-06-25 at 10:53 -0700, Jason Kivlighn wrote:
  
Hi all,

I'm handling reading sidecar XMP, and wanted to know what people thought
about handling arrays in XMP.  i.e.:

  <dc:subject>
    <rdf:Bag>
      <rdf:li>keyword 1</rdf:li>
      <rdf:li>another keyword</rdf:li>
    </rdf:Bag>
   </dc:subject>

This would be added to the DC:Subject field.  Is it reasonable to
represent the array as a comma-separated list of items, as in "keyword
1, another keyword".
    

Are you talking more about UI so that one could enter a CSV string and
then it would appear witht eh rdf bag example above?

  
Also, there's the case of multiple values, where each represents the
value in a particular language.  i.e.:

  <dc:title>
    <rdf:Alt>
      <rdf:li xml:lang="x-default">Extensible Metadata Platform</rdf:li>
      <rdf:li xml:lang="it-IT">Piattaforma Estendibile di Metadata</rdf:li>
    </rdf:Alt>
   </dc:title>

Should I try reading the current locale and add based on that?  If the
language isn't matched, it would use the value of "x-default".  Or maybe
both x-default and the  locale match could be added, comma-separated?

Cheers,
    

I think best approach would be to not lose ANY data from a sidecar file
in case one changed languages, etc.

Jon

  




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]