On Wed, Aug 21, 2013 at 9:52 PM, Paul Libbrecht <[email protected]> wrote: >> https://java.net/projects/stax-utils). > > XInclude support may be a bit weak there but I found a processor that would > map stream to stream (https://github.com/etourdot/xincproc). > In any case, for attachments, one would also wish base64 encoding (so that > files are... erm... files!) which is not in XInclude so would need a > (non-standardized) extension. > >> The current state is a pretty much done core and most of the API and a >> started XAR output module (document/attachment part is pretty much >> done, still need to work on generic events for xclass/xobjects). See >> https://github.com/xwiki-contrib/wiki-stream. > > Will this include an uploader for a single xml file (and its inclusions) into > a remote wiki? > That would be the really useful thing that is often breaking for me (I have a > command-line uploader but it seems to create fuss recently).
Note that there is a REST resource to upload a XAR introduced by Fabio some time ago. WikiStream is not going to be some big monolitic module put in XWiki, it's just a generic API of events to represent wiki elements, then you have various output/input modules and higher level modules that are going to choose and input, output, filters and configure all that before executing the "graph" exactly like the rendering. For you use case there is several possibilities: * WikiStream comes with a generic (reflection based) XML format (and associated parser/serializer) which support any kind of event so you can represent any element of a wiki using that * the XAR output module already support outputting a single document XML (instead of a XAR) and I plan to support the same thing in the XAR input module. You can look at the current tests in the WikiStream XAR module (WikiStream comes with a test framework very similar to the Rendering test framework minus the cts for now): https://github.com/xwiki-contrib/wiki-stream/tree/master/xwiki-platform-wikistream-syntaxes/xwiki-platform-wikistream-syntax-xar/src/test > >> It would probably be better to forget about Package class and look >> directly at wiki stream. > > Can you give a little "handbook" for the case of: > - producing a xar from a set of xml sources You would implement a custom InputWikiStreamFactory/InputWikiStream that would take care of converting your set of xml sources into proper events and use the XAR serializer as output. > - uploading a set of xml files Depends what you mean by upload. If you mean import those XML files as documents in database then there is several possibilities I guess: you can either introduce you own REST resource that takes your custom XML set and then use your custom parser with the coming XWiki database output module. Another possibility is to generate a XAR on you side using WikiStream (it does not need to run in XWiki) with your custom parser as input and the XAR module as output and send it to the wiki using the existing XAR import resource. We can also imagine a lots of other ways depending of any other format supported as input of a REST resource. > ? > > Thanks in advance. > > Paul > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs -- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

