Last modified: 2009-07-07 14:18:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T19953, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17953 - rdf export does not generate valid XML
rdf export does not generate valid XML
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Markus Krötzsch
:
: 19563 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-12 16:18 UTC by aaron.graves
Modified: 2009-07-07 14:18 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description aaron.graves 2009-03-12 16:18:16 UTC
I go to the following URL:

http://wikis.company.com/wiki_instance/index.php/Special:ExportRDF/Namespace:Random_Page

And the XML that is generated is malformed.  It appears that any tags that use the dublin core namespace are not printed.

<swivt:Subject rdf:about="&wiki;Foobar">
...
< rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Author Name</>
< rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Title</>
...

As you might guess, those lines ought to look like this:

<dc:author rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Author Name</dc:author>
<dc:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Title</dc:title>

Upgrading from 1.3 to 1.4.2 caused this problem.  We can't downgrade because we really need the JSON export, but we need the rdf for backwards compatibility as well.

We are running:
Apache 2
PHP 5
MedaWiki 1.14.0
SMW 1.4.2
Ubuntu

Digging through the code, I noticed that $property->getQName() inside the printExpData(...) function (in SMW_SpecialOWLExport.php) is returning a blank string for any DC tags.  Unfortunately, I am not familiar with the codebase, and I spent a long time spinning my wheels, trying to figure out where that object gets constructed, with no success.

I should mention that we ran all of the command-line maintenance tools, including the upgrade script and the one that rebuilds all of the semantic data once we upgraded to 1.4.2.  Other than this one issue, SMW / MW seem to function as expected.

As I mentioned earlier, this behavior started upon upgrading from SMW 1.3 to 1.4.2 and is not present in 1.3.  This bug is causing us a great deal of pain; any assistance the developers might be able to offer would be greatly appreciated.
Comment 1 Markus Krötzsch 2009-03-27 15:26:33 UTC
The URL you provided above does not seem to work (server not found). I need to have a closer look to see what is wrong. Some aspects of the vocabulary import have changed slightly; maybe this is the reason.
Comment 2 Ian McEwen 2009-07-05 22:40:35 UTC
I am experiencing the same problem. Versions:

MediaWiki 	1.15.0
PHP 	5.2.9 (apache)
MySQL 	5.0.67
Semantic Mediawiki 1.4.2

wiki: http://wiki.ianmcorvidae.net/

example (failed) RDF export: http://wiki.ianmcorvidae.net/wiki/Special:ExportRDF/Ian_McEwen

In this case, I'm using FOAF; I also see that in the section where the various 'xmlns:' declarations are made, there is none made for FOAF:

<rdf:RDF
	xmlns:rdf="&rdf;"
	xmlns:rdfs="&rdfs;"
	xmlns:owl ="&owl;"
	xmlns:swivt="&swivt;"
	xmlns:wiki="&wiki;"
	xmlns:property="&property;"
	xmlns:="">

additionally, FOAF cannot be found in the doctype header, although it appears all other such things are

<!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 swivt 'http://semantic-mediawiki.org/swivt/1.0#'>
	<!ENTITY wiki 'http://wiki.ianmcorvidae.net/wiki/Special:URIResolver/'>
	<!ENTITY property 'http://wiki.ianmcorvidae.net/wiki/Special:URIResolver/Property-3A'>
	<!ENTITY wikiurl 'http://wiki.ianmcorvidae.net/wiki/'>
]>

The failing line (in this case; I don't have much using imported vocabularies, given they didn't work):

	< rdf:resource="&wiki;Ian_McEwen"/>

which should be (I believe):
     
        <foaf:name rdf:resource="$wiki;Ian_McEwen"/>
Comment 3 Ian McEwen 2009-07-05 22:43:14 UTC
Pardon; the line should probably be: <foaf:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Ian McEwen</foaf:name> or so. (amending previous comment)
Comment 4 Markus Krötzsch 2009-07-06 07:26:41 UTC
This bug is fixed in the current SVN version.
Comment 5 Markus Krötzsch 2009-07-07 14:18:00 UTC
*** Bug 19563 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links