RDFLib/rdflib — Issue #171: Serialisation format "rdf/xml" does not exist
Author: gjhiggins
Created: 2012-02-20 08:34:20+00:00
State: open

p.j.a.c...@gmail.com, 2011-08-24T05:55:36.000Z

What steps will reproduce the problem?
1. Observed example on http://code.google.com/p/rdflib/wiki/FAQ which uses:

myGraph.serialize(target_rdfxml, format="rdf/xml")

2. Try running the short script below

from rdflib.graph import Graph
g = Graph()
g.parse("http://www.w3.org/2000/10/rdf-tests/rdfcore/ntriples/test.nt", format="nt")
print g.serialize(format="rdf/xml")

What is the expected output? What do you see instead?

Traceback (most recent call last):
File "make_rdf.py", line 5, in
print g.serialize(format="rdf/xml")
File "/Library/Python/2.7/site-packages/rdflib/graph.py", line 679, in serialize
serializer = plugin.get(format, Serializer)(self)
File "/Library/Python/2.7/site-packages/rdflib/plugin.py", line 91, in get
raise PluginException("No plugin registered for (%s, %s)" % (name, kind))
rdflib.plugin.PluginException: No plugin registered for (rdf/xml, )

What version of the product are you using? On what operating system?

rdflib 3.1.0 (installed from source)
Max OS X 10.7 Lion
Python 2.7 (Apple provided)

Please provide any additional information below.

The alternative format of "xml" works and looking at the code it seems to give rdf/xml
http://code.google.com/p/rdflib/source/browse/rdflib/plugin.py

Comment 1 by gromgull
this was an error on the wikipage - I've corrected it.

(none of the other formats are available as rdf/X either, i.e. no rdf/n3, etc.)