From 05f0f9a23153e0762f42fae414d41ae52543ae0f Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 20 Oct 2006 16:57:23 +0000 Subject: [PATCH] Use new utility function irspy_xpath_context() Title now links to full record display. Add link to edit record. Test/Edit/Raw links are now in a single table column. --- web/htdocs/details/found.mc | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/web/htdocs/details/found.mc b/web/htdocs/details/found.mc index c306375..ebe7367 100644 --- a/web/htdocs/details/found.mc +++ b/web/htdocs/details/found.mc @@ -1,7 +1,5 @@ -%# $Id: found.mc,v 1.14 2006-10-18 14:03:42 mike Exp $ +%# $Id: found.mc,v 1.15 2006-10-20 16:57:23 mike Exp $ <%once> -use XML::LibXML; -use XML::LibXML::XPathContext; use URI::Escape; sub print_navlink { @@ -61,7 +59,6 @@ if (!defined $conn) { $conn = new ZOOM::Connection("localhost:3313/IR-Explain---1"); $conn->option(elementSetName => "zeerex"); } -my $parser = new XML::LibXML(); my $rs; eval { $rs = $conn->search(new ZOOM::Query::CQL($query)) }; @@ -116,11 +113,7 @@ print_navlink(\%params, $last < $n, "Next", $skip+$count); % foreach my $i ($first .. $last) { <%perl> my $rec = $rs->record($i-1); -my $xml = $rec->render(); -my $doc = $parser->parse_string($xml); -my $root = $doc->getDocumentElement(); -my $xc = XML::LibXML::XPathContext->new($root); -$xc->registerNs(e => 'http://explain.z3950.org/dtd/2.0/'); +my $xc = irspy_xpath_context($rec); my $title = $xc->find("e:databaseInfo/e:title"); my $author = $xc->find("e:databaseInfo/e:author"); my $host = $xc->find("e:serverInfo/e:host"); @@ -133,15 +126,20 @@ push @ids, $id; <% $i %> - <% xml_encode($title) %> + <% xml_encode($title) %> <% xml_encode($author) %> <% xml_encode($host) %> <% xml_encode($port) %> <% xml_encode($db) %> - [Test] - [Raw] + + T E X + % } -- 1.7.10.4