RE: [Wh2fo-devel] Re: WH2FO Servlet
Status: Beta
Brought to you by:
fabgia
From: Giannetti, F. <Fab...@hp...> - 2002-01-15 10:17:50
|
Hi Carlos, I don't have an handy answer ... but I can suggest you to have a look to the Xalan examples, there are 2 or interest: PIPE SAX2SAX The mail that you point is related to XT and there is also the suggested solution. I noticed that internal code for XT must be changed to read the content of the InputStream: >I've included an extra method on this class which returns the internal PipedInputStream buffer: > public byte[] getStream() { > return buffer; > } and the solution to pull out the null value was: > public char[] getStream() > { > byte[] XToutput = // get buffer from pipedinputstream > return (new String(XToutput).trim().toCharArray()); > } Now if you want to try XT this could be a good starting point. Otherwise I suggest you to send an e-mail to the Xalan people (or look to the archives) because I guess this problem will be well known. I'd like to talk a little bit of what I am currently doing .... I have substantially improved the parser and simplified it. Now I will basically Tockenize the input stream and obtain a sequence of OpenTags, Content and CloseTags. This is a quite big change but I think it's important, at least will resolve the parsing errors and problems (circa 90% of current implementation). As usual I'm in shortage of spare time, so I ask for a vote to put this "unstable" version in the CVS (maybe in a different dir) and try to test and improve all together. So, for me: +1 Fabio |