Main Menu

Multiple xmp-dc dates

Started by ww408, October 22, 2024, 05:17:16 PM

Previous topic - Next topic

ww408

ChatGPT:

QuoteYou can include multiple dates in the `xmp-dc:Date` field, but it must be done according to how XMP and the Dublin Core schema handle lists. The `dc:date` field in XMP allows for an array (or sequence) of dates, but this needs to be formatted as a sequence in RDF (Resource Description Framework) syntax.

How to Add Multiple Dates in `xmp-dc:Date`
When adding multiple dates in the `xmp-dc:Date` field, you need to specify them as a sequence (list) using the appropriate RDF format. This is often done through a structured XMP file or using an advanced metadata editing tool that supports arrays.

Adding Multiple Dates with ExifTool
Unfortunately, ExifTool does not directly support adding arrays or sequences of values for a single field using a basic command-line option. However, you can achieve this by embedding an XMP metadata block that includes multiple dates.

Example RDF Syntax for Multiple Dates
If you want to add multiple dates, the `dc:date` field should look like this within the XMP block:

<x:xmpmeta xmlns:x="adobe:ns:meta/">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/">
         <dc:date>
            <rdf:Seq>
               <rdf:li>2024-10-22</rdf:li>
               <rdf:li>2023-09-15</rdf:li>
            </rdf:Seq>
         </dc:date>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>

This creates a sequence (`rdf:Seq`) of two dates, which tools that interpret XMP will recognize as an array of values.

What If You Still Want to Use ExifTool?
Unfortunately, ExifTool doesn't natively support setting multiple values for a single `xmp-dc:Date` field using a simple command, like:

exiftool -XMP-dc:Date="2024-10-22" -XMP-dc:Date="2023-09-15" YourFile.pdf

This will simply overwrite the previous date value instead of creating an array.

Alternative Solution: Use a More Advanced XMP Editor
If you need to embed multiple dates, you might need to:
1.
  • Manually edit the XMP metadata by creating an XMP file with multiple date entries in the sequence, as shown above.
  • Use a tool like Adobe Acrobat Pro or other XMP-aware tools that allow editing of metadata arrays.

Conclusion
You can't add multiple dates in `xmp-dc:Date` using a simple command in ExifTool because ExifTool doesn't support adding arrays to the `xmp-dc:Date` field. You would need to use RDF syntax or another tool that supports array metadata to embed multiple dates properly.

FrankB

Have you tried -XMP-dc:Date+="2011:01:01 13:45:07"?

+= in stead of =

ww408

QuoteIt sounds like when you used += to append dates to a tag in the PDF file, ExifTool treated the values as part of a single string and separated them with a comma, rather than creating multiple distinct entries.

This behavior is expected because the tag you're modifying (likely something like UserComment or a similar text-type field) is not a list-type tag—it treats the appended data as part of the same string rather than individual items in a list.