Are you sure this is a good idea?
I think you should probably make the namespace available as a JSON object run-time. Inclined to set this to FIXME.
Hi Siebrand, Didn't notice your comment, sorry for the delay. The background of this decision is as follows: The editor trends toolkit is a command line interface to download Wikipedia dumpfiles, chunk them in smaller XML files, extract variables and store them in a database. Right now, we have decided to only focus on namespace 0. Thus, when I split the large dump file in smaller XML files, I ignore all non 0 namespaces, however to do that in a way that is language independent, I do need the local names of the different namespaces.
Now, what I could do is just before I start splitting the dump file, download the latest namespace information as a JSON object and then start splitting. That way, I don't need local copies. My guess was that namespaces rarely change and if they do then I'll run an update once. I can make it dynamic and just download the JSON object.
Answers to your questions: 1) Yes, you are right but my guess is that it's very rare. 2) Nothing will fail, if those additonal namespaces are part of the Wikimedia dumps then they will remain in the splitted XML files. This is not 100% intended behavior because we only want to focus on namespace 0.
How would you address this issue?
best, Diederik