The Accidental Namespace Conflict

Started by alexlyman, January 06, 2017, 05:24:45 PM

Previous topic - Next topic

alexlyman

I've created a custom File Info panel for my team's Adobe applications to simplify data entry in our daily work. I've come to learn that somewhere during periodic maintenance, I added an error in my namespace prefix registration. The result is a namespace schema URI mismatch error when I try to use Exiftool to update a tag that was originally written with the older namespace URI. One letter difference, one huge problem when I try to update 30,000 files that had tags written before the URI mistake was added.

what was
xmlns:vcsPG="http://vcs.[mywebsitename].com/proposal"
changed to
xmlns:vcsPG="http://vcs.[mywebsitename].com/proposals"

Is there an easy way to find files with the old URI?
I can't find a way to dump the entire contents of <rdf:RDF></rdf:RDF> portion of my illustrator files (for searching my files using a database). If I could do this, I have the tools needed to save all of my tags/tag contents for all of my files in a database, erase all of the metadata, and rewrite it using the correct URI.

A better solution would to use EXIFtool to find files that use the old namespace URI, then replace the URI with the new. Can this be done?

What other alternatives can you image for solving this problem? Maybe there is a much simpler way that I've not considered.
Thanks

Phil Harvey

If there is a single tag you can search for, then you can create a user-defined tag with a different name for this tag and do a quick search for all files with this information.  The command would look like this:

exiftool -if "defined $sometag" <do something> -r DIR

where "<do something>" could be to report the filename (-filename) or move the file to a new directory (-directory=some_directory) or something else.

Or, I just thought of another way to do this without the need for a user-defined tag:

exiftool -if "$xmp =~ m(http://vcs.[mywebsitename].com/proposal\b)" -b -p "$filename" -r DIR

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