https://bugzilla.wikimedia.org/show_bug.cgi?id=24234

--- Comment #4 from Karima Rafes <karima.ra...@bordercloud.com> 2010-08-12 
08:26:13 UTC ---

I found a quick fix.
I added str_replace('%','&#37;',URL) in the file
include/export/SMW_OWLExport.php in the function printHeader.

protected function printHeader( $ontologyuri = '' ) {
        global $wgContLang;

        $this->pre_ns_buffer .=
            "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" .
            "<!DOCTYPE rdf:RDF[\n" .
            "\t<!ENTITY rdf '"   . SMWExporter::expandURI( '&rdf;' )   . 
"'>\n" .
            "\t<!ENTITY rdfs '"  . SMWExporter::expandURI( '&rdfs;' )  . 
"'>\n" .
            "\t<!ENTITY owl '"   . SMWExporter::expandURI( '&owl;' )   . 
"'>\n" .
            "\t<!ENTITY swivt '" . SMWExporter::expandURI( '&swivt;' ) . 
"'>\n" .
            // 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.
            "\t<!ENTITY wiki '"  .
str_replace('%','&#37;',SMWExporter::expandURI( '&wiki;' )) .  "'>\n" .
            "\t<!ENTITY property '" .
str_replace('%','&#37;',SMWExporter::expandURI( '&property;' )) .  "'>\n" .
            "\t<!ENTITY wikiurl '" .
str_replace('%','&#37;',SMWExporter::expandURI( '&wikiurl;' )) .  "'>\n" .
            "]>\n\n" .
            "<rdf:RDF\n" .
            "\txmlns:rdf=\"&rdf;\"\n" .
            "\txmlns:rdfs=\"&rdfs;\"\n" .
            "\txmlns:owl =\"&owl;\"\n" .
            "\txmlns:swivt=\"&swivt;\"\n" .
            "\txmlns:wiki=\"&wiki;\"\n" .
            "\txmlns:property=\"&property;\"";
        $this->global_namespaces = array( 'rdf' => true, 'rdfs' => true, 'owl'
=> true, 'swivt' => true, 'wiki' => true, 'property' => true );

        $this->post_ns_buffer .=
            ">\n\t<!-- Ontology header -->\n" .
            "\t<owl:Ontology rdf:about=\"$ontologyuri\">\n" .
            "\t\t<swivt:creationDate
rdf:datatype=\"http://www.w3.org/2001/XMLSchema#dateTime\";>" . date( DATE_W3C )
. "</swivt:creationDate>\n" .
            "\t\t<owl:imports
rdf:resource=\"http://semantic-mediawiki.org/swivt/1.0\"; />\n" .
            "\t</owl:Ontology>\n" .
            "\t<!-- exported page data -->\n";
    }

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to