Hello
I have started to list questions that could be part of the satisfaction
survey about the XWiki products :
http://dev.xwiki.org/xwiki/bin/view/Drafts/SatisfactionSurveyProducts
I propose to get first feedback about XWiki Enterprise and XWiki
Enterprise Manager. So, I have made two different forms. But:
1. maybe, one form can be sufficient.
2. the questions in each form can be different.
Again, I'd like your feedback about it/them.
Thanks in advance for your help and your time.
Emilie
Hi Devs,
=INTRO=
A new version of jodconverter has been released (
http://code.google.com/p/jodconverter/) which, among several other
enhancements includes support for automating openoffice server process
management. Even though the jodconverter API has changed slightly, upgrading
officeimporter to use this new version of jodconverter does not require that
much of an effort and it will allow us to control the oo server instance
pretty easily.
With this new version jodconverter, all we have to do is configure the path
to the OO server installation (and few more options) within our web.xml (or
similar) file. Apart from that, starting / stopping the oo server process
can be done in java. Optionally, we can configure following two parameters
as well:
1. Maximum number of simulataneous conversion tasks to be handled by a
single oo server instance.
2. Task execution timeout.
=UI=
To integrate oo server management functions in XE UI we can create an admin
page for officeimporter like XWiki.OfficeImporterAdmin and link to it from
XWiki.AdminSheet. As a start, I have created the this mockup ui:
http://i39.tinypic.com/6tlli9.png.
Please help me improve this UI :)
=IMPLEMENTATION=
I can see two different designs that would work:
1. Add the required method signatures (see below) to OfficeImporter
component interface.
2. Introduce a separate component for managing the OpenOffice server
instance.
In any case, following methods (API) will have to be added:
1. startOoServer(); // start
2. stopOoServer(); // stop
3. getOoServerStatus(); // get current state (running / stopped / error)
4. getOoServerPath(); // Returns the location of oo server installation to
be displayed on admin UI
5. getOoServerProfilePath(); // Each oo server installation is associated
with a profile, this parameter also need to be configured in web.xml
Since OpenOffice server is used only by officeimporter, adding those methods
to OfficeImporter interface seems ok to me.
WDYT?
Thanks.
- Asiri
Hi there,
I'd like to send a vote on my proposal. Full discussion is here:
http://n2.nabble.com/-Proposal----Adding-a-%22Getting-Started%22-space-in-t…
If the vote is passed, I'll provide a patch with the pages in XML format.
I'd like this guide to be included in XE 1.8 - if that's still possible.
Since it doesn't impact anything core (it' very superficial from a tech PoW)
I think it could be ok. WDYT?
Here's my public commitment: I promise I will maintain and update this guide
in the future ;-)
Thanks,
Guillaume
PS: here's my +1
--
Guillaume Lerouge
Product Manager - XWiki
Skype ID : wikibc
http://guillaumelerouge.com/
Hi,
This is our last chance to change this behavior. We've found several
places where having meaningful spaces are counter-productive:
* in table cells since we can't align table anymore. For example:
|= column1 |= column2
| this is some para | second column
| hello | world
(not sure this will be rendered nicely in mail but you see what I mean)
* in scripts since having meaningful spaces prevents us from aligning
velocity or groovy scripts. For ex we can't write:
#if (....)
#if (...)
do something
# end
#end
To see a better example have a look at http://tinyurl.com/ahz669
What I think users real want are meaningful new lines but I see cons
overweighting pros for having meaningful white spaces. Thus I'm think
we should strip whitespaces at beginning and end of lines including
for line breaks.
I'm slightly less sure for multiple spaces between words but even
there I think we could strip them have users use {{{ }}} to put a non
breaking space for ex (or introduce a {{space/}} macro or another
special syntax although I'd rather we don't introduce a new syntax).
WDYT?
Thanks
-Vincent
http://xwiki.comhttp://xwiki.orghttp://massol.net
Hi,
The question arise whether we want to ignore first and last NL in
macros in order to have the following be the same:
{{macro}}content{{/macro}}
{{macro}}
content
{{/macro}}
For ex, most users will probably not expect that the following will
generate 1 empty line:
{{velocity}}
content
{{/velocity}}
WDYT?
Thanks
-Vincent
http://xwiki.comhttp://xwiki.orghttp://massol.net
Hi Asiri,
On Feb 27, 2009, at 12:32 PM, asiri (SVN) wrote:
> Author: asiri
> Date: 2009-02-27 12:32:21 +0100 (Fri, 27 Feb 2009)
> New Revision: 17078
>
> Added:
> platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
> officeimporter/internal/cleaner/AbstractHTMLCleaningTest.java
> platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
> officeimporter/internal/cleaner/
> EmptyLineParagraphOpenOfficeCleaningTest.java
> platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
> officeimporter/internal/cleaner/ImageOpenOfficeCleaningTest.java
> platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
> officeimporter/internal/cleaner/InvalidTagOpenOfficeCleaningTest.java
> platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
> officeimporter/internal/cleaner/LineBreakOpenOfficeCleaningTest.java
> platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
> officeimporter/internal/cleaner/LinkOpenOfficeCleaningTest.java
> platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
> officeimporter/internal/cleaner/ListOpenOfficeCleaningTest.java
> platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
> officeimporter/internal/cleaner/MiscWysiwygCleaningTest.java
> platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
> officeimporter/internal/cleaner/
> RedundantTagOpenOfficeCleaningTest.java
> platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
> officeimporter/internal/cleaner/TableOpenOfficeCleaningTest.java
> Removed:
> platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
> officeimporter/internal/cleaner/AbstractHTMLCleanerTest.java
> platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
> officeimporter/internal/cleaner/OpenOfficeHTMLCleanerTest.java
> platform/core/trunk/xwiki-officeimporter/src/test/java/org/xwiki/
> officeimporter/internal/cleaner/WysiwygHTMLCleanerTest.java
> Modified:
> platform/core/trunk/xwiki-officeimporter/src/main/java/org/xwiki/
> officeimporter/filter/LineBreakFilter.java
> Log:
> XWIKI-3265: Restructure officeimporter test cases + write more tests
>
> * Completed.
[snip]
> +public class InvalidTagOpenOfficeCleaningTest extends
> AbstractHTMLCleaningTest
> +{
> + /**
> + * {@code <style>} tags should be stripped from html content.
> + */
> + public void testStyleTagRemoving()
> + {
> + String html =
> + "<html><head><title>Title</title>" + "<style type=
> \"text/css\">h1 {color:red} p {color:blue} </style>"
> + + "</head><body>" + footer;
> + Document doc = openOfficeHTMLCleaner.clean(new
> StringReader(html));
> + NodeList nodes = doc.getElementsByTagName("style");
> + assertEquals(0, nodes.getLength());
> + }
> +
> + /**
> + * {@code <style>} tags should be stripped from html content.
copy paste, should be <script>.
> + */
> + public void testScriptTagRemoving()
> + {
> + String html = header + "<script type=\"text/javascript
> \">document.write(\"Hello World!\")</script>" + footer;
> + Document doc = openOfficeHTMLCleaner.clean(new
> StringReader(html));
> + NodeList nodes = doc.getElementsByTagName("script");
> + assertEquals(0, nodes.getLength());
> + }
> +}
>
[snip]
> + /**
> + * {@code <br/>} elements placed next to paragraph elements
> should be converted to {@code<div
> + * class="wikikmodel-emptyline"/>} elements.
> + */
> + public void testLineBreaksNextToParagraphElements()
> + {
> + checkLineBreakReplacements("<br/><br/><p>para</p>", 0, 2);
> + checkLineBreakReplacements("<p>para</p><br/><br/>", 0, 2);
> + checkLineBreakReplacements("<p>para</p><br/><br/><p>para</
> p>", 0, 2);
> + }
Shouldn't this be done by the default HTML Cleaner?
Same for the other tests in this category.
> + /**
> + * The html generated by open office server includes anchors of
> the form {@code<a name="table1"><h1>Sheet 2:
> + * <em>Hello</em></h1></a>} and the default html cleaner
> converts them to {@code <a name="table1"/><h1><a
> + * name="table1">Sheet 1: <em>Hello</em></a></h1>} this is
> because of the close-before-copy-inside
> + * behaviour of default html cleaner. Thus the additional (copy-
> inside) anchor needs to be ripped off.
This looks like a bug in the default HTML cleaner no?
> + /**
> + * If there are leading spaces within the content of a list
> item ({@code<li/>}) they should be trimmed.
> + */
> + public void testListItemContentLeadingSpaceTrimming()
> + {
> + String html = header + "<ol><li> Test</li></ol>" + footer;
> + Document doc = openOfficeHTMLCleaner.clean(new
> StringReader(html));
> + NodeList nodes = doc.getElementsByTagName("li");
> + Node listContent = nodes.item(0).getFirstChild();
> + assertEquals(Node.TEXT_NODE, listContent.getNodeType());
> + assertEquals("Test", listContent.getNodeValue());
> + }
Shouldn't this be done in the default HTML cleaner? Actually I think
this is already done in the XHTML parser by the whitespace XML filter.
If not then it's a bug of the whitespace filter.
For all bugs please refer to the jira issue in the javadoc and explain
that the code will be removed once the bug is fixed.
> +
> + /**
> + * If there is a leading paragraph inside a list item, it
> should be replaced with it's content.
> + */
> + public void testListItemContentIsolatedParagraphCleaning()
> + {
> + String html = header + "<ol><li><p>Test</p></li></ol>" +
> footer;
> + Document doc = openOfficeHTMLCleaner.clean(new
> StringReader(html));
> + NodeList nodes = doc.getElementsByTagName("li");
> + Node listContent = nodes.item(0).getFirstChild();
> + assertEquals(Node.TEXT_NODE, listContent.getNodeType());
> + assertEquals("Test", listContent.getNodeValue());
> + }
> +}
This should be handled by a combination of both XHTML parser and Wiki
Syntax Renderer and/or by the default HTML cleaner.
> + /**
> + * Test cleaning of html paragraphs brearing namespaces.
> + */
> + public void testParagraphsWithNamespaces()
> + {
> + String html = header + "<w:p>paragraph</w:p>" + footer;
> + Document doc =
> + wysiwygHTMLCleaner.clean(new StringReader(html),
> Collections.singletonMap(HTMLCleaner.NAMESPACES_AWARE,
> + "false"));
> + NodeList nodes = doc.getElementsByTagName("p");
> + assertEquals(1, nodes.getLength());
> + }
hmmm... I think this needs to be reviewed and we need to check if the
wikimodel XHTML parser supports namespaces.
> +
> + /**
> + * The source of the images in copy pasted html content should
> be replaces with 'Missing.png' since they can't be
> + * uploaded automatically.
> + */
> + public void testImageFiltering()
> + {
> + String html = header + "<img src=\"file://path/to/local/image.png
> \"/>" + footer;
> + Document doc = wysiwygHTMLCleaner.clean(new
> StringReader(html));
> + NodeList nodes = doc.getElementsByTagName("img");
> + assertEquals(1, nodes.getLength());
> + Element image = (Element) nodes.item(0);
> + Node startComment = image.getPreviousSibling();
> + Node stopComment = image.getNextSibling();
> + assertEquals(Node.COMMENT_NODE, startComment.getNodeType());
> +
> assertTrue
> (startComment.getNodeValue().equals("startimage:Missing.png"));
It should be lowercase "missing.png". So this means a missing.png
image need to be present in all skins?
Has this been discussed and is everyone aware of this?
> + /**
> + * Test filtering of those tags which doesn't have any
> attributes set.
> + */
> + public void testFilterIfZeroAttributes()
> + {
> + String htmlTemplate = header + "<p>Test%sRedundant
> %sFiltering</p>" + footer;
> + String[] filterIfZeroAttributesTags = new String[] {"span",
> "div"};
> + for (String tag : filterIfZeroAttributesTags) {
> + String startTag = "<" + tag + ">";
> + String endTag = "</" + tag + ">";
> + String html = String.format(htmlTemplate, startTag,
> endTag);
> + Document doc = openOfficeHTMLCleaner.clean(new
> StringReader(html));
> + NodeList nodes = doc.getElementsByTagName(tag);
> + assertEquals(0, nodes.getLength());
> + }
> + }
Shouldn't this be done in the default HTML cleaner?
> +
> + /**
> + * Test filtering of those tags which doesn't have any textual
> content in them.
> + */
> + public void testFilterIfNoContent()
> + {
> + String htmlTemplate = header + "<p>Test%sRedundant%s%s
> %sFiltering</p>" + footer;
> + String[] filterIfNoContentTags =
> + new String[] {"em", "strong", "dfn", "code", "samp",
> "kbd", "var", "cite", "abbr", "acronym", "address",
> + "blockquote", "q", "pre", "h1", "h2", "h3", "h4", "h5",
> "h6"};
> + for (String tag : filterIfNoContentTags) {
> + String startTag = "<" + tag + ">";
> + String endTag = "</" + tag + ">";
> + String html = String.format(htmlTemplate, startTag,
> endTag, startTag, endTag);
> + Document doc = openOfficeHTMLCleaner.clean(new
> StringReader(html));
> + NodeList nodes = doc.getElementsByTagName(tag);
> + assertEquals(1, nodes.getLength());
> + }
> + }
> +}
Shouldn't this be done in the default HTML cleaner?
> + /**
> + * An isolated paragraph inside a table cell item should be
> replaced with paragraph's content.
> + */
> + public void testTableCellItemIsolatedParagraphCleaning()
> + {
> + String html = header + "<table><tr><td><p>Test</p></td></
> tr></table>" + footer;
> + Document doc = openOfficeHTMLCleaner.clean(new
> StringReader(html));
> + NodeList nodes = doc.getElementsByTagName("td");
> + Node cellContent = nodes.item(0).getFirstChild();
> + assertEquals(Node.TEXT_NODE, cellContent.getNodeType());
> + assertEquals("Test", cellContent.getNodeValue());
> + }
Isn't this already tested above?
In any case shouldn't this be moved out of the importer?
Same for other tests in the same category.
> + /**
> + * If multiple paragraphs are found inside a table cell item,
> they should be wrapped in an embedded document.
> + */
> + public void testTableCellItemMultipleParagraphWrapping()
> + {
> + assertEquals(true,
> checkEmbeddedDocumentGeneration("<table><tr><td><p>Test</p><p>Test</
> p></td></tr></table>",
> + "td"));
> + }
This looks like a bug in the XHTML parser.
Same for other tests in the same category.
> +
> + /**
> + * Empty rows should be removed.
> + */
> + public void testEmptyRowRemoving()
> + {
> + String html = header + "<table><tbody><tr><td>cell</td></
> tr><tr></tr></tbody></table>" + footer;
> + Document doc = openOfficeHTMLCleaner.clean(new
> StringReader(html));
> + NodeList nodes = doc.getElementsByTagName("tr");
> + assertEquals(1, nodes.getLength());
> + }
Shouldn't this be done in the default HTML cleaner?
Thanks
-Vincent
http://xwiki.comhttp://xwiki.orghttp://massol.net