Hi, I've written a XML-style-like wiki-markup extension. Each time some text is passed to my function it contains one namespace abrevitation. So what I want to do right now, is to collect all namspace abreviations which appear on that page and put them as namspace definitions to the top of the page.
To get that working I thought I'll define a global array variable in LocalSettings.php and put the namespace-abreviations together with the PageID into that array, so that all occuring ns-abreviations of the same page are aggregated together. After Parsing is done I would use the ParserAfterTidy-Hook to call another function which puts the used namespace-definitions to the top of the page.
Do you think this is a proper way ? Or is there a better solution?
If you think it could work I've got another question. Is the variable I defined in LocalSettings.php for all processes the same? So if 2 (parsing-)processes are runnning, are they both accessing the same variable or does each process have a unique variable which is just initialised the same way?
Thank you very much for your answear.
Greets
Christoph
(I already tried it once to reach the list one hour ago with some similar text. So I hope it doesn't appear twice:-)
wikitech-l@lists.wikimedia.org