X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=web%2Fhtdocs%2Fdetails%2Ffull.mc;h=5f7ac19157d2e14e929f40b04a1d44a5c64ea3e5;hp=bc8a7396fca4a427e09d77d91977f35cdd0fcec9;hb=5af2144c9a1726a64ee62805bea33a8094109ceb;hpb=f4ccfff6bb3e1f2027b29c0ed72ad331f161b368 diff --git a/web/htdocs/details/full.mc b/web/htdocs/details/full.mc index bc8a739..5f7ac19 100644 --- a/web/htdocs/details/full.mc +++ b/web/htdocs/details/full.mc @@ -1,4 +1,4 @@ -%# $Id: full.mc,v 1.10 2006-11-06 17:24:00 mike Exp $ +%# $Id: full.mc,v 1.13 2006-11-06 17:43:29 mike Exp $ <%args> $id @@ -44,12 +44,18 @@ if ($n == 0) { [ "Implementation Name" => "i:status/i:implementationName" ], [ "Implementation Version" => "i:status/i:implementationVersion" ], [ "Reliability" => \&calc_reliability, $xc ], - [ "Services" => sub { "### IRSpy does not yet check for search, present, delSet, concurrentOperations, namedResultSets, etc. and store the information is a usable form." } ], + [ "Services" => sub { " +### IRSpy does not yet check for search, present, delSet, +concurrentOperations, namedResultSets, etc. and store the information +is a usable form. This information should probably be harvested from +the Init Response. +" } ], [ "Bib-1 Use attributes" => \&calc_ap, $xc, "bib-1" ], [ "Dan-1 Use attributes" => \&calc_ap, $xc, "dan-1" ], [ "Operators" => \&calc_boolean, $xc ], - [ "Record syntaxes" => sub { "### SUTRS, USmarc, Danmarc" } ], - [ "Explain" => sub { "### CategoryList, TargetInfo, DatabaseInfo, RecordSyntaxInfo, AttributeSetInfo, AttributeDetails" } ], + [ "Named Result Sets" => \&calc_nrs, $xc ], + [ "Record syntaxes" => \&calc_recsyn, $xc ], + [ "Explain" => \&calc_explain, $xc ], );

<% xml_encode($xc->find("e:databaseInfo/e:title")) %>

@@ -131,7 +137,34 @@ sub calc_boolean { # The standard ZeeRex record should be extended with a # "supports" type for this. my @nodes = $xc->findnodes('i:status/i:boolean[@ok = "1"]'); - return join(", ", map { $_->findvalue('@operator') } @nodes); + my $res = join(", ", map { $_->findvalue('@operator') } @nodes); + $res = "[none]" if $res eq ""; + return $res; +} + +sub calc_nrs { + my($xc) = @_; + + my @nodes = $xc->findnodes('i:status/i:named_resultset[@ok = "1"]'); + return @nodes ? "Yes" : "No"; +} + +sub calc_recsyn { + my($xc) = @_; + + my @nodes = $xc->findnodes('e:recordInfo/e:recordSyntax'); + my $res = join(", ", map { $_->findvalue('@name') } @nodes); + $res = "[none]" if $res eq ""; + return $res; +} + +sub calc_explain { + my($xc) = @_; + + my @nodes = $xc->findnodes('i:status/i:explain[@ok = "1"]'); + my $res = join(", ", map { $_->findvalue('@category') } @nodes); + $res = "[none]" if $res eq ""; + return $res; }