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

Bug report: Turtle serializer #1

Open
davidgovea opened this issue Aug 5, 2011 · 1 comment
Open

Bug report: Turtle serializer #1

davidgovea opened this issue Aug 5, 2011 · 1 comment

Comments

@davidgovea
Copy link

The turtle serializer is not returning the proper value for typed literals.

Example to replicate problem:

var graph, serialized,
    turtle = '    \
@prefix foaf: <http://xmlns.com/foaf/0.1/> .    \
@prefix test: <http://david/> .                 \
                                                \
test:me a foaf:Person;                          \
    foaf:age 9001 .                             \
';

rdf.parseTurtle(turtle, function(g){
    graph = g;
});
serialized = rdf.turtle(graph);

The resulting output:

@prefix foaf: <http://xmlns.com/foaf/0.1/> . 
@prefix test: <http://david/> . 
test:me a foaf:Person; 
    foaf:age undefined .

And here is the output of rdf.nt(graph):

<http://david/me> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> . 
<http://david/me> <http://xmlns.com/foaf/0.1/age> "9001"^^<http://www.w3.org/2001/XMLSchema#integer> .

On parsing, the Literal is typed properly, but the turtle serializer does not return the expected result.

@davidgovea
Copy link
Author

This also occurs with boolean values.

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