Skip to content

Only output one <rdf:Description> for each node

Zoggy requested to merge flh:xml_output_single_rdfdescription into master

Created by: flh

The following RDF/XML part:

  <rdf:Description rdf:about="http://zoggy.github.io/ocaml-rdf/">
    <dc:title>OCaml-RDF</dc:title>
  </rdf:Description>
  <rdf:Description rdf:about="http://zoggy.github.io/ocaml-rdf/">
    <dc:description>
      OCaml-RDF is an OCaml library to manipulate RDF
      graphs and execute Sparql queries.
    </dc:description>
  </rdf:Description>

describes exactly the same graph as:

  <rdf:Description rdf:about="http://zoggy.github.io/ocaml-rdf/">
    <dc:title>OCaml-RDF</dc:title>
    <dc:description>
      OCaml-RDF is an OCaml library to manipulate RDF
      graphs and execute Sparql queries.
    </dc:description>
  </rdf:Description>

The latter is less verbose, more idiomatic and more human-readable. This patch changes Rdf_xml.output so that only one <rdf:Description> is created for each subject node in the graph.

Merge request reports