What is the content type of the document being loaded?

	Hello,

	I'm experiencing some troubles with the library of common code
and this is my firt message to this list. Please disregard my bad
english :-)

	I'm willing to load some documents, pass them through some
structured or unstructured streams then write them to disk.

	The exact streams used for a given document is dependent of
the content type of this document.

	Now I'm loading the documents using theses steps:

	I create a request structure containing a GET nethod, a
WWW_SOURCE output format, no converters or presenters, and a given
output stream wich eventaly ends in a file.

	I call the HTLoadAbsolute to perform the loading operations
and all goes well.

	My trouble is that I can't predict the content type of the
loaded document and must use this or this output stream to postprocess
it. Note that theses postprocessing streams are linked in a tree form
(two branchs then stacks). The exact organisation of the "stream
stacks" depends of the content type of the document.

	This would be easy to write the the HTStreamStack function
could generate an elaborated stack from a given list of convertes
(more than 1 level deep). I dreamed that this freature would be
corrected for the 3.1 release. It was not. So I need another solution.

	The replacement of this could be a special stream that can
organise itself the stream stack depending on the content type of the
document being locaded. But I'm unable to find this content type.

	By passing a pointer (say HTRequest *req) to the request
structure to the function creating the stream, I hopped that
req->anchor->parent->format would contain an atom to the type of the
document. No, format is always NULL.

	What can be done for that? Does anyone have a good idea about
this? Thanks.


PS: I'm using the 3.0 release of the library, I've not yet checked the
3.1 release.

Received on Wednesday, 27 September 1995 23:19:39 UTC