Yes, "file" tag looks redundant, as the file info will get repeated in the File group. "item" seems okay. or maybe "token", but token is a
datatype in W3C XSD. I don't know whether that can be the reason for not using it.
Or probably, root element can be given the name "metadatas" (plural) and the individual file elements as "metadata" (singular), with an attribute giving directory and filename concatenated.
Some examples:
exiftool a.jpg -keywords -X
<?xml version='1.0' encoding='UTF-8'?>
<metadatas toolkit='Image::ExifTool 7.47'>
<metadata fileref='images/a.jpg'>
<tag name='Keywords'>a</tag>
<tag name='Keywords'>b</tag>
</metadata>
</metadatas>
<?xml version='1.0' encoding='UTF-8'?>
<metadatas toolkit='Image::ExifTool 7.47'>
<metadata fileref='images/a.jpg'>
<group name='IPTC' family='1'>
<tag>
<name>Keywords</name>
<value>a</value>
<value>b</value>
</tag>
</group>
</metadata>
</metadatas>
<?xml version='1.0' encoding='UTF-8'?>
<metadatas toolkit='Image::ExifTool 7.47'>
<metadata fileref='a.jpg'>
<group name='File' family='0'>
<tag name='FileName'>images/a.jpg</tag>
</group>
<group name='IPTC' family='0'>
<tag name='Keywords'>a</tag>
<tag name='Keywords'>b</tag>
</group>
</metadata>
<metadata fileref='images/b.jpg'>
<group name='File' family='0'>
<tag name='FileName'>b.jpg</tag>
</group>
<group name='IPTC' family='0'>
<tag name='Keywords'>one</tag>
</group>
</metadata>
</metadatas>
The container for file seems logical since individual file info has to be grouped under some element.
List-type tags seem alright to me. I think list items look fine on the same node level as other elements, without any preference given to the order of individual list elements. Maybe an attribute could be added for such elements like list='true'.
Actually, I am a little doubtful about the very short format. I was wondering whether a single keyword can contain commas? Maybe a keyword like "Virginia, Illinois" (since there's also "Virginia, SomeOtherPlace")... If so, then such a keyword will break into 2 keywords, in the very short output format. And list-items can't be put into 2 attributes, since duplicate attributes are not allowed, again atleast according to
W3C specs. But I think it should be okay for the very short format.
...In the current tab-delimited and HTML output also, it seems fine to separate them by commas. But for XML (apart from very short format), I think they should be separated in list format.
Well ... ... this is my/one viewpoint.
And yes, the options are quite overwhelming... :-)... but are sure worth it!
- Kailash