On Nov 5, 2008, at 10:58 AM, Asiri Rathnayake wrote:
Hi Vincent,
<p><!--startimage:foo.jpg--><img src="/xwiki/bin/download/currentdoc/ foo.jpg"/><!--stopimage-->
Excuse me for not knowing, but what are those two tags <!--startimage:foo.jpg--> & <!--stopimage--> doing there ?
Have a look at http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-rendering/src/t... These are the tests and it shows the format expected to be received by the XHTML parser (check the parts below ".input|xhtml/1.0" in the test files). So this is what need to be sent so that the XHTML parser will understand it.
One more,
In the current implementation of office-importer, after converting office documents into html and before applying any filters, the HtmlCleaner is invoked so as to obtain a Document object (into which filters are applied). And this document (after filters have been applied), can be converted into an xhtml string directly. So the resulting string is xhtml. My question is, do we have to parse this string again using XHTMLRenderer before landing it into a wiki page ?
Yes you're right. You don't need to use the XHTML parser nor the XHTML renderer, you can store the XML directly in the page (using XMLUtils.toString). Thanks -Vincent