At 12:15 PM 7/20/01 -0400, David Graff wrote:
>I just saw the post of XML output of ht://dig results patches.
>

I missed that post and will have to look into that.

I agree completely with David's comments that it would be wonderful if the 
results were separate from the logic.

I posted a message two weeks ago, but never saw it come through, about my 
experiments with XML-RPC and htDig.

I have an experimental XML-RPC service at my site 
http://www.theashergroup.com/demos that proposes to create a protocol so 
that one site can remotely search another site (that is, one site asks 
another site to "search itself please" and then to return the results as an 
XML stream.)

I was able to accomplish this using htDig in a pretty straightforward 
manner by changing the contents of the various header/footer files and the 
template map.

It appears to work pretty well, but it would be nice to see a bit more 
structured support of this, although, to be frank, I am not sure what that 
would look like.  Although I do know one thing I would like, and that is 
more of a programmatic API and linkable library into htsearch, not just a 
CGI interface.

Here are my mods just to show as an example, this may not look like XML to 
you, but when interpreted by a TCL XML-RPC package, it gets turned into an 
XML-RPC structure.

HEADER.XML

-struct {firstDocumentDisplayed {-string "$%(FIRSTDISPLAYED)"} 
lastDocumentDisplayed {-string "$%(LASTDISPLAYED)"} totalMatches {-string 
"$%(MATCHES)"} results { -array {

XML.XML
{ -struct { score { -string {$%(SCORE)} }  title { -string {$%(TITLE)} 
}  url { -string {$%(URL)} }  excerpt { -string {$%(EXCERPT)} }  size { 
-string {$%(SIZE)} }  modified { -string {$%(MODIFIED)} }  }  }

FOOTER.XML
} } }


Jerry

=====================================================
Jerry Asher                       [EMAIL PROTECTED]
1678 Shattuck Avenue Suite 161    Tel: (510) 549-2980
Berkeley, CA 94709                Fax: (877) 311-8688


_______________________________________________
htdig-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/htdig-dev

Reply via email to