Closed GoogleCodeExporter closed 8 years ago
Good catch. The PrettyXMLSerializer code is explicit about this (mis)behaviour:
if isinstance(subject, BNode):
def subj_as_obj_more_than(ceil):
return more_than(store.triples((None, None, subject)), ceil)
#here we only include BNode labels if they are referenced
#more than once (this reduces the use of redundant BNode identifiers)
if subj_as_obj_more_than(1):
writer.attribute(RDF.nodeID, fix(subject))
and this produces exactly the disconnect that you are seeing.
Just to confirm: this issue is restricted to the output of PrettyXMLSerializer
- choose any serialization other than pretty-xml and you will be able to parse
it back into a properly-connected graph.
IMO, it's a false economy and could usefully be dispensed with.
Original comment by gjhigg...@gmail.com
on 24 Oct 2011 at 5:55
Fixed in changeset 3ddb26ab8f4f - check for BNode references > 1 commented out.
Original comment by gjhigg...@gmail.com
on 26 Oct 2011 at 2:34
Original issue reported on code.google.com by
jman...@gmail.com
on 13 Aug 2011 at 12:28