Datetime integers and literals in RDF XML

I started playing with triplestores and RDF to store image metadata, but I can't figure out how to put integer values ​​in RDF / XML.

<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:exif="http://penkov.me/exif/">
  <rdf:Description rdf:about="http://penkov.me/images/0">
    <exif:SourceFile>./205CANON/_MG_0538.CR2</exif:SourceFile>
    <exif:Make>Canon</exif:Make>
    <exif:FocalLength>50</exif:FocalLength>
  </rdf:Description>
</rdf:RDF>

I think the 50tag <exif:FocalLength>will be treated as a string by a triplestor, and it would be impossible to make range queries regarding this value.

+3
source share
1 answer

Easy (but detailed):

<exif:FocalLength rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">50</exif:FocalLength>

See this section in the RDF / XML specification.

+5
source

All Articles