Framework metadata

Nicolás Alvarez nicolas.alvarez at gmail.com
Thu Dec 19 22:50:43 UTC 2013


2013/12/19 Aurélien Gâteau <agateau at kde.org>:
> On Thu, 19 Dec 2013 12:13:08 +0200, Giorgos Tsiapaliokas wrote:
>> I definitely like the idea but I don't like xml/rdf. Why don't we just
>> use json?
>
> Because DOAP is an existing format, so it avoids reinventing the wheel.

Everyone please keep in mind that DOAP is not an XML format, it's an
RDF format which is often serialized with RDF/XML, and there are many
ways to specify the same RDF graph in RDF/XML.

Assuming appropriate namespace declarations, all these are equivalent:

<doap:Project rdf:about="#threadweaver">
  <doap:name>ThreadWeaver</doap:name>
  <doap:shortdesc>ThreadWeaver is a helper for multithreaded
programming</doap:shortdesc>
</doap:Project>


<rdf:Description rdf:about="#threadweaver">
  <rdf:type>http://usefulinc.com/ns/doap#Project</rdf:type>
  <doap:name>ThreadWeaver</doap:name>
  <doap:shortdesc>ThreadWeaver is a helper for multithreaded
programming</doap:shortdesc>
</rdf:Description>


<rdf:Description rdf:about="#threadweaver">
  <rdf:type>http://usefulinc.com/ns/doap#Project</rdf:type>
</rdf:Description>
<rdf:Description rdf:about="#threadweaver">
  <doap:name>ThreadWeaver</doap:name>
</rdf:Description>
<rdf:Description rdf:about="#threadweaver">
  <doap:shortdesc>ThreadWeaver is a helper for multithreaded
programming</doap:shortdesc>
</rdf:Description>

And this is just a simple example with literal strings, I didn't even
add references to other resources (as it would be needed for
doap:maintainer). To parse it you *really* need an RDF library, not
just an XML parser. Do we really want this complexity?

-- 
Nicolás


More information about the Kde-frameworks-devel mailing list