Hi, >> I have a question about these converters. >> >> I have an application,kind of a robot,wich should do the followings: >> Get a HTML document - save it - get the links of that document and follow >> them - get the documents pointed by those links I got from the previous >> documents - save them - and so on.... >> Well, I tried to do this with registering those two converters: >> HTSaveLocally and HTMLPresent. >> But the thing is that I would like those converters to called in the >> following order: first the HTSaveLocally and just after that is saved to >> call the HTMLPresent... >> Can I do that? >> Or maybe this is a wrong way for what I need. >> Can anyone help me out? > > I'm no expert on LibWWW but one way to do this is to split the input > into two separate streams. One goes into the stream created by > HTSaveLocally and the other one goes into the one created by HTMLPresent. > This means you will have to write a stream of your own and the output > will go into the other two streams. Look at HTInit.c, HTFWrite.c and > HTML.c to see how streams are constructed and configured. Someone has > mentioned in this list that a generic stream splitter has been written. > Check the list archive at > http://lists.w3.org/Archives/Public/www-lib/threads.html > for the back messages. > > There may be better ways to do what you want to achieve. Anyone care > to comment? I had a similar problem long time ago. And I have found a solution which you can find at http://lists.w3.org/Archives/Public/www-lib/msg00377.html (The posting was part of a longer discussion; if not everything is clear, please let me know.) In my approach the splitter stream is a converter, which has several advantages. I hope it will work with the current version of the library. Regards Maciej Puzio puzio@laser.mimuw.edu.plReceived on Tuesday, 4 June 1996 14:06:04 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:26 GMT