Dynamic format of Tag depending on number of items

Started by IanMcP, December 01, 2015, 03:13:06 AM

Previous topic - Next topic

IanMcP

Hi,

I am writing user-specifiied tags from a custom config file into Adobe Illustrator files as part of a workflow.

Some tags have already been defined as Bag / List format i.e.

geography => { List => 'Bag' }

I have been asked if any field could be flat structure if only one item exists or List structure if multiple items exist.

I realise:
• The difference is academic when reading the metadata back in, if a single item is in a list
• The structure of the tag has to be set up-front in the Config file
• It adds complexity to the script handling the inputs and writing of the metadata

Is the only option to alter the Config file depending on the inputs? Is there an alternative format for the tag or a way of writing the data that will allow the structure to adapt?

Thanks for your help

Ian


Hayo Baan

Phil might have to get back on this (he is away for a coup,e of days), but I don't think this is possible. Something is either a collection or a single item. Not both, depending on its content.

What are you trying to achieve by this anyway? Perhaps there is a different solution for your issue.
Hayo Baan – Photography
Web: www.hayobaan.nl

IanMcP

The artwork file that the workflow is processing could be the artwork for a single item or it could be a family shot or line-up of several products.

In the case of 1 product, the metadata would be:
<nameSpace:barcode>0000000000000</nameSpace:barcode>

In the case of multiple products it would be:
<nameSpace:barcode>
   <rdf:Bag>
    <rdf:li>0000000000000</rdf:li>
    <rdf:li>0000000000001</rdf:li>
   </rdf:Bag>
  </nameSpace:barcode>


Thanks

Phil Harvey

I don't think it would be proper XMP if you changed the storage format based on the number of items.  If there is only one item with a possibility of more, it should still be stored in a Bag.  I think it would be wrong to do otherwise, and ExifTool wouldn't support this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

IanMcP

Thanks for the definitive answer, Phil. I don't think the person writing the spec was the one having to deal with both scenarios on the client side!
We will go with List item if there is a possibility of being more than one

Cheers

Ian