On 10/08/11 03:01, Alexandru Todor wrote:

> While running the latest version of the extraction framework on the
> German data dump, I got some property names that have round brackets in
> them "(" ")" like for example:
> "http://de.dbpedia.org/property/Austragungsort(e)" . The problem is that
> Pubby crashes when a page is requested that contains such a property.
> The crash is due to Jena, which executes a remote sparql query on
> Virtuoso and recieves invalid XML as a response. The problem is that I
> don't even know where to fix the bug, The URL RFC [1] Section 2.2 states
> that round brackets can be used without escaping them, the URI RFC [2]
> section 2.4.3  also doesn't mention them being dissalowed so the
> extracted URIs should be valid. However I don't know if the RDF spec
> allows property names to contain round brackets .

The RDF spec does allow that, but the problem is that there is no way to 
serialize such property URIs in RDF/XML. Specifically the fact that your 
property URI ends with a closing bracket is a problem.

It's a known issue that there are valid RDF graphs that can not be 
represented in RDF/XML (which is one of many good reasons not to use the 
RDF/XML syntax format).

> Is the extracted data invalid, or is there a rdf-spec problem ?

The extracted data is invalid XML, yes: an XML element QName can not 
contain brackets. Unfortunately, there is no right way to do this in 
your case.

The RDF/XML spec recommends that a writer tries to split the URIref 
after the last non-NCName character and use an ad-hoc namespace 
declaration, but if the last character of the URIref is a non-NCName 
char (such as the closing bracket in your property URI), there is no way 
to split it, and a writer tool should report an error (apparently 
Virtuoso has opted for not giving an error but producing invalid XML 
instead - either way the communication breaks down).

The only reliable way around the problem is to use a serialization 
format that does cope with all legal RDF properly, such as N-Triples or 
Turtle.

Cheers,

Jeen

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. 
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Dbpedia-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to