On Jun 4, 2008, at 7:30 PM, Ludovic Dubost wrote: > > I agree, > > First you need to package your code as an XWiki plugin that can be > called. > This plugin should have as many conversion possibilities. > > doc or office -> xhtml > xls -> xhtml > doc -> openoffice > openoffice ->doc > doc -> pdf > html -> pdf > etc..
hmm not sure. We only need xhtml I think since it's then the role of the XWiki HTML Parser to generate an internal DOM. Once we have that DOM we benefit from all the renderers (PDF, XHTML, RTF, Latex, etc). Thanks -Vincent > Concerning xls I think we should look into having an import that does > not go through html > We might want to write xls to wiki table > > Ludovic > > Vincent Massol wrote: >> Hi Wang, >> >> On Jun 4, 2008, at 7:04 PM, Wang Ning wrote: >> >> >>> Hi, >>> >>> I have built a standalone plugin to convert MS Doc, MS excel to >>> html. >>> >> >> cool :) >> >> >>> This >>> plugin can run as a jar through command line or as a web application >>> through >>> url. >>> >> >> What do you mean by plugin? Do you mean xwiki plugin (probably not)? >> >> You need to find out and propose how to integrate the import feature >> into xwiki both in term of UI and in term of code. The best right now >> is probably to add a button in the tiny MCE editor. >> >> >>> Next, how to convert the html to xwiki syntax document? use xslt? Do >>> the new >>> rendering code have any influence? >>> >> >> I think we can do it in 2 steps: >> Step 1: get clean HTML. Since XWiki is able to display HTML it should >> work fine. This also means that the imported doc will be edited >> through the WYSIWYG editor (tinyMCE) >> Step 2: convert the HTML into wiki syntax wherever possible. This is >> indeed a job for the new rendering module and you'll need to write an >> HTML Parser (i.e. implementing the org.xwiki.rendernig.Parser >> interface). You should have a look at the 2 existing parsers: >> WikiModelXWikiParser and DoxiaConfluenceParser. In this case though >> you should use an XML parser to parse the XHTML instead of wiki model >> or doxia. Thus it's important that in step 1 you get clean XHTML >> (probably run JTidy on it). >> >> >>> Now I can't handle the clipboard format. I think clipboard is at the >>> second >>> priority. >>> >>> My another question: how to add my code to xwiki code sandbox? Do I >>> need to >>> build ,test and distrubut my plugin by maven way? If yes, please >>> tell how. >>> >> >> You need to follow all the coding conventions and best practices >> described at dev.xwiki.org >> You need to provide a maven build yes. Plenty of examples in the >> xwiki >> source tree. >> The best is maybe that you package your code as a xwiki plugin for >> now. check xwiki-platform-plugins for examples of plugin and how they >> are packaged/built. >> >> Thanks >> -Vincent >> >> _______________________________________________ >> devs mailing list >> [email protected] >> http://lists.xwiki.org/mailman/listinfo/devs >> >> > > > -- > Ludovic Dubost > Blog: http://blog.ludovic.org/ > XWiki: http://www.xwiki.com > Skype: ldubost GTalk: ldubost > > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

