Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate bnode when parsing rdf:Collection in specific order #392

Open
ericprud opened this issue Feb 14, 2022 · 0 comments
Open

duplicate bnode when parsing rdf:Collection in specific order #392

ericprud opened this issue Feb 14, 2022 · 0 comments

Comments

@ericprud
Copy link

An optimally-ordered list of N-Triples:

_:b2 <http://www.w3.org/ns/shex#valueExpr> _:b3 .
_:b3 <http://www.w3.org/ns/shex#values> _:b9 .
_:b9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "p1" .
_:b9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b10 .
_:b10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
_:b10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .

is recognized as an rdf:Collection:

[] ns0:valueExpr [ ns0:values (
     "p1"
     "c"
   ) ] .

but moving the _:b10 triples to the top:

_:b10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "c" .
_:b10 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
_:b2 <http://www.w3.org/ns/shex#valueExpr> _:b3 .
_:b3 <http://www.w3.org/ns/shex#values> _:b9 .
_:b9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "p1" .
_:b9 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b10 .

yields a duplicate reference into the list:

_:genid1
  rdf:first "c" ;
  rdf:rest ( ) .

[] ns0:valueExpr [ ns0:values (
     "p1"
     "c"
   ) ] .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant