From thomas.mortagne@xwiki.com Mon Aug 24 10:10:23 2015 From: Thomas Mortagne To: xwiki-users@xwiki.org Subject: Re: [xwiki-users] Import JSPWiki history Date: Mon, 24 Aug 2015 10:10:20 +0200 Message-ID: In-Reply-To: <1440059254661-7595692.post@n2.nabble.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3442144045285742355==" --===============3442144045285742355== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The history format of XAR is specific and not easy to generate from scratch: it's actually JRCS export format and you can look at https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki= -platform-filter/xwiki-platform-filter-events/xwiki-platform-filter-event-xwi= ki/src/main/java/org/xwiki/filter/event/xwiki/XWikiWikiDocumentFilter.java to see how it's used. But you don't need to go trough XAR and to deal with this format if you are writing a JSPWiki importer but I would need more detail on what you are doing exactly. If you write a filter module you can check how Confluence module deal with history in https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki= -platform-filter/xwiki-platform-filter-streams/xwiki-platform-filter-stream-c= onfluencexml. On Thu, Aug 20, 2015 at 10:27 AM, qvendeville wrote: > Hello, > > I try to import the content from a JSPWiki to XWiki with the history. I > managed to import the content, but not the history. > > The generated XAR from the export contains my page in XML format : > > > > Import JSPWiki > 6.1WikiPage > > > 0 > Import JSPWiki > 1439990795525 > DupontJean > 1 > 6.1WikiPage > xwiki/2.1 > true > La page d=C3=A9di=C3=A9e =C3=A0 la version 6.1. > DupontJean > 2 > 6.1WikiPage > xwiki/2.1 > true > La page d=C3=A9di=C3=A9e =C3=A0 la version 6.1. Infos dispo =C3= =A0 l'adresse suivante > : http://infos.com > DanielD > 3 > 6.1WikiPage > xwiki/2.1 > false > La page d=C3=A9di=C3=A9e =C3=A0 la version 6.1. Infos dispo =C3= =A0 l'adresse suivante > : http://new-infos.com > > > > When I import this XAR on XWiki, i only have the last version (version 3) of > the history. > > I looked how XWiki generate XAR file when you export a page with the > history. > It looks like that : > > > > Sandbox > TestPage1 > > en > 0 > XWiki.Admin > 1252454400000 > head 2.1; > access; > symbols; > locks; strict; > comment @# @; > > > 2.1 > date 2015.08.18.17.23.18; author XWiki_2EAdmin; state full; > branches; > next 1.1; > > 1.1 > date 2015.07.28.15.16.57; author XWiki_2EAdmin; state diff; > branches; > next ; > > > desc > @@ > > > 2.1 > log > @@ > text > @ > > Sandbox > TestPage1 > > en > 0 > Sandbox.WebHome > XWiki.Admin > XWiki.Admin > > XWiki.Admin > 1252454400000 > 1439911398000 > 1439911398000 > 2.1 > Sandbox Test Page 1 > > > > false > xwiki/2.0 > false > Click on **"Edit"** and modify the contents of this page, then > click on **"Save & View"** to see how they look like on your page! > > =3D Here's some dummy text to show you what the page looks like =3D > > Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod > tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, > quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo > consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse > cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat > non proident, sunt in culpa qui officia deserunt mollit anim id > est > @ > > > 1.1 > log > @Install extension [org.xwiki.platform:xwiki-platform-sandbox-7.0] > @ > text > @d14 3 > a16 3 > 1438089417000 > 1438089417000 > 1.1 > d20 1 > a20 1 > Install extension > [org.xwiki.platform:xwiki-platform-sandbox-7.0] > d28 1 > a28 1 > Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod > tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, > quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo > consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse > cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat > non proident, sunt in culpa qui officia deserunt mollit anim id est > laborum. > @ > > Sandbox.WebHome > XWiki.Admin > XWiki.Admin > 1439911398000 > 1439911398000 > 2.1 > Sandbox Test Page 1 > > false > xwiki/2.0 > false > Click on **"Edit"** and modify the contents of this page, then > click on **"Save & View"** to see how they look like on your page! > > =3D Here's some dummy text to show you what the page looks like =3D > > Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod > tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, > quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo > consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse > cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat > non proident, sunt in culpa qui officia deserunt mollit anim id > est > > > > Obviously it is not the same format and I don't understand this format, can > someone explain me how it is generated, and how I can modify my file to > import it on XWiki correctly. > > -- > Quentin > > > > -- > View this message in context: http://xwiki.475771.n2.nabble.com/Import-JSPW= iki-history-tp7595692.html > Sent from the XWiki- Users mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users(a)xwiki.org > http://lists.xwiki.org/mailman/listinfo/users --=20 Thomas Mortagne --===============3442144045285742355==--