From 1205bf12d1c393229ed5b84b2750332303411510 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 6 Nov 2006 17:04:23 +0000 Subject: [PATCH] Dan-1 use attributes. --- web/htdocs/details/full.mc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/web/htdocs/details/full.mc b/web/htdocs/details/full.mc index b1b5f3a..cb2df50 100644 --- a/web/htdocs/details/full.mc +++ b/web/htdocs/details/full.mc @@ -1,4 +1,4 @@ -%# $Id: full.mc,v 1.8 2006-11-06 17:01:03 mike Exp $ +%# $Id: full.mc,v 1.9 2006-11-06 17:04:23 mike Exp $ <%args> $id @@ -45,7 +45,8 @@ if ($n == 0) { [ "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." } ], - [ "Bib-1 Use attributes" => \&calc_bib1, $xc ], + [ "Bib-1 Use attributes" => \&calc_ap, $xc, "bib-1" ], + [ "Dan-1 Use attributes" => \&calc_ap, $xc, "dan-1" ], [ "Operators" => sub { "### and, or, not" } ], [ "Record syntaxes" => sub { "### SUTRS, USmarc, Danmarc" } ], [ "Explain" => sub { "### CategoryList, TargetInfo, DatabaseInfo, RecordSyntaxInfo, AttributeSetInfo, AttributeDetails" } ], @@ -85,11 +86,12 @@ sub calc_reliability { return "$nok/$nall = " . int(100*$nok/$nall) . "%"; } -sub calc_bib1 { - my($xc) = @_; +sub calc_ap { + my($xc, $set) = @_; - my @bib1nodes = $xc->findnodes('e:indexInfo/e:index/e:map/e:attr[ - @set = "bib-1" and @type = "1"]'); + my $expr = 'e:indexInfo/e:index/e:map/e:attr[ + @set = "'.$set.'" and @type = "1"]'; + my @bib1nodes = $xc->findnodes($expr); my $nbib1 = @bib1nodes; return "[none]" if $nbib1 == 0; -- 1.7.10.4