[redland-dev] Possible issue with Python binding, XMLLiterals

Danny Ayers danny.ayers at gmail.com
Thu May 12 22:26:57 BST 2005


I'm tired enough to miss something obvious (no change), but am getting
escaping where I didn't expect:

----------source-------------------

from RDF import Uri, Model, Node, Statement

model = Model()

subject = Node(Uri("http://example.org"))
predicate = Node(Uri("http://example.org/prop"))
object = Node(literal="<tag>content</tag>", is_wf_xml=1)

model.append(Statement(subject,predicate,object))

print model.to_string()

-----output------------------------

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about="http://example.org">
    <ns0:prop xmlns:ns0="http://example.org/"
rdf:datatype="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral">&lt;tag&gt;content&lt;/tag&gt;</ns0:prop>
  </rdf:Description>
</rdf:RDF>

----------------------
(using build from CVS a couple of weeks ago)

That isn't right, is it..?

Cheers,
Danny.

-- 

http://dannyayers.com


More information about the redland-dev mailing list