New
authorMike Taylor <mike@indexdata.com>
Tue, 19 Sep 2006 11:11:33 +0000 (11:11 +0000)
committerMike Taylor <mike@indexdata.com>
Tue, 19 Sep 2006 11:11:33 +0000 (11:11 +0000)
web/htdocs/details/error.mc [new file with mode: 0644]
web/htdocs/raw.html [new file with mode: 0644]

diff --git a/web/htdocs/details/error.mc b/web/htdocs/details/error.mc
new file mode 100644 (file)
index 0000000..81a73e4
--- /dev/null
@@ -0,0 +1,8 @@
+%# $Id: error.mc,v 1.1 2006-09-19 11:11:44 mike Exp $
+<%args>
+$message
+</%args>
+<p class="error">
+ERROR:
+<% $message %>
+</p>
diff --git a/web/htdocs/raw.html b/web/htdocs/raw.html
new file mode 100644 (file)
index 0000000..8d8eb21
--- /dev/null
@@ -0,0 +1,23 @@
+%# $Id: raw.html,v 1.1 2006-09-19 11:11:33 mike Exp $
+<%args>
+$id
+</%args>
+<%once>
+use ZOOM;
+</%once>
+<%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;
+}
+</%perl>