From 269ea7403308efb83d5015da591ced5f65037841 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 19 Sep 2006 11:11:33 +0000 Subject: [PATCH] New --- web/htdocs/details/error.mc | 8 ++++++++ web/htdocs/raw.html | 23 +++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 web/htdocs/details/error.mc create mode 100644 web/htdocs/raw.html diff --git a/web/htdocs/details/error.mc b/web/htdocs/details/error.mc new file mode 100644 index 0000000..81a73e4 --- /dev/null +++ b/web/htdocs/details/error.mc @@ -0,0 +1,8 @@ +%# $Id: error.mc,v 1.1 2006-09-19 11:11:44 mike Exp $ +<%args> +$message + +

+ERROR: +<% $message %> +

diff --git a/web/htdocs/raw.html b/web/htdocs/raw.html new file mode 100644 index 0000000..8d8eb21 --- /dev/null +++ b/web/htdocs/raw.html @@ -0,0 +1,23 @@ +%# $Id: raw.html,v 1.1 2006-09-19 11:11:33 mike Exp $ +<%args> +$id + +<%once> +use ZOOM; + +<%perl> +my $conn = new ZOOM::Connection("localhost:1313/IR-Explain---1"); +$conn->option(elementSetName => "zeerex"); +my $query = qq[rec.id="$id"]; +my $rs = $conn->search(new ZOOM::Query::CQL($query)); +my $n = $rs->size(); +if ($n == 0) { + $m->comp("/chrome/layout.mc", component => "/details/error.mc", + title => "Error", message => "No such ID '$id'"); +} else { + my $rec = $rs->record(0); + my $xml = $rec->render(); + $r->content_type("text/xml"); + print $xml; +} + -- 1.7.10.4