[redland-dev] [Raptor RDF Syntax Library 0000451]: Incorrect qname definition in TRiG parser

Mantis Bug Tracker mantis-bug-sender at librdf.org
Fri Jun 24 13:41:25 CEST 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=451 
====================================================================== 
Reported By:                v-for-vandal
Assigned To:                
====================================================================== 
Project:                    Raptor RDF Syntax Library
Issue ID:                   451
Category:                   api
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Syntax Name:                TRiG 
====================================================================== 
Date Submitted:             2011-06-24 11:41
Last Modified:              2011-06-24 11:41
====================================================================== 
Summary:                    Incorrect qname definition in TRiG parser
Description: 
Problem: QName in Turtle syntax are different from QName in XML Namespaces.
It Turtle qname can miss  prefix, local_part or both (
http://www.w3.org/TeamSubmission/turtle/#qname ). So if 
@prefix nie: <blablabal> .
@prefix : <http://soprano.sf.net/testdata/> .


then the following 
nie:
nie:xxx
:yyy

are all valid qnames. ( Unlike XML Namespaces, where nie: is not a valid QName )

Currently term "nie:" is not recognized as valid qname when used as graph name.
This issue has made all nepomuk ontologies invalid. Test data are given in
"Steps to reproduce" field.
 

Steps to Reproduce: 
run rapper -o rdfxml -i trig <test_data_below>.

Output ( errors only) is:

rapper: Parsing URI file:/path/to/data/ex.trig with parser trig
rapper: Serializing with serializer rdfxml
rapper: Error -  - The namespace prefix in "nie" was not declared.
rapper: Error - URI
file:///home/artemkde/kdesrc/build/shared-desktop-ontologies/nie/./ex.trig:43 -
turtle_qname_to_uri failed
<?xml version="1.0" encoding="utf-8"?> 
.... ( unimportant lines here )
rapper: Parsing returned 0 triples


Test data: (Shortage from nie ontology)

@prefix nie:     <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#> .
@prefix dcterms:  <http://purl.org/dc/terms/> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix nrl:     <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

# HERE "nie:" is used as graph name
nie: {nie:characterSet
          a       rdf:Property ;
          rdfs:comment "Characterset in which the content of the
InformationElement was created." ;
          rdfs:domain nie:InformationElement ;
          rdfs:label "characterSet" ;
          rdfs:range xsd:string ;
          nrl:maxCardinality "1" .
}

<http://www.semanticdesktop.org/ontologies/2007/01/19/nie_metadata#> {nie:  a   
   nrl:Ontology ;
    <http://www.semanticdesktop.org/ontologies/2007/01/19/nie_metadata#>
          a       nrl:GraphMetadata ;
          nrl:coreGraphMetadataFor
                  nie: .
}

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-06-24 11:41 v-for-vandal   New Issue                                    
======================================================================



More information about the redland-dev mailing list