File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99import warnings
1010
1111from io import StringIO
12+
13+ import rdflib
1214from rdflib import __version__ as rdflib_version
1315from rdflib import Graph , Literal , URIRef
1416from rdflib .graph import Seq
@@ -550,10 +552,11 @@ def parse_property(self, prop_uri):
550552
551553 if rdflib_version_major () >= 6 :
552554 # rdflib version 6.x.x+ should support rdf:_nnn only, RDF.li
553- # is not supported
554- print (elems )
555- for curr_val in elems [0 ].items ():
556- prop_attrs [attr [0 ]].append (curr_val .toPython ())
555+ # are not supported; reverse import the blank node values;
556+ # hopefully in the correct order.
557+ val_seq = Seq (graph = self .graph , subject = elems [0 ])
558+ for seq_item in val_seq :
559+ prop_attrs [attr [0 ]].append (seq_item .toPython ())
557560 else :
558561 # rdflib does not respect order with RDF.li items yet, see comment above
559562 # support both RDF.li and rdf:_nnn for now.
You can’t perform that action at this time.
0 commit comments