1 %# $Id: edit.mc,v 1.1 2006-10-20 16:57:40 mike Exp $
9 my $conn = new ZOOM::Connection("localhost:3313/IR-Explain---1");
10 $conn->option(elementSetName => "zeerex");
13 my $query = qq[rec.id="$qid"];
14 my $rs = $conn->search(new ZOOM::Query::CQL($query));
17 $m->comp("/details/error.mc",
18 title => "Error", message => "No such ID '$id'");
20 my $rec = $rs->record(0);
21 my $xc = irspy_xpath_context($rec);
23 [ Protocol => "e:serverInfo/\@protocol" ],
24 [ Host => "e:serverInfo/e:host" ],
25 [ Port => "e:serverInfo/e:port" ],
26 [ "Database Name" => "e:serverInfo/e:database" ],
27 [ "Username (if needed)" =>
28 "e:serverInfo/e:authentication/e:user" ],
29 [ "Password (if needed)" =>
30 "e:serverInfo/e:authentication/e:password" ],
31 [ Title => "e:databaseInfo/e:title",
32 lang => "en", primary => "true" ],
33 [ Description => "e:databaseInfo/e:description",
34 lang => "en", primary => "true" ],
35 [ Author => "e:databaseInfo/e:author" ],
36 [ Contact => "e:databaseInfo/e:contact" ],
37 [ Extent => "e:databaseInfo/e:extent" ],
38 [ History => "e:databaseInfo/e:history" ],
39 [ "Language of Records" => "e:databaseInfo/e:langUsage" ],
40 [ Restrictions => "e:databaseInfo/e:restrictions" ],
41 [ Subjects => "e:databaseInfo/e:subjects" ],
42 ### Remember to set e:metaInfo/e:dateModified
45 <h2><% xml_encode($id) %></h2>
46 <table class="searchform">
48 foreach my $ref (@fields) {
49 my($caption, $xpath, %attrs) = @$ref;
52 <th><% $caption %></th>
53 <td><% $xc->find($xpath) %></td>