LOC's MIX (v2) XML metadata (ANSI/NISO Z39.87-2006)

Started by dougpeterson, August 05, 2024, 04:32:18 PM

Previous topic - Next topic

dougpeterson

Good evening.

First, thanks to the community that makes, maintains, and supports EXIFTool. What a wonderful tool without which so many of us developers would be utterly lost.

I would like to implement the Library of Congress MIX (v2) implementation of the ANSI/NISO Z39.87-2006 standard.

It defines (starting bottom page 81) some specific metadata fields such as "performanceData" as part of a hierarchy of fields under the top entry of "Target Data" that are very important in heritage digitization (the modern term for scanning paper/books/film/photos at a library, museum, or archive).

While I'm relatively facile at EXIF Tool for basic tasks, I can't for the life of me figure out how to read/write these MIX fields using EXIF Tool and would be much obliged to any help from the community here! Do I need to define custom fields using a config file? Can I not just write a MIX file as-is into the TIFF?

I have attached for easy reference:
- Mix.xsd defining the fields and hierarchy (from loc.gov/standards/mix/)
- test_mix10.xml, the official MIX example file (from loc.gov/standards/mix/)
- test_mix10_reduced.xml, my shortening to the fields I care about
- a relevant TIFF just to have an example of a file I would want to encode with the example; nothing special about this tiff, just thought I'd include for completeness

Any help is much appreciated!

Phil Harvey

First, ExifTool doesn't write XML.  It is far too much of a hairball.  But if you can compose the XML then ExifTool could perhaps inject it into a file for you.

Second, offhand I don't know where the MIX information is stored in a TIFF file, and I don't have much time right now to look into this.  If you have an example TIFF containing MIX it would be helpful.

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

StarGeek

#2
Quote from: Phil Harvey on August 05, 2024, 06:01:57 PMSecond, offhand I don't know where the MIX information is stored in a TIFF file, and I don't have much time right now to look into this.  If you have an example TIFF containing MIX it would be helpful.

While looking over the docs for this, I didn't see any examples of actually embedding the data in the files.

A lot of the entries match standard EXIF and other tags.

For what it's worth, exiftool didn't recognize either of the attached XML files as XML, only as plain text.

* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

dougpeterson

Thanks to both of you for your time.

As far as I know this standard has never been implemented in an embedded-into-output form. But I am part of an organization of heritage institutions that is looking to do just that. So unfortunately there's no existing practice to follow/mirror. But that does mean the sky is the limit!

I'd be open to suggestions on where you think a sensible location within the TIFF structure would be for injecting the XML, but this question is outside the wheelhouse of EXIFTool support forum so I'm not offended if you're not able to offer such advice.

StarGeek

There isn't a standard tag to embed such information. You would have to either repurpose an existing tag or create a new one.

Creating a new one would have more flexibility, but has the downside that it won't be readable by most software. And repurposing an existing one means you can't use that tag for its intended purpose if needed.

You wouldn't want to create it in EXIF or IPTC, those formats are too limiting and they would require a config file to extract with the correct name. An XMP tag would at least include the tag name as part of the saved data.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).