r21199 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r21198‎ | r21199 | r21200 >
Date:13:02, 12 April 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
Reverted Denny's removal of "not needed" XML declarations, which are in fact crucial in various cases.
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/ExportRDF/SMW_SpecialExportRDF.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/ExportRDF/SMW_SpecialExportRDF.php
@@ -525,14 +525,13 @@
526526 "\t<!ENTITY owl 'http://www.w3.org/2002/07/owl#'>\n" .
527527 "\t<!ENTITY smw 'http://smw.ontoware.org/2005/smw#'>\n" .
528528 "\t<!ENTITY smwdt 'http://smw.ontoware.org/2005/smw-datatype#'>\n" .
529 -// why? "\t<!ENTITY wiki '" . $this->wiki_xmlns_xml . "'>\n" . I think this is never used
 529+ // A note on "wiki": this namespace is crucial as a fallback when it would be illegal to start e.g. with a number. In this case, one can always use wiki:... followed by "_" and possibly some namespace, since _ is legal as a first character.
 530+ "\t<!ENTITY wiki '" . $this->wiki_xmlns_xml . "'>\n" .
530531 "\t<!ENTITY thing '" . $this->wiki_xmlns_xml . "'>\n" .
531532 "\t<!ENTITY relation '" . $this->wiki_xmlns_xml .
532 -// why? $this->makeXMLExportId(urlencode(str_replace(' ', '_', $wgContLang->getNsText(SMW_NS_RELATION) . ':'))) . "'>\n" .
533 - str_replace(' ', '_', $wgContLang->getNsText(SMW_NS_RELATION) . ':') . "'>\n" .
 533+ $this->makeXMLExportId(urlencode(str_replace(' ', '_', $wgContLang->getNsText(SMW_NS_RELATION) . ':'))) . "'>\n" .
534534 "\t<!ENTITY attribute '" . $this->wiki_xmlns_xml .
535 -// why? $this->makeXMLExportId(urlencode(str_replace(' ', '_', $wgContLang->getNsText(SMW_NS_ATTRIBUTE) . ':'))) . "'>\n" .
536 - str_replace(' ', '_', $wgContLang->getNsText(SMW_NS_ATTRIBUTE) . ':') . "'>\n" .
 535+ $this->makeXMLExportId(urlencode(str_replace(' ', '_', $wgContLang->getNsText(SMW_NS_ATTRIBUTE) . ':'))) . "'>\n" .
537536 "\t<!ENTITY wikiurl '" . $this->wiki_xmlns_url . "'>\n" .
538537 "]>\n\n" .
539538 "<rdf:RDF\n" .
@@ -540,7 +539,7 @@
541540 "\txmlns:rdfs=\"&rdfs;\"\n" .
542541 "\txmlns:owl =\"&owl;\"\n" .
543542 "\txmlns:smw=\"&smw;\"\n" .
544 -// "\txmlns:wiki=\"&wiki;\"\n" .
 543+ "\txmlns:wiki=\"&wiki;\"\n" .
545544 "\txmlns:thing=\"&thing;\"\n" .
546545 "\txmlns:relation=\"&relation;\"\n" .
547546 "\txmlns:attribute=\"&attribute;\"";

Status & tagging log