Make '0' and '' be equivalent to 'default' for the 'order' attribute of the <set> element. This makes defaulting actually work (missing attributes seem to get set to ''?).

This commit is contained in:
ian%hixie.ch 2001-12-04 13:08:39 +00:00
parent 9868c69a29
commit b382ef763c

View File

@ -474,7 +474,7 @@ sub genericSort {
my $self = shift;
my($order, @list) = @_;
# sort the list (in reverse order!)
if (defined($order) and scalar(@list)) {
if (defined($order) and $order and scalar(@list)) {
if ($order eq 'lexical') {
return sort { $b cmp $a } @list;
} elsif ($order eq 'reverse lexical') {