Hi Vincent:
On Sat, Jan 3, 2009 at 12:24 AM, Vincent Massol <vincent(a)massol.net> wrote:
Hi Asiri,
You absolutely need a JIRA issue for this!
Actually you would also normally need a vote since you're modifying a
public API but it's probably ok....
Issue created :
http://jira.xwiki.org/jira/browse/XWIKI-3063
+ /**
+ * Transforms any HTML content into valid XHTML. Additional
parameters may be passed in to fine tune the cleaning
+ * process.
+ *
+ * @param originalHtmlContent The original html content to be
cleaned.
+ * @param params Additional parameters (implementation
dependent) for cleaning.
+ * @return The cleaned HTML as a w3c DOM
You should use "the" and not "The". See
http://dev.xwiki.org/xwiki/bin/view/Community/CodeStyle
which points to
http://java.sun.com/j2se/javadoc/writingdoccomments/
Ok, I think I have used "The" in several other places (if not all) also. I
will fix them.
+ */
+ Document clean(Reader originalHtmlContent, Map<String, String>
params);
Can you rename params to cleaningParameters since this is more
explicit and this is what we discussed?
Fixed
+ // at
org.jdom.output.DOMOutputter.createDOMDocument(DOMOutputter.java:208)
+ // at org.jdom.output.DOMOutputter.output(DOMOutputter.java:
127)
Why did you remove the white space I had put to indent the stack
trace? :)
Sorry. I have been using a wrong version of codestyle-eclipse.xml. I've
fixed the changes accidentally made to HTMLCleaner but I think I have done
the same thing in several other places (webdav & office importer). Will fix
them.
the params don't seem to be used?
The DefaultHTMLCleaner doesn't use the parameters. It's the
OpenOfficeHTMLCleaner that will use the params. We discussed this on the
chat, if we have a different HTMLCleaner interface only for Office Importer
module we don't need to change the xwiki-xml HTMLCleaner interface. But
OpenOfficeHTMLCleaner implements HTMLCleaner interface from xwiki-xml This
is why we decided to change HTMLCleaner interface. The cleaning parameters
are dependant on the implementation classes. I mean, cleaning parameters for
DefaultHTMLCleaner (if there going to be any) will not apply for
OpenOfficeHTMLCleaner.
I hope there has been no misunderstanding.
Thanks.
- Asiri