Re: [Tracker] Handling arrays in XMP



On Mon, 2007-06-25 at 16:35 -0700, Jason Kivlighn wrote:
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.

Jamie and others, what do you think?

Jon

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

  

-- 
Jon Phillips

San Francisco, CA
USA PH 510.499.0894
jon rejon org
http://www.rejon.org

MSN, AIM, Yahoo Chat: kidproto
Jabber Chat: rejon gristle org
IRC: rejon irc freenode net




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