I'll just pass this on here.  I was creating an XML output interface 
(via templates) for htsearch output, and ran into what many others have 
run into - the problem of the content type.  So I made a small addition 
to Display that goes something like this...

    151         // cout << "Content-type: text/html\r\n\r\n";
    152
    153         // 
-------------------------------------------------------------------
    154         // Patch #1 - add support for alternate document type 
output (for XML)
    155         // 
-------------------------------------------------------------------
    156         String  content_type = config["search_results_contenttype"];
    157         if (content_type.length()) {
    158                cout << "Content-type: "; cout << content_type; 
cout << "\r\n\r\n";
    159         } else {
    160               cout << "Content-type: text/html\r\n\r\n";
    161         }
    162         // 
-------------------------------------------------------------------
    163         // End Patch #1
    164         // 
-------------------------------------------------------------------

So then in my config file, I just put...

    search_results_contenttype: text/xml

There are a few other places you have to patch the output - basically 
every place where a "Content-type: text/html" happens.  But you get the 
basic idea.

Tim Holt



_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a 
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html

Reply via email to