Difference between revisions of "Template:Bugfix SMW hased URI"

From Diversity Workbench
Jump to: navigation, search
 
Line 1: Line 1:
<noinclude>
+
<noinclude>'''Deprecated. Usage not recommended because it creates but correct property values but not proper RDF values'''
 +
 
 
Problem: Semantic MediaWiki  
 
Problem: Semantic MediaWiki  
 
* stores a hashed URL like <code><nowiki>[[URL::http://www.w3.org/2004/02/skos/core#]]</nowiki></code>
 
* stores a hashed URL like <code><nowiki>[[URL::http://www.w3.org/2004/02/skos/core#]]</nowiki></code>
 
* as http://www.w3.org/2004/02/skos/core cutting the “#” off
 
* as http://www.w3.org/2004/02/skos/core cutting the “#” off
 +
* an URL value like <nowiki>http://www.w3.org/2004/02/skos/core#</nowiki> will not appear in the RDF
  
So this template checks if the final character is a # and adds “%20” to it (a blank character urlencoded). This fixes somehow the storage of # URLs. In addition  
+
So this template checks if the final character is a # and adds “%20” to it (a blank character urlencoded). This fixes somehow the storage of # URLs in the property but not in the RDF it is unfortunately still <nowiki>http://www.w3.org/2004/02/skos/core#%20</nowiki>. In addition  
 
* [[:Category:Internal - SMW bugfix URI hashed]] is set
 
* [[:Category:Internal - SMW bugfix URI hashed]] is set
  

Latest revision as of 23:58, 7 September 2016

Deprecated. Usage not recommended because it creates but correct property values but not proper RDF values

Problem: Semantic MediaWiki

  • stores a hashed URL like [[URL::http://www.w3.org/2004/02/skos/core#]]
  • as http://www.w3.org/2004/02/skos/core cutting the “#” off
  • an URL value like http://www.w3.org/2004/02/skos/core# will not appear in the RDF

So this template checks if the final character is a # and adds “%20” to it (a blank character urlencoded). This fixes somehow the storage of # URLs in the property but not in the RDF it is unfortunately still http://www.w3.org/2004/02/skos/core#%20. In addition

Usage

{{Bugfix SMW hased URI|uri=http://www.w3.org/2004/02/skos/core#|property=vann:preferredNamespaceUri}}


Parameters

1=
uri=
(mandatory) uri value
property= (mandatory) the property to set

Technical Issues

TODO Warning messages like:

“URIs of the form http://www.w3.org/2000/01/rdf-schema# are not allowed”

Some URLs are not allowed at all, because they are evaluated and translated some how in SemanticMediaWiki (./includes/export/SMW_Exporter.php) and these are:

TODO:

  • those properties need eventually a different approach: use a synonym property page with [[Imported from::rdf:…]] ?
  • or empty MediaWiki:Smw uri blacklist might be a work around