Page MenuHomePhabricator

Property namespace is ill-formed in SemanticMediaiWiki RDF Dump
Closed, InvalidPublic

Description

Author: hsolbrig

Description:
Change Property namespace in export

The property namespace in the Semantic MediaWiki RDF dump doesn't parse correctly - note that it ends with "Property-3A" below.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF[
<!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
<!ENTITY owl 'http://www.w3.org/2002/07/owl#'>
<!ENTITY smw 'http://smw.ontoware.org/2005/smw#'>
<!ENTITY smwdt 'http://smw.ontoware.org/2005/smw-datatype#'>
<!ENTITY wiki 'http://biomedgt.org/index.php?title=Special:URIResolver/'>
<!ENTITY property 'http://biomedgt.org/index.php?title=Special:URIResolver/Property-3A'>
<!ENTITY wikiurl 'http://biomedgt.org/index.php?title='>
]>

An RDF Parser interprets <owl:DatatypeProperty rdf:about="&property;FOO"> as namespace "http://biomedgt.org/index.php?title=Special:URIResolver/" name "PROPERTY-3AFOO". We propose that it be changed to:

<!ENTITY property 'http://biomedgt.org/index.php?title=Special:URIResolver/Property#'>

The above change could be accomplished by the attached patch.


Version: unspecified
Severity: normal

Attached:

Details

Reference
bz11692

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:55 PM
bzimport set Reference to bz11692.

From the above description, I do not quite see what the problem actually is. Is there any issue with having "-3A" being a part of some URI? Why is this ill-formed?

We do of course have some degrees of freedom when building these URIs, but the reserved character # has some technical ramifications that are not desirable: The above will create URIs such as

http://biomedgt.org/index.php?title=Special:URIResolver/Property#Testproperty

which tries to use "Special:URIResolver/Property#Testproperty" as a parameter "title". But # cannot be part of a URL since it marks a URL-Ref, so in the above the parameter title is assigned "Special:URIResolver/Property" while "Testproperty" is a references applied to the whole URL. So it seems to be better to use some symbols without special relevance to the URL-spec. This is exactly what "-3A" was meant to be (it is an "escape" of the URL-colon %3A, and follows SMW's general escape strategy for problematic symbols in URIs).

Anyway, Denny (currently maintaining the export) should have a look at this.

I close that now since there was no further detail provided on why this should be a problem. We have tried SMW's OWL/RDF with many tools, and most did not have problems (and none had problems with the -3A).