[xwiki-devs] [GSOC]how to convert html to xwiki syntax
Hi, I have built a standalone plugin to convert MS Doc, MS excel to html. This plugin can run as a jar through command line or as a web application through url. Next, how to convert the html to xwiki syntax document? use xslt? Do the new rendering code have any influence? 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. Thanks very much. -- Sincerely, Wang Ning
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
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.. 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
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
Yes but I like the idea of having a convertor based on the open office code. The PDF output of OO is very nice. BTW, it would be great to have a plugin that runs the OO conversion in the same machine but also a plugin that would call into a REST api to a server that would manage a conversion queue. You will need the conversion queue anyway because you might have problems if you run multiple conversions at the same time Ludovic Vincent Massol wrote:
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
-- Ludovic Dubost Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
Ludovic Dubost wrote:
Yes but I like the idea of having a convertor based on the open office code. The PDF output of OO is very nice.
BTW, it would be great to have a plugin that runs the OO conversion in the same machine but also a plugin that would call into a REST api to a server that would manage a conversion queue.
Well, the REST API must be written, too, as OOo doesn't work that way yet. Let's keep this remote server idea for later.
You will need the conversion queue anyway because you might have problems if you run multiple conversions at the same time
-- Sergiu Dumitriu http://purl.org/net/sergiu/
Vincent Massol wrote:
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).
I second Vincent, for the moment the priority is to have wiki documents. But then I agree with Ludovic, that it would be better to convert attachments to different formats using the OOo codebase. The pdf export done now affects only wiki documents, not attachments, and going through a long chain of conversions (.doc -> wiki -> xhtml -> xsl-fo -> pdf) will only introduce possible problems at each conversion, while a direct conversion doc -> pdf using the (better) OOo code is simpler and easier. We can (and should) keep the current PDF export mechanism for wiki documents, though.
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
+1 to this one, too. I think that direct data manipulation through OOo is better than reverse-engineering html, and not just for spreadsheets, but other types of documents. -- Sergiu Dumitriu http://purl.org/net/sergiu/
On Jun 4, 2008, at 8:33 PM, Sergiu Dumitriu wrote:
Vincent Massol wrote:
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).
I second Vincent, for the moment the priority is to have wiki documents. But then I agree with Ludovic, that it would be better to convert attachments to different formats using the OOo codebase. The pdf export done now affects only wiki documents, not attachments, and going through a long chain of conversions (.doc -> wiki -> xhtml -> xsl-fo -> pdf) will only introduce possible problems at each conversion, while a direct conversion doc -> pdf using the (better) OOo code is simpler and easier. We can (and should) keep the current PDF export mechanism for wiki documents, though.
I think we should make the PDF export a secondary priority and get the rest working for now. Let's revisit it when all the rest is working fine. 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
+1 to this one, too. I think that direct data manipulation through OOo is better than reverse-engineering html, and not just for spreadsheets, but other types of documents. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Hi everyone, Sorry to pop in, but I imagine you are aware of Mirko's JODConverter and JODReports: http://www.artofsolving.com/ If not I thought it might be useful in the context of your discussion. His code is used by Nuxeo, Alfresco, and others and is very simple to use. JODCOnverter plugs into OO running in server mode. Good luck, Luis On Wed, Jun 4, 2008 at 8:37 PM, Vincent Massol <[email protected]> wrote:
On Jun 4, 2008, at 8:33 PM, Sergiu Dumitriu wrote:
Vincent Massol wrote:
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).
I second Vincent, for the moment the priority is to have wiki documents. But then I agree with Ludovic, that it would be better to convert attachments to different formats using the OOo codebase. The pdf export done now affects only wiki documents, not attachments, and going through a long chain of conversions (.doc -> wiki -> xhtml -> xsl-fo -> pdf) will only introduce possible problems at each conversion, while a direct conversion doc -> pdf using the (better) OOo code is simpler and easier. We can (and should) keep the current PDF export mechanism for wiki documents, though.
I think we should make the PDF export a secondary priority and get the rest working for now. Let's revisit it when all the rest is working fine.
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
+1 to this one, too. I think that direct data manipulation through OOo is better than reverse-engineering html, and not just for spreadsheets, but other types of documents. -- Sergiu Dumitriu http://purl.org/net/sergiu/
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Luis Arias +33 6 14 20 87 93 skype : kaaloo
On Jun 4, 2008, at 9:03 PM, Luis Arias wrote:
Hi everyone,
Sorry to pop in, but I imagine you are aware of Mirko's JODConverter and JODReports:
If not I thought it might be useful in the context of your discussion. His code is used by Nuxeo, Alfresco, and others and is very simple to use. JODCOnverter plugs into OO running in server mode.
Excellent! Thanks a lot Luis :) -Vincent
On Wed, Jun 4, 2008 at 8:37 PM, Vincent Massol <[email protected]> wrote:
On Jun 4, 2008, at 8:33 PM, Sergiu Dumitriu wrote:
Vincent Massol wrote:
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).
I second Vincent, for the moment the priority is to have wiki documents. But then I agree with Ludovic, that it would be better to convert attachments to different formats using the OOo codebase. The pdf export done now affects only wiki documents, not attachments, and going through a long chain of conversions (.doc -> wiki -> xhtml -> xsl-fo -> pdf) will only introduce possible problems at each conversion, while a direct conversion doc -> pdf using the (better) OOo code is simpler and easier. We can (and should) keep the current PDF export mechanism for wiki documents, though.
I think we should make the PDF export a secondary priority and get the rest working for now. Let's revisit it when all the rest is working fine.
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
+1 to this one, too. I think that direct data manipulation through OOo is better than reverse-engineering html, and not just for spreadsheets, but other types of documents.
Thanks Luis, This is indeed exactly what we need.. a web service and a java API at the same time Wang you should use this.. expose it as an XWiki plugin with a configuration option to run embed or connect to an existing web service. My idea is that we ship XWiki configured by default to talk to a server that we would host on our platform. Ludovic Luis Arias wrote:
Hi everyone,
Sorry to pop in, but I imagine you are aware of Mirko's JODConverter and JODReports:
If not I thought it might be useful in the context of your discussion. His code is used by Nuxeo, Alfresco, and others and is very simple to use. JODCOnverter plugs into OO running in server mode.
Good luck, Luis
On Wed, Jun 4, 2008 at 8:37 PM, Vincent Massol <[email protected]> wrote:
On Jun 4, 2008, at 8:33 PM, Sergiu Dumitriu wrote:
Vincent Massol wrote:
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).
I second Vincent, for the moment the priority is to have wiki documents. But then I agree with Ludovic, that it would be better to convert attachments to different formats using the OOo codebase. The pdf export done now affects only wiki documents, not attachments, and going through a long chain of conversions (.doc -> wiki -> xhtml -> xsl-fo -> pdf) will only introduce possible problems at each conversion, while a direct conversion doc -> pdf using the (better) OOo code is simpler and easier. We can (and should) keep the current PDF export mechanism for wiki documents, though.
I think we should make the PDF export a secondary priority and get the rest working for now. Let's revisit it when all the rest is working fine.
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
+1 to this one, too. I think that direct data manipulation through OOo is better than reverse-engineering html, and not just for spreadsheets, but other types of documents. -- Sergiu Dumitriu http://purl.org/net/sergiu/
_______________________________________________ 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
Cool ! I'm glad I could be of help ! Mirko will be happy to know you are working with his code. Putting him on copy. Luis On Wed, Jun 4, 2008 at 11:13 PM, Ludovic Dubost <[email protected]> wrote:
Thanks Luis,
This is indeed exactly what we need.. a web service and a java API at the same time Wang you should use this.. expose it as an XWiki plugin with a configuration option to run embed or connect to an existing web service.
My idea is that we ship XWiki configured by default to talk to a server that we would host on our platform.
Ludovic
Luis Arias wrote:
Hi everyone,
Sorry to pop in, but I imagine you are aware of Mirko's JODConverter and JODReports:
If not I thought it might be useful in the context of your discussion. His code is used by Nuxeo, Alfresco, and others and is very simple to use. JODCOnverter plugs into OO running in server mode.
Good luck, Luis
On Wed, Jun 4, 2008 at 8:37 PM, Vincent Massol <[email protected]> wrote:
On Jun 4, 2008, at 8:33 PM, Sergiu Dumitriu wrote:
Vincent Massol wrote:
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).
I second Vincent, for the moment the priority is to have wiki documents. But then I agree with Ludovic, that it would be better to convert attachments to different formats using the OOo codebase. The pdf export done now affects only wiki documents, not attachments, and going through a long chain of conversions (.doc -> wiki -> xhtml -> xsl-fo -> pdf) will only introduce possible problems at each conversion, while a direct conversion doc -> pdf using the (better) OOo code is simpler and easier. We can (and should) keep the current PDF export mechanism for wiki documents, though.
I think we should make the PDF export a secondary priority and get the rest working for now. Let's revisit it when all the rest is working fine.
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
+1 to this one, too. I think that direct data manipulation through OOo is better than reverse-engineering html, and not just for spreadsheets, but other types of documents. -- Sergiu Dumitriu http://purl.org/net/sergiu/
_______________________________________________ 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
-- Luis Arias +33 6 14 20 87 93 skype : kaaloo
Hi all, I'd certainly be happy to add XWiki to the list of other open source projects that use JODConverter and provide suggestions if needed. I see you mention xhtml... well the OOo xhtml filter is quite limited currently. For one it doesn't export embedded images[1]. But it's going to see big improvements with OOo 3.0. You may also be interested to know that there's a new major version of JODConverter[2] in development. Cheers Mirko -- [1] http://qa.openoffice.org/issues/show_bug.cgi?id=22012 [2] http://jodconverter.wiki.sourceforge.net/v3.0 2008/6/5 Luis Arias <[email protected]>:
Cool ! I'm glad I could be of help ! Mirko will be happy to know you are working with his code. Putting him on copy.
Luis
On Wed, Jun 4, 2008 at 11:13 PM, Ludovic Dubost <[email protected]> wrote:
Thanks Luis,
This is indeed exactly what we need.. a web service and a java API at the same time Wang you should use this.. expose it as an XWiki plugin with a configuration option to run embed or connect to an existing web service.
My idea is that we ship XWiki configured by default to talk to a server that we would host on our platform.
Ludovic
Luis Arias wrote:
Hi everyone,
Sorry to pop in, but I imagine you are aware of Mirko's JODConverter and JODReports:
If not I thought it might be useful in the context of your discussion. His code is used by Nuxeo, Alfresco, and others and is very simple to use. JODCOnverter plugs into OO running in server mode.
Good luck, Luis
On Wed, Jun 4, 2008 at 8:37 PM, Vincent Massol <[email protected]> wrote:
On Jun 4, 2008, at 8:33 PM, Sergiu Dumitriu wrote:
Vincent Massol wrote:
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).
I second Vincent, for the moment the priority is to have wiki documents. But then I agree with Ludovic, that it would be better to convert attachments to different formats using the OOo codebase. The pdf export done now affects only wiki documents, not attachments, and going through a long chain of conversions (.doc -> wiki -> xhtml -> xsl-fo -> pdf) will only introduce possible problems at each conversion, while a direct conversion doc -> pdf using the (better) OOo code is simpler and easier. We can (and should) keep the current PDF export mechanism for wiki documents, though.
I think we should make the PDF export a secondary priority and get the rest working for now. Let's revisit it when all the rest is working fine.
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 > > +1 to this one, too. I think that direct data manipulation through OOo is better than reverse-engineering html, and not just for spreadsheets, but other types of documents. -- Sergiu Dumitriu http://purl.org/net/sergiu/
_______________________________________________ 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
-- Luis Arias +33 6 14 20 87 93 skype : kaaloo
Thanks a lot Mirko and well done for this very nice framework! We're going to use it during this summer and we'll subscribe to the jod converter mailing list/forum if we have questions. Thanks again -Vincent On Jun 6, 2008, at 12:34 AM, Mirko Nasato wrote:
Hi all,
I'd certainly be happy to add XWiki to the list of other open source projects that use JODConverter and provide suggestions if needed.
I see you mention xhtml... well the OOo xhtml filter is quite limited currently. For one it doesn't export embedded images[1]. But it's going to see big improvements with OOo 3.0.
You may also be interested to know that there's a new major version of JODConverter[2] in development.
Cheers
Mirko
-- [1] http://qa.openoffice.org/issues/show_bug.cgi?id=22012 [2] http://jodconverter.wiki.sourceforge.net/v3.0
2008/6/5 Luis Arias <[email protected]>:
Cool ! I'm glad I could be of help ! Mirko will be happy to know you are working with his code. Putting him on copy.
Luis
On Wed, Jun 4, 2008 at 11:13 PM, Ludovic Dubost <[email protected]> wrote:
Thanks Luis,
This is indeed exactly what we need.. a web service and a java API at the same time Wang you should use this.. expose it as an XWiki plugin with a configuration option to run embed or connect to an existing web service.
My idea is that we ship XWiki configured by default to talk to a server that we would host on our platform.
Ludovic
Luis Arias wrote:
Hi everyone,
Sorry to pop in, but I imagine you are aware of Mirko's JODConverter and JODReports:
If not I thought it might be useful in the context of your discussion. His code is used by Nuxeo, Alfresco, and others and is very simple to use. JODCOnverter plugs into OO running in server mode.
Good luck, Luis
On Wed, Jun 4, 2008 at 8:37 PM, Vincent Massol <[email protected]> wrote:
On Jun 4, 2008, at 8:33 PM, Sergiu Dumitriu wrote:
Vincent Massol wrote:
> 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). > > I second Vincent, for the moment the priority is to have wiki documents. But then I agree with Ludovic, that it would be better to convert attachments to different formats using the OOo codebase. The pdf export done now affects only wiki documents, not attachments, and going through a long chain of conversions (.doc -> wiki -> xhtml -> xsl-fo -> pdf) will only introduce possible problems at each conversion, while a direct conversion doc -> pdf using the (better) OOo code is simpler and easier. We can (and should) keep the current PDF export mechanism for wiki documents, though.
I think we should make the PDF export a secondary priority and get the rest working for now. Let's revisit it when all the rest is working fine.
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 >> >> +1 to this one, too. I think that direct data manipulation through OOo is better than reverse-engineering html, and not just for spreadsheets, but other types of documents. -- Sergiu Dumitriu
Hi Mirko, Great to see you on the XWiki list. I have a few questions about JODConverter.. - I see you already have a web service. How about a nice REST api for that web service, including username/password ? - Are you handling a conversion queue ? - How do you handle OO not coming back from the conversion or crashing ? - Do you have caching of your conversions ? Ludovic Mirko Nasato wrote:
Hi all,
I'd certainly be happy to add XWiki to the list of other open source projects that use JODConverter and provide suggestions if needed.
I see you mention xhtml... well the OOo xhtml filter is quite limited currently. For one it doesn't export embedded images[1]. But it's going to see big improvements with OOo 3.0.
You may also be interested to know that there's a new major version of JODConverter[2] in development.
Cheers
Mirko
-- [1] http://qa.openoffice.org/issues/show_bug.cgi?id=22012 [2] http://jodconverter.wiki.sourceforge.net/v3.0
2008/6/5 Luis Arias <[email protected]>:
Cool ! I'm glad I could be of help ! Mirko will be happy to know you are working with his code. Putting him on copy.
Luis
On Wed, Jun 4, 2008 at 11:13 PM, Ludovic Dubost <[email protected]> wrote:
Thanks Luis,
This is indeed exactly what we need.. a web service and a java API at the same time Wang you should use this.. expose it as an XWiki plugin with a configuration option to run embed or connect to an existing web service.
My idea is that we ship XWiki configured by default to talk to a server that we would host on our platform.
Ludovic
Luis Arias wrote:
Hi everyone,
Sorry to pop in, but I imagine you are aware of Mirko's JODConverter and JODReports:
If not I thought it might be useful in the context of your discussion.
His
code is used by Nuxeo, Alfresco, and others and is very simple to use. JODCOnverter plugs into OO running in server mode.
Good luck, Luis
On Wed, Jun 4, 2008 at 8:37 PM, Vincent Massol <[email protected]>
wrote:
On Jun 4, 2008, at 8:33 PM, Sergiu Dumitriu wrote:
Vincent Massol wrote:
> 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). > > > I second Vincent, for the moment the priority is to have wiki documents. But then I agree with Ludovic, that it would be better to convert attachments to different formats using the OOo codebase. The pdf export done now affects only wiki documents, not attachments, and going through a long chain of conversions (.doc -> wiki -> xhtml -> xsl-fo -> pdf) will only introduce possible problems at each conversion, while a direct conversion doc -> pdf using the (better) OOo code is simpler and easier. We can (and should) keep the current PDF export mechanism for wiki documents, though.
I think we should make the PDF export a secondary priority and get the rest working for now. Let's revisit it when all the rest is working fine.
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 >> >> >> +1 to this one, too. I think that direct data manipulation through OOo is better than reverse-engineering html, and not just for spreadsheets, but other types of documents. -- Sergiu Dumitriu http://purl.org/net/sergiu/
_______________________________________________ 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
-- Luis Arias +33 6 14 20 87 93 skype : kaaloo
_______________________________________________ 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
Hi Ludovic, 2008/6/6 Ludovic Dubost <[email protected]>:
I have a few questions about JODConverter..
- I see you already have a web service. How about a nice REST api for that web service, including username/password ?
The web service 'protocol' used by JODConverter 2.2 is documented at http://www.artofsolving.com/node/15 It's like that because it seemed the simplest solution for the purpose of sending a document and getting back a converted one. I guess proper REST would involve (doing a PUT rather than a POST and) storing the file somewhere and give it a URI so it can be retrieved at any later point. It's something I consider beyond the scope of the converter service, something more appropriate for a full document management system. But of course I'm open to suggestions. Same thing for authentication, I don't think it's the responsibility of the converter service to provide it, people can add it on top of JODConverter by configuring HTTP basic auth in their front-end Apache server, or adding a <security-constraint> in web.xml, or Spring Security, etc. - Are you handling a conversion queue ? JODConverter 2.2 uses standard Java synchronisation to serialise access to OOo, because OOo multi-threading is unreliable, so only one conversion is performed at a time. JODConverter 3.0 uses Java 5 concurrency to provide more flexibility, e.g. specifying lock timeouts, and also let you run multiple OOo processes to increase scalability. - How do you handle OO not coming back from the conversion or crashing ? JODConverter 2.2 doesn't deal with that case at all, the service will just become unavailable until you manually restart OOo. That's the strong case for JODConverter 3.0 - http://jodconverter.wiki.sourceforge.net/v3.0
- Do you have caching of your conversions ?
Nope. As mentioned my philosophy is that the converter should only concern itself with doing conversions. But again I'm open to discussion. Cheers Mirko
Ludovic
Mirko Nasato wrote:
Hi all,
I'd certainly be happy to add XWiki to the list of other open source projects that use JODConverter and provide suggestions if needed.
I see you mention xhtml... well the OOo xhtml filter is quite limited currently. For one it doesn't export embedded images[1]. But it's going to see big improvements with OOo 3.0.
You may also be interested to know that there's a new major version of JODConverter[2] in development.
Cheers
Mirko
-- [1] http://qa.openoffice.org/issues/show_bug.cgi?id=22012 [2] http://jodconverter.wiki.sourceforge.net/v3.0
2008/6/5 Luis Arias <[email protected]>:
Cool ! I'm glad I could be of help ! Mirko will be happy to know you are working with his code. Putting him on copy.
Luis
On Wed, Jun 4, 2008 at 11:13 PM, Ludovic Dubost <[email protected]> wrote:
Thanks Luis,
This is indeed exactly what we need.. a web service and a java API at the same time Wang you should use this.. expose it as an XWiki plugin with a configuration option to run embed or connect to an existing web service.
My idea is that we ship XWiki configured by default to talk to a server that we would host on our platform.
Ludovic
Luis Arias wrote:
Hi everyone,
Sorry to pop in, but I imagine you are aware of Mirko's JODConverter and JODReports:
If not I thought it might be useful in the context of your discussion.
His
code is used by Nuxeo, Alfresco, and others and is very simple to use. JODCOnverter plugs into OO running in server mode.
Good luck, Luis
On Wed, Jun 4, 2008 at 8:37 PM, Vincent Massol <[email protected]>
wrote:
On Jun 4, 2008, at 8:33 PM, Sergiu Dumitriu wrote:
> Vincent Massol wrote: > > >> 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). >> >> >> > I second Vincent, for the moment the priority is to have wiki > documents. > But then I agree with Ludovic, that it would be better to convert > attachments to different formats using the OOo codebase. The pdf > export > done now affects only wiki documents, not attachments, and going > through > a long chain of conversions (.doc -> wiki -> xhtml -> xsl-fo -> pdf) > will only introduce possible problems at each conversion, while a > direct > conversion doc -> pdf using the (better) OOo code is simpler and > easier. > We can (and should) keep the current PDF export mechanism for wiki > documents, though. > > I think we should make the PDF export a secondary priority and get the rest working for now. Let's revisit it when all the rest is working fine.
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 >>> >>> >>> > +1 to this one, too. I think that direct data manipulation through OOo > is better than reverse-engineering html, and not just for > spreadsheets, > but other types of documents. > -- > Sergiu Dumitriu > http://purl.org/net/sergiu/ > > _______________________________________________ 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
-- Luis Arias +33 6 14 20 87 93 skype : kaaloo
_______________________________________________ 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
dare I candidly ask how math is processed? thanks in advance paul Le 06-juin-08 à 00:34, Mirko Nasato a écrit :
Hi all,
I'd certainly be happy to add XWiki to the list of other open source projects that use JODConverter and provide suggestions if needed.
I see you mention xhtml... well the OOo xhtml filter is quite limited currently. For one it doesn't export embedded images[1]. But it's going to see big improvements with OOo 3.0.
You may also be interested to know that there's a new major version of JODConverter[2] in development.
Cheers
Mirko
-- [1] http://qa.openoffice.org/issues/show_bug.cgi?id=22012 [2] http://jodconverter.wiki.sourceforge.net/v3.0
2008/6/5 Luis Arias <[email protected]>:
Cool ! I'm glad I could be of help ! Mirko will be happy to know you are working with his code. Putting him on copy.
Luis
On Wed, Jun 4, 2008 at 11:13 PM, Ludovic Dubost <[email protected]> wrote:
Thanks Luis,
This is indeed exactly what we need.. a web service and a java API at the same time Wang you should use this.. expose it as an XWiki plugin with a configuration option to run embed or connect to an existing web service.
My idea is that we ship XWiki configured by default to talk to a server that we would host on our platform.
Ludovic
Luis Arias wrote:
Hi everyone,
Sorry to pop in, but I imagine you are aware of Mirko's JODConverter and JODReports:
If not I thought it might be useful in the context of your discussion. His code is used by Nuxeo, Alfresco, and others and is very simple to use. JODCOnverter plugs into OO running in server mode.
Good luck, Luis
On Wed, Jun 4, 2008 at 8:37 PM, Vincent Massol <[email protected]> wrote:
On Jun 4, 2008, at 8:33 PM, Sergiu Dumitriu wrote:
Vincent Massol wrote:
> 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). > > I second Vincent, for the moment the priority is to have wiki documents. But then I agree with Ludovic, that it would be better to convert attachments to different formats using the OOo codebase. The pdf export done now affects only wiki documents, not attachments, and going through a long chain of conversions (.doc -> wiki -> xhtml -> xsl-fo -> pdf) will only introduce possible problems at each conversion, while a direct conversion doc -> pdf using the (better) OOo code is simpler and easier. We can (and should) keep the current PDF export mechanism for wiki documents, though.
I think we should make the PDF export a secondary priority and get the rest working for now. Let's revisit it when all the rest is working fine.
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 >> >> +1 to this one, too. I think that direct data manipulation through OOo is better than reverse-engineering html, and not just for spreadsheets, but other types of documents. -- Sergiu Dumitriu http://purl.org/net/sergiu/
_______________________________________________ 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
-- Luis Arias +33 6 14 20 87 93 skype : kaaloo
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Jun 6, 2008, at 10:22 AM, Paul Libbrecht wrote:
dare I candidly ask how math is processed?
Is that related to Office/OO import/Export? Do you mean if you put math inside Word documents? If you're talking about math support in general then that's not for this thread... :) I also remember we discussed that several times already too. Maybe you could start a new thread and explain what's your need? Thanks -Vincent
Le 06-juin-08 à 00:34, Mirko Nasato a écrit :
Hi all,
I'd certainly be happy to add XWiki to the list of other open source projects that use JODConverter and provide suggestions if needed.
I see you mention xhtml... well the OOo xhtml filter is quite limited currently. For one it doesn't export embedded images[1]. But it's going to see big improvements with OOo 3.0.
You may also be interested to know that there's a new major version of JODConverter[2] in development.
Cheers
Mirko
-- [1] http://qa.openoffice.org/issues/show_bug.cgi?id=22012 [2] http://jodconverter.wiki.sourceforge.net/v3.0
2008/6/5 Luis Arias <[email protected]>:
Cool ! I'm glad I could be of help ! Mirko will be happy to know you are working with his code. Putting him on copy.
Luis
On Wed, Jun 4, 2008 at 11:13 PM, Ludovic Dubost <[email protected]> wrote:
Thanks Luis,
This is indeed exactly what we need.. a web service and a java API at the same time Wang you should use this.. expose it as an XWiki plugin with a configuration option to run embed or connect to an existing web service.
My idea is that we ship XWiki configured by default to talk to a server that we would host on our platform.
Ludovic
Luis Arias wrote:
Hi everyone,
Sorry to pop in, but I imagine you are aware of Mirko's JODConverter and JODReports:
If not I thought it might be useful in the context of your discussion. His code is used by Nuxeo, Alfresco, and others and is very simple to use. JODCOnverter plugs into OO running in server mode.
Good luck, Luis
On Wed, Jun 4, 2008 at 8:37 PM, Vincent Massol <[email protected]> wrote:
On Jun 4, 2008, at 8:33 PM, Sergiu Dumitriu wrote:
> Vincent Massol wrote: > >> 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). >> >> > I second Vincent, for the moment the priority is to have wiki > documents. > But then I agree with Ludovic, that it would be better to > convert > attachments to different formats using the OOo codebase. The pdf > export > done now affects only wiki documents, not attachments, and going > through > a long chain of conversions (.doc -> wiki -> xhtml -> xsl-fo - > > pdf) > will only introduce possible problems at each conversion, > while a > direct > conversion doc -> pdf using the (better) OOo code is simpler and > easier. > We can (and should) keep the current PDF export mechanism for > wiki > documents, though. > I think we should make the PDF export a secondary priority and get the rest working for now. Let's revisit it when all the rest is working fine.
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 >>> >>> > +1 to this one, too. I think that direct data manipulation > through OOo > is better than reverse-engineering html, and not just for > spreadsheets, > but other types of documents. > -- > Sergiu Dumitriu > http://purl.org/net/sergiu/
Hi Wang, My opinion is that you should stick with the html export for now. Before going deeper into the OO api, you should study a little bit the XWiki architecture. If you want to test your html export simply copy the html into the wiki editor of a newly created page. Be aware that both OO and MS Office "save as html" api create a messy code. To solve that problem you could use the "tidy api" or use tidy command line to optimize a little bit the html code. Why do I recommend html instead of pdf or another format? First, because is easyer to integrate with XWiki. Second, If you look inside the html exported by MS Word, for example, you would see some tags hidden in html comments. These could be very important for our scope: Bigging collaboration to the next level(not only text, but: charts, tabular calculus, diagrams, even engineering<MS Visio>) So, those extra tags describe the fonts and other embeded elemets in the document. This elements are converted by default in gif images stored in the document's associated folder.It is best to have them as attached files in xwiki. When importing, you should parse the html and replace the "src" attribute with the url of the attachments. On the long shot, if you go further and create a "retrieve page feature", that will be spectacular, because we can enable that collaboration I was talking about. Also for the long term, we should keep an eye on upcoming Open XML renderers(embeded elements remain in the XML and that should be an advantage). It will be nice to have an OO plug-in for exporting, and retrieving the pages. I can suply the MS Office add-ins. I devopped some colaborative solutions in the past, using .NET and MS Office, and things can become pretty enteresting. So I think the "import document to XWiki" should be completed by a "export to xwiki" feature present in the rich client appications. There is a market for this hibid solutions.Take a look at MS Sharepoint, Exchange Server, Live writer, NewsGathor+Feed Daemon etc. I can provide some use cases for XWiki(especialy Workspaces). WDYT? I also atthached a print screen of a automated "save as html" add-in for MS Office.
On Jun 4, 2008, at 7:21 PM, 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).
Just found that some wikimodel guy is working on converting xhtml to wiki syntax: http://code.google.com/p/wikimodel/issues/detail?id=5 Might be worth talking to him to see how he's progressed since we might want to use his work and possibly even help him. Thanks -Vincent
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
It's probably not very difficult to add another HTML to XWiki converter[1] to the my Java Wikipedia API [2]. You can try the converter online at [3]. [1] http://plog4u.svn.sourceforge.net/viewvc/plog4u/info.bliki.wiki/src/info/bli... [2] http://matheclipse.org/en/Java_Wikipedia_API [3] http://jtidy.de/ On Thu, Jun 5, 2008 at 9:35 AM, Vincent Massol <[email protected]> wrote:
On Jun 4, 2008, at 7:21 PM, 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).
Just found that some wikimodel guy is working on converting xhtml to wiki syntax: http://code.google.com/p/wikimodel/issues/detail?id=5
Might be worth talking to him to see how he's progressed since we might want to use his work and possibly even help him.
Thanks -Vincent
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
-- Axel Kramer WikiBlog: http://www.groovy-news.org/e/page/axelclk
Hi Axel, On Jun 6, 2008, at 8:37 PM, Axel wrote:
It's probably not very difficult to add another HTML to XWiki converter[1] to the my Java Wikipedia API [2]. You can try the converter online at [3].
Thanks for the pointers. We haven't decided yet what to use for XHTML to Wiki conversion so that's good to know!
[1] http://plog4u.svn.sourceforge.net/viewvc/plog4u/info.bliki.wiki/src/info/bli... [2] http://matheclipse.org/en/Java_Wikipedia_API [3] http://jtidy.de/
Cool, seems it could be a good replacement for jtidy which is old (http://htmlcleaner.sourceforge.net/). Thanks a lot -Vincent
On Thu, Jun 5, 2008 at 9:35 AM, Vincent Massol <[email protected]> wrote:
On Jun 4, 2008, at 7:21 PM, 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).
Just found that some wikimodel guy is working on converting xhtml to wiki syntax: http://code.google.com/p/wikimodel/issues/detail?id=5
Might be worth talking to him to see how he's progressed since we might want to use his work and possibly even help him.
Thanks -Vincent
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
participants (9)
-
Axel -
Florin Ciubotaru -
Ludovic Dubost -
Luis Arias -
Mirko Nasato -
Paul Libbrecht -
Sergiu Dumitriu -
Vincent Massol -
Wang Ning