X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=web%2Fhtdocs%2Fdetails%2Ffull.mc;h=0ff52e617ee0ee0817fcf897fd96e6fb892e11f0;hp=baec2605480dd143c5027c5fee75f8bcfc706c28;hb=a83e6f252aa3b3cba0f10a190b9afb6ddf28ec43;hpb=972eca24396c60c078b458c6873b757780482227 diff --git a/web/htdocs/details/full.mc b/web/htdocs/details/full.mc index baec260..0ff52e6 100644 --- a/web/htdocs/details/full.mc +++ b/web/htdocs/details/full.mc @@ -1,4 +1,3 @@ -%# $Id: full.mc,v 1.30 2007-07-03 13:10:50 mike Exp $ <%args> $id @@ -50,6 +49,7 @@ if ($n == 0) { [ "Named Result Sets" => \&calc_nrs, $xc ], [ "Record syntaxes" => \&calc_recsyn, $xc ], [ "Explain" => \&calc_explain, $xc ], + [ "Multiple OPAC records" => \&calc_mor, $xc ], ); my $title = $xc->find("e:databaseInfo/e:title"); @@ -171,10 +171,13 @@ sub calc_boolean { return $res; } -sub calc_nrs { - my($id, $xc) = @_; +sub calc_nrs { _calc_boolean(@_, 'i:status/i:named_resultset[@ok = "1"]') } +sub calc_mor { _calc_boolean(@_, 'i:status/i:multiple_opac[@ok = "1"]') } + +sub _calc_boolean { + my($id, $xc, $xpath) = @_; - my @nodes = $xc->findnodes('i:status/i:named_resultset[@ok = "1"]'); + my @nodes = $xc->findnodes($xpath); return @nodes ? "Yes" : "No"; }