Index: trunk/extensions/SemanticMediaWiki/includes/export/SMW_OWLExport.php |
— | — | @@ -492,6 +492,10 @@ |
493 | 493 | } |
494 | 494 | |
495 | 495 | /* Functions for exporting RDF */ |
| 496 | + |
| 497 | + protected function makeValueEntityString( $string ) { |
| 498 | + return "'" . str_replace( '%','%',$string ) . "'"; |
| 499 | + } |
496 | 500 | |
497 | 501 | protected function printHeader( $ontologyuri = '' ) { |
498 | 502 | global $wgContLang; |
— | — | @@ -499,14 +503,14 @@ |
500 | 504 | $this->pre_ns_buffer .= |
501 | 505 | "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" . |
502 | 506 | "<!DOCTYPE rdf:RDF[\n" . |
503 | | - "\t<!ENTITY rdf '" . SMWExporter::expandURI( '&rdf;' ) . "'>\n" . |
504 | | - "\t<!ENTITY rdfs '" . SMWExporter::expandURI( '&rdfs;' ) . "'>\n" . |
505 | | - "\t<!ENTITY owl '" . SMWExporter::expandURI( '&owl;' ) . "'>\n" . |
506 | | - "\t<!ENTITY swivt '" . SMWExporter::expandURI( '&swivt;' ) . "'>\n" . |
| 507 | + "\t<!ENTITY rdf " . $this->makeValueEntityString( SMWExporter::expandURI( '&rdf;' ) ) . ">\n" . |
| 508 | + "\t<!ENTITY rdfs " . $this->makeValueEntityString( SMWExporter::expandURI( '&rdfs;' ) ) . ">\n" . |
| 509 | + "\t<!ENTITY owl " . $this->makeValueEntityString( SMWExporter::expandURI( '&owl;' ) ) . ">\n" . |
| 510 | + "\t<!ENTITY swivt " . $this->makeValueEntityString( SMWExporter::expandURI( '&swivt;' ) ) . ">\n" . |
507 | 511 | // 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. |
508 | | - "\t<!ENTITY wiki '" . SMWExporter::expandURI( '&wiki;' ) . "'>\n" . |
509 | | - "\t<!ENTITY property '" . SMWExporter::expandURI( '&property;' ) . "'>\n" . |
510 | | - "\t<!ENTITY wikiurl '" . SMWExporter::expandURI( '&wikiurl;' ) . "'>\n" . |
| 512 | + "\t<!ENTITY wiki " . $this->makeValueEntityString( SMWExporter::expandURI( '&wiki;' ) ) . ">\n" . |
| 513 | + "\t<!ENTITY property " . $this->makeValueEntityString( SMWExporter::expandURI( '&property;' ) ) . ">\n" . |
| 514 | + "\t<!ENTITY wikiurl " . $this->makeValueEntityString( SMWExporter::expandURI( '&wikiurl;' ) ) . ">\n" . |
511 | 515 | "]>\n\n" . |
512 | 516 | "<rdf:RDF\n" . |
513 | 517 | "\txmlns:rdf=\"&rdf;\"\n" . |