[redland-dev] [Raptor RDF Parsing and Serializing Library 0000337]: raptor/turtle outputs invalid qnames which cause syntax errors on parsing
Mantis Bug Tracker
mantis-bug-sender at librdf.org
Fri Jan 29 17:28:35 CET 2010
The following issue has been SUBMITTED.
======================================================================
http://bugs.librdf.org/mantis/view.php?id=337
======================================================================
Reported By: sree
Assigned To:
======================================================================
Project: Raptor RDF Parsing and Serializing Library
Issue ID: 337
Category: api
Reproducibility: always
Severity: major
Priority: normal
Status: new
Syntax Name:
======================================================================
Date Submitted: 2010-01-29 16:28
Last Modified: 2010-01-29 16:28
======================================================================
Summary: raptor/turtle outputs invalid qnames which cause
syntax errors on parsing
Description:
When serializing data to turtle, Raptor incorrectly allows "." as part of
nameChar (AFAICT, "." is valid in XML and SPARQL, but not in Turtle. from
<http://www.w3.org/TeamSubmission/turtle/#sec-grammar-grammar>).
This produces qnames that may contain "." as their final character like
this triple:
<http://example.org> foaf:page dbpedia:Babylon_A.D. .
However, the lexer in turtle_lexer.c does not allow a "." as the last
character:
NCCHAR1 [A-Za-z\\\x80-\xff]
NCCHAR {NCCHAR1}|"-"|"_"|[0-9]
NCNAME_PREFIX {NCCHAR1}(({NCCHAR}|".")*{NCCHAR})?
NCNAME ("_"|{NCCHAR1})(({NCCHAR}|".")*{NCCHAR})?
QNAME {NCNAME_PREFIX}?":"{NCNAME}?
As a result, raptor parses only upto:
<http://example.org> <http://xmlns.com/foaf/0.1/page>
<http://dbpedia.org/resource/Babylon_A.D>
and reports a syntax error on the second ".".
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2010-01-29 16:28 sree New Issue
======================================================================
More information about the redland-dev
mailing list