XSD schema for xml output

Started by Archive, May 12, 2010, 08:54:29 AM

Previous topic - Next topic

Archive

[Originally posted by dinomir on 2009-01-08 12:44:56-08]

I would like to know if there are xsd schemas avaialble for the xml formatted output provided by exiftool.
Cheers
Martin

Archive

[Originally posted by exiftool on 2009-01-08 13:16:33-08]

Hi Martin,

There is no XSD currently available.  If I understand XSD's, I
would have to include a definition for all tags extracted by
exiftool.  Currently there are 6283 pre-defined tags, which
would lead to a rather lengthy document.  But there are two
more serious problems: 1) ExifTool will output some tags which
have not been pre-defined, and 2) the same tag may sometimes
contain a list, and sometimes not.  If you know any way
around these problems, let me know.  I'm not an XSD expert.

- Phil

Archive

[Originally posted by dinomir on 2009-01-08 15:23:15-08]

Hi Phil,
thanks for your answer.
Well, the fact that the document would be lenghty is not such a problem. BUt what ydo you mean by tags that have not been pre-defined?
Regarding the list - could you give me an example? You can have a list with a single element... Or it can always be specified as a String with some sort of delimitation.

I have tried to reverse engineer the xsd from some of the xmls I extracted for my images. I could send you the results if I get to anything sensible, if that would help.

Cheers
Martin

Archive

[Originally posted by exiftool on 2009-01-08 16:07:59-08]

Hi Martin,

By pre-defined, I mean the tags defined in the ExifTool tag name documentation.
With XMP tags (and some other formats), exiftool will extract any tag that
exists, even if it isn't one of the recognized tags in the documentation.
Also, exiftool will extract unknown tags from EXIF and some other formats
if the -u option is used.

Here is an example of what I was talking about with the list problem:

Code:
> exiftool a.jpg -X -keywords
<?xml version='1.0' encoding='UTF-8'?>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>

<rdf:Description rdf:about='a.jpg'
  xmlns:et='http://ns.exiftool.ca/1.0/' et:toolkit='Image::ExifTool 7.61'
  xmlns:IPTC='http://ns.exiftool.ca/IPTC/IPTC/1.0/'>
 <IPTC:Keywords>one</IPTC:Keywords>
</rdf:Description>
</rdf:RDF>

> exiftool a.jpg -keywords+=two
    1 image files updated

> exiftool a.jpg -X -keywords
<?xml version='1.0' encoding='UTF-8'?>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>

<rdf:Description rdf:about='a.jpg'
  xmlns:et='http://ns.exiftool.ca/1.0/' et:toolkit='Image::ExifTool 7.61'
  xmlns:IPTC='http://ns.exiftool.ca/IPTC/IPTC/1.0/'>
 <IPTC:Keywords>
  <rdf:Bag>
   <rdf:li>one</rdf:li>
   <rdf:li>two</rdf:li>
  </rdf:Bag>
 </IPTC:Keywords>
</rdf:Description>
</rdf:RDF>

Also, I did a bit more reading about XSD.  There could also be problems if
it relies on a specific tag order, or if it can't tolerate missing tags.

If you come up with something that works for you, I would like
to see it.

- Phil

Archive

[Originally posted by exiftool on 2009-01-08 16:12:29-08]

Also, I should point out that there are various options that
affect the formatting of the -X output.  The list
problem may be avoided by using -s or -sep,
but note that -s changes the format substantially.

- Phil