Attribute et:encoding not permitted in RDF-XML output

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

Previous topic - Next topic

Archive

[Originally posted by atvonk on 2009-02-27 19:24:12-08]



Using ExifTool v7.67 on a Windows Vista machine under Perl v5.10.0, I generated RDF/XML output for the Santana song Se a Cab&oacute.
I fed this output into the http://www.w3.org/RDF/Validator/" target="_blank"> RDF validator. It generated the following error:

Code:

Error: {E201} The attributes on this property element, are not permitted with any content;
expecting end element tag.[Line = 27, Column = 61]

The relevant lines in the RDF/XML file are (numbers are not part of original XML):

Code:

26:  <ASF:MCDI et:encoding='base64'>
27: QQArADkANgArADMANgAxAEYAKwA2ADgAOABGACsAQgAyAEUAQQArADEAMAA1
28: AEEAMQArADEAMwAzADcANgArADEANgBEADcARgArADEAQgA5ADIAOQArADEA
29: RgAzADMAMAArADIAMgA1ADUAMwArADIANgAzADUAOQAAAA==
30: </ASF:MCDI>

After some research, I found that the attribute et:encoding is not permitted for any RDF literal. However, a typed literal is permitted using rdf:datatype, using the XML builtin datatype base64Binary. So, anyway, this is my code change for exiftool.bat:

Code:

1126c1126
<                             $enc = " rdf:datatype='$enc'";          #ATV
---
>                             $enc = " et:encoding='$enc'";
1135c1135
<                         $xtra .= " rdf:datatype='$enc'";            #ATV
---
>                         $xtra .= " et:encoding='$enc'";
1607c1607
<         return 'http://www.w3.org/2001/XMLSchema#base64Binary';   #ATV
---
>         return 'base64';

And thank you, Phil, for your wonderful tool.

Alexander Vonk

Archive

[Originally posted by exiftool on 2009-02-28 12:11:09-08]

Hi Alexander,

Thanks for letting me know about this.  I can't understand why
'et:encoding' wouldn't be permitted because it is in the exiftool
namespace so there shouldn't be any conflict.  However, following
the standard RDF technique to do this would be better.  I will look
into this.

- Phil

Archive

[Originally posted by atvonk on 2009-03-02 05:10:11-08]

Hi Phil,

According to the RDF syntax (see e.g.
http://www.w3.org/TR/rdf-syntax-grammar/#section-Infoset-Grammar" target="_blank">RDF/XML grammar),
an attribute of the exiftool namespace is not permitted for a literal (via 7.2.16
literalPropertyElt
, I think), only certain listed rdf namespace attributes are allowed, most notably rdf:datatype.

Also, please note that the only element that can retain a property attribute (such as et:encoding is a node element, which cannot have a text value itself, only property elements (see rule 7.2.11).

Kind regards, Alexander Vonk

Archive

[Originally posted by exiftool on 2009-03-02 11:12:22-08]

Hi Alex,

Thanks for pointing this out.  I see this now.  Pity.
It looks like I made the wrong choice in using
RDF/XML for this output.

- Phil