From: lexius K. <lex...@gm...> - 2007-05-15 19:53:36
|
> 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. |
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. |
From: Andy S. <an...@ru...> - 2007-05-15 22:59:55
|
Clarification: you can attempt the relatively big job of modifying the Xilize source OR modify your own code. In the latter case and depending on your needs it might be a very simple task. Andy On Tuesday 15 May 2007 14:57, Andy Streich wrote: > > 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. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > xilize-users mailing list > xil...@li... > https://lists.sourceforge.net/lists/listinfo/xilize-users |