[xwiki-users] Question about Xwiki Import/Export XAR
Hello everyone, I am writing a script to translate XML exports of Mediawiki pages into the XAR format that XWiki can import. My challenge is that I have not found a formal definition of what the page's xml as well as the package xml should be, as they do not contain schema information. I have been "reverse engineering" the definition by looking at some exports, but if anyone is aware of where the definition could be found it would be extremely helpful. Thanks!
There is no real written specification for the XAR format so you will have to look at the implementation. You can get most XML elements names in https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwik... classes for example. That being said IMO the easiest for your need would be to write a Input Filter for MediaWiki and then can reuse XAR output filter. See http://extensions.xwiki.org/xwiki/bin/view/Extension/Filter+Module and you can find input/output XAR and input Confluence filters on https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwik... to provide you with well tested examples. On Thu, Jun 4, 2015 at 8:43 PM, Mehdi Oulmakki <[email protected]> wrote:
Hello everyone,
I am writing a script to translate XML exports of Mediawiki pages into the XAR format that XWiki can import.
My challenge is that I have not found a formal definition of what the page's xml as well as the package xml should be, as they do not contain schema information.
I have been "reverse engineering" the definition by looking at some exports, but if anyone is aware of where the definition could be found it would be extremely helpful.
Thanks! _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
Hi Mehdi, On 4 Jun 2015 at 20:44:12, Mehdi Oulmakki ([email protected](mailto:[email protected])) wrote:
Hello everyone,
I am writing a script to translate XML exports of Mediawiki pages into the XAR format that XWiki can import.
My challenge is that I have not found a formal definition of what the page's xml as well as the package xml should be, as they do not contain schema information.
I have been "reverse engineering" the definition by looking at some exports, but if anyone is aware of where the definition could be found it would be extremely helpful.
You are completely right, we were missing that information on xwiki.org… I have now added it to http://platform.xwiki.org/xwiki/bin/view/AdminGuide/ImportExport#HXARFormat Note that I’m not 100% of all my descriptions so it would be nice if some xwiki dev validate it (Thomas for example since he’s implemented the export! :)). Also note that if you’re working on a MediaWiki import I’d suggest you implement it as a Filter for http://extensions.xwiki.org/xwiki/bin/view/Extension/Filter+Application in the same way as we’ve done it for Confluence (see http://extensions.xwiki.org/xwiki/bin/view/Extension/Filter+Confluence+XML+m...). If you’re interested in this approach (the best) then I’m sure Thomas Mortagne will be happy to help you out (this is his baby!). Hope it helps, -Vincent
Thanks!
participants (3)
-
Mehdi Oulmakki -
Thomas Mortagne -
vincent@massol.net