Toolic
I have modified your suggestion (I needed the ones that weren't suppressed) as this seemed to cope with the added requirements for testing for other attributes and values. Thansk for this suggestion
My code is something like this:
my $numOfQuots = 0;
if ( my @qps = $elt->children('qp') ) {
foreach my $qp (@qps) {
foreach my $q ($qp->children( qr/^(q|xr)$/ ) ) {
$numOfQuots++ if (($q->att('supp') ne 'yes')
&& ($q->att('info') ne 'yes') &&
($q->att('info') ne 'info') &&
($q->att('info') ne 'intro') &&
($q->att('style') ne 'IMPL'));
}
}
}
|