Flattening XMP to get at IPTC properties via XSLT?

Started by michaelediteur, January 12, 2013, 05:43:18 PM

Previous topic - Next topic

michaelediteur

Hello all,

As this is my first post and I'm not a photography expert, please bear with me.

I'm interested in extracting XMP from digital photo files and producing XML files from the XMP where the properties, especially the IPTC Core and Extension, but also a couple of other XMP namespaces, appear in XML elements in a predictable way (i.e. without the variations in syntax allowed by the XMP version of RDF/XML).

The end goal is to transform the IPTC C&E properties into another data format using an XSLT so hence the need for consistent XPATHs in the input files.

Has anyone done this? Can you point me towards a tool or procedure that will make this doable for batches of files?

Many thanks! :)

Michael Hopwood
Linked Heritage Project Lead
EDItEUR

http://www.linkedheritage.org/
http://editeur.org/

Phil Harvey

Hi Michael,

I'm not sure I understand exactly what you are looking for, but I can think of 2 ways off the top of my head to produce output with a consistent XML format:

1) Use ExifTool to touch the XMP -- this will reformat it to a consistent format.

2) Use the ExifTool -X output.  This is RDF/XML, but not the same as XMP.  You have control with this option to format the output in a few different ways.

- 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 ($).