I am trying to get a value similar to the sample on Prism website into the URL field:
<prism:url platform="web">http://www.prismstandard.org</prism:url>
So, I tried this:
exiftool -XMP-prism:URL="{A-platform=web, Url=http://www.prismstandard.org}" test.pdf
Which resulted in the following:
<XMP-prism:URLA-platform>web</XMP-prism:URLA-platform>
<XMP-prism:URLUrl>http://www.prismstandard.org</XMP-prism:URLUrl>
But this looks nothing like what the specification endorses.
Moreover, the specification says: The attribute platform is optionally allowed for situations in which multiple URLs must be specified (http://www.prismstandard.org/specifications/3.0/PRISM_Basic_Metadata_3.0.htm#_Toc336960578 (http://www.prismstandard.org/specifications/3.0/PRISM_Basic_Metadata_3.0.htm#_Toc336960578)).
I understand that the attribute must not be allowed when only one URL is specified.
Also once I set the URL, I expect the following command to let me see the content:
exiftool -URL test.pdf
But this is not the case.
Am I missing something here? I am a bit of a novice when it comes to XML/RDF specs.
Thanks
I don't think you are missing anything. ExifTool currently doesn't support XMP qualifiers. It is only my list of things to do, but almost nobody uses them and it will be a real pain to implement.
- Phil
Thanks Phil.
I actually don't need the qualifier. I only need to set a single URL. Is there a way to force Exiftool to write the URL tag as a simple text field? This corresponds to the example offered by Prism:
<prism:url>http://www.time.com/time/specials/2007/article/0,28804,1660946_1661334_1661 288,00.html</prism:url>
Looking at the Prism 3.0 specification you linked, ExifTool is writing this correctly. The syntax you quoted that used the qualifier is XML, not XMP. The specification states that in XMP it should be a bag of structures, which is what ExifTool is writing.
- Phil
I see... (That's what I mean by being a novice.)
But for my own information, shouldn't I be able to obtain the content of that bag, once set, using exiftool -URL test.pdf
?
Moreover, is there a method to override the specification restrictions in some cases when setting values using exiftool? I have gone through many PDFs I have from a variety of publishers, and it seems the common practice is to set the URL tag as a simple text string. Actually, I don't have a single example of that sets it as a bag of structures.
To request the structures, you can do this:
exiftool -url -struct FILE
or to get a flattened list of just the URL's:
exiftool -urlurl FILE
You can override any of ExifTool's definitions with user-defined tags (https://exiftool.org/config.html)
- Phil
My bad. It actually says it in the header of the sample config file! I am frequently using that config file and I had never noticed that part of the header.
Thanks again.