From: Mike Taylor Date: Thu, 28 Jun 2007 12:19:28 +0000 (+0000) Subject: New X-Git-Tag: CPAN-v1.02~54^2~330 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=0b1a9e3c2b498cd405396d325b4404840481b23c;p=irspy-moved-to-github.git New --- 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) %>