mediawiki-xml2sql
mediawiki-xml2sql copied to clipboard
Missing element definition for "<redirect>"
xml2sql fail with recent WP dumps due to missing element definition for "redirect".
$ xml2sql swwiki-20090821-pages-articles.xml
unexpected element <redirect>
xml2sql: parsing aborted at line 209 pos 16.
This issue can be solved by adding a definition for redirect to keywords:
--- a/keywords
+++ b/keywords
@@ -20,6 +20,7 @@ enum element {
el_minor,
el_comment,
el_text,
+ el_redirect,
};
%}
and re-run gperf as explained in mediawiki.c.
babilen
after applying that patch make fails. I've slightly modified it and now it compiles. This is the patch:
--- a/keywords +++ b/keywords @@ -20,6 +20,7 @@ el_minor, el_comment, el_text, + el_redirect, }; %} struct eltmap { char *name; enum element t; }; @@ -44,3 +45,4 @@ minor, el_minor comment, el_comment text, el_text +redirect, el_redirect
i can confirm that adding el_redirect and redirect, el_redirect fixes the issue. just remove mediawiki.c and re-run make to regenerate it with gperf. could you please do so and submit that fix?
I have made a fix in pull request #5