- my $ptype = $xc->findvalue('@type', $pqf[0]);
- my $pval = $xc->findvalue(".", $pqf[0]);
+ # Just pick one if there's more than one: they all work
+
+ my $attrstr = "";
+ foreach my $attr ($xc->findnodes("z:attr", $pqf[0])) {
+ my $ptype = $xc->findvalue('@type', $attr);
+ my $pval = $xc->findvalue(".", $attr);
+ $attrstr .= " $ptype=$pval";
+ }