From: Andy S. <an...@ru...> - 2007-05-15 21:57:38
|
> and I need to get plaing text without Xilize elements (*strong*, **bold** > etc) > for full text indexing engine. Sorry, Xilize does not provide that ability. You'll have to write a filter to strip all the inline markup from each block of text -- modify the source. If you do that and want to supply it as a patch or just as an example I'd be happy to include it in the next update. This would be nice functionality to have. If you want I'll point you to the part of the code that handles inline markup -- but it's the most complex and brittle part! I'd like to replace the piece with a much more sane implementation. You might want to consider just stripping out some of the markup like *strong*, **bold**, and _emphasis_ and replace "link":url with link (whatever ones are commonly used in the source xil you are processing). That would be quite simple and not involve touching the Xilize source. Andy On Tuesday 15 May 2007 12:53, lexius Kh wrote: > > Hi Evheniy, > > > > > Sorry for my English. > > > I am use Xilize in my web project for post/edit articles. > > > And I need to clear text from formating element for full text indexing. > > > Can I do this with xilize-engine.jar? > > > > I don't understand your question. With Xilize you have source files > > (*.xil) and output files (*.html). Do you also need another output > > format, > > > say, a plain text file (i.e. *.txt) that is stripped of all Xilize markup > > so you can give that "clean" file to the indexing engine? This not > > something you can do with Xilize (yet), however, it can probably be done > > easily by running the *.html output through XSLT. > > > > You might consider adding a feature request to the Xilize project so we > > pick it up in the future. > > > > Andy > > Thanks for reply. > I am using xilize in my web project. > My code: > > public class XilizeProcessor implements TextProcessor { > > public XilizeProcessor() { > super(); > Xilize2.startup(new ReporterStd(), new BeanShell(), new > HashMap<String, String>()); > } > > public String process(String text) { > try { > return (new Xilize2()).xilizeBlocks(text); > } catch (Exception e) { > //logger.error(e.getMessage(), e); > return text; > } > } > > } > > and I need to get plaing text without Xilize elements (*strong*, **bold** > etc) > for full text indexing engine. > > Evheniy. |