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

rdflib Turtle output defines illegal _9 prefix #161

Closed
ghost opened this issue Feb 20, 2012 · 0 comments
Closed

rdflib Turtle output defines illegal _9 prefix #161

ghost opened this issue Feb 20, 2012 · 0 comments
Labels
bug Something isn't working in-resolution

Comments

@ghost
Copy link

ghost commented Feb 20, 2012

felik...@gmail.com, 2011-07-11T10:44:42.000Z

What steps will reproduce the problem?

I used rdfpipe to convert an n3 file to turtle format, resulting in the following:

@prefix _9: <http://data.linkedmdb.org/resource/movie/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<http://data.linkedmdb.org/resource/director/1> a
<http://data.linkedmdb.org/resource/movie/director>;
    rdfs:label "Cecil B. DeMille (Director)";
    _9:director_name "Cecil B. DeMille" .

However, _9 is not a valid prefix according to the standard:
See http://www.w3.org/TeamSubmission/turtle/#sec-grammar

[26]    nodeID  ::=     '_:' name
[27]    qname   ::=     prefixName? ':' name?
[33]    prefixName      ::=     ( nameStartChar - '_' ) nameChar*

so _9: is illegal

Either

_:BNode

or

abc_def:local

but not a leading _ for a prefix name.

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

$ rdfpipe --version
rdfpipe (using rdflib 3.0.0)

any feedback can be sent to feliksik AT gmail DOT com

Comment 1 by gromgull

Just to clarify, the problem here is that the namespace prefixes we generate ourselves are all ns1,ns2,etc. This problem occurs when the parsed file already contains prefixes like _9 - and they are not checked when producing turtle.

I imagine similar bugs may exist for all serialisations that allow prefixes.

ghost pushed a commit that referenced this issue Mar 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in-resolution
Projects
None yet
Development

No branches or pull requests

1 participant