W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1999

Re: Problem registering link callback

From: Raffaele Sena <raff@nuvomedia.com>
Date: Wed, 1 Sep 1999 11:04:57 -0700
Message-ID: <007b01bef4a4$80f1d9a0$303728ce@aromatic.com>
To: "Matt Johnson" <matt@onedisc.com>, <www-lib@w3.org>
Cc: <www-lib@w3.org>

> I've created a simple client application using
HTProfile_newPreemptiveClient for the profile.
>
> I've created a link callback function and registered it with
'HText_registerLinkCallback'.
>
> The problem is that my callback function doesn't get called at all.  I'm
using HTLoadToChunk to
> retrieve a web page.  Is there something else I need to do to parse this
chunk?  I assumed it
> occured when downloading the page.
>
    I may be wrong, but I think the various HTLoadTo* methods don't go
through the
    SGML/HTML parser. If you need one callback function to be called I guess
you'll
    have to do a regulat HTLoad (HTLoadAbsolute or such) and implement all
the callbacks
    you need. So, if you also need to dump the content on a file or chunk,
you'll have to
    have your callback do so.

    It could be, but I'm really just guessing, that you can create two
streams, one
    to send data to the chunk and the other to parse the data. But the flow
of data
    into these will be somehow unrelated (I mean, you will not know where
you are
    in the chunk when the Link callback is executed).

    Another way of retrieving the full document content and get the callback
executed
    is to use the cache. There should be a way, after the document has been
loaded and
    parsed, to retrieve the cached copy.

Hope this help,

    Raffaele
Received on Wednesday, 1 September 1999 14:02:59 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:17 UTC