On Jan 3, 2009, at 8:09 PM, Asiri Rathnayake wrote: > Hi Vincent, > >> >>> >>> I'm not sure how to do this. >> >> My comment was about the mixing, not about the need for the Document >> Access bridge. >> > > Ok. > > >> >>> Unlike other filters, ImageFilter needs to have >>> access to the original XWikiDocument (via DocumentAccessBridge) >>> other than >>> the w3c DOM. This is because when cleaning image links, the src >>> attribute >>> need to be replaced by the corresponding attachment url. This is >>> why I >>> introduced XWikiHTMLCleaner which takes in the OfficeImporterContext >>> in >>> addition to the w3c dom. >> >> Make them components and have the bridge injected. >> > > Not only the bridge but also the document name (against which the > cleaning > is done) will need to be provided for this filter.
Just to understand can you explain why you need the document name in some filters? > But since the signature > of a filter is clean(Document dom), there is no other way to pass > additional > information (like the document name) that is required for > determining the > attachment URL. I have another way to get around this problem with > cleaningParameters we introduced to the HTMLCleaner (we can pass the > document against which the cleaning is done). Will work on it. > > BTW not sure why you removed the Transformer components. >> > > Transformers are specific to office importer. They won't be used by > any > other component outside office importer. So I thought there is no > point in > keeping them as components. > > Thanks. > > - Asiri > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs Thanks -Vincent http://xwiki.com http://massol.net http://xwiki.org _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

