On Wed, Nov 5, 2008 at 1:58 PM, Vincent Massol <vincent(a)massol.net> wrote:
On Nov 5, 2008, at 6:32 AM, asiri (SVN) wrote:
Author: asiri
Date: 2008-11-05 06:32:43 +0100 (Wed, 05 Nov 2008)
New Revision: 13965
Added:
sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
plugin/officeimporter/filter/ImgToWikiFilter.java
Removed:
sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
plugin/officeimporter/filter/ImageTagFilter.java
Modified:
sandbox/xwiki-plugin-officeimporter/src/main/java/com/xpn/xwiki/
plugin/officeimporter/transformer/HtmlToXWikiXhtmlTransformer.java
sandbox/xwiki-plugin-officeimporter/src/test/java/com/xpn/xwiki/
plugin/officeconverter/HtmlFilterTest.java
Log:
Renamed the ImageTagFilter as ImgToWikiFilter to make more sense.
This filter is only used with xhtml rendering.
Funnily I don't understand what ImgToWikiFilter means whereas
ImageTagFilter is very expressive to me (it performs some filtering on
image tags). I don't understand what an image to wiki means.
Well, I meant converting <img> tags into corresponding wiki syntax. Which is
what it was doing (i didn't touch it, I swear).
Also I don't understand why we need this filter since it converts to
XWiki Syntax 1.0 which we're not supporting.
This is required only for xhtml rendering (not xwiki 2.0 import). Because
image links such as <img src="foo.jpg"/> which results from
Office->Html
conversion doesn't mean anything on a wiki page.
So, what we do is,
1. Attach foo.jpg into the current document as an attachment.
2. Replace the <img> tag with quivalent wiki syntax to make it work.
An alternative would be to keep the <img> tag as it is and change the src
attribute to the url of the image attachment.
Thanks.
- Asiri
Thanks
-Vincent
[snip]
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs