From 644674854c11887ef8da235ef62ae161ae2e5b8c Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 28 Jun 2007 12:19:28 +0000 Subject: [PATCH] New --- web/htdocs/ap.html | 6 ++++++ web/htdocs/details/ap.mc | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 web/htdocs/ap.html create mode 100644 web/htdocs/details/ap.mc diff --git a/web/htdocs/ap.html b/web/htdocs/ap.html new file mode 100644 index 0000000..05401aa --- /dev/null +++ b/web/htdocs/ap.html @@ -0,0 +1,6 @@ +%# $Id: ap.html,v 1.1 2007-06-28 12:19:28 mike Exp $ +<%args> +$set + +<& /chrome/layout.mc, %ARGS, title => uc($set) . " access points", + component => "/details/ap.mc" &> diff --git a/web/htdocs/details/ap.mc b/web/htdocs/details/ap.mc new file mode 100644 index 0000000..abec956 --- /dev/null +++ b/web/htdocs/details/ap.mc @@ -0,0 +1,43 @@ +%# $Id: ap.mc,v 1.1 2007-06-28 12:19:37 mike Exp $ +<%args> +$id +$set + +<%perl> +my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1"); +$conn->option(elementSetName => "zeerex"); +my $query = cql_target($id); +my $rs = $conn->search(new ZOOM::Query::CQL($query)); +my $n = $rs->size(); +if ($n == 0) { + return $m->comp("/details/error.mc", + title => "Error", message => "No such ID '$id'"); +} + +my $xc = irspy_xpath_context($rs->record(0)); +my $title = $xc->find("e:databaseInfo/e:title"); + +

<% xml_encode($title, "") %>

+<%perl> +my $expr = 'e:indexInfo/e:index[@search = "true"]/e:map/e:attr[ + @set = "'.$set.'" and @type = "1"]'; +my @nodes = $xc->findnodes($expr); +my @aps = sort { $a <=> $b } map { $_->findvalue(".") } @nodes; + +$n = @aps; +if ($n == 0) { + print " [none]\n"; + return; +} + + +% foreach my $ap (@aps) { +% my $name = "[unknown]"; +% $name = bib1_access_point($ap) if $set eq "bib-1"; +% ### Should support translation of other attribute sets' access points + + + + +% } +
<% $ap %><% xml_encode($name) %>
-- 1.7.10.4