From: Bj?rn H?h. <hoe...@us...> - 2003-08-11 02:55:46
|
Update of /cvsroot/perl-css/CSS-SAC In directory sc8-pr-cvs1:/tmp/cvs-serv30494 Modified Files: SAC.pm Log Message: fix for various namespace related bugs Index: SAC.pm =================================================================== RCS file: /cvsroot/perl-css/CSS-SAC/SAC.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- SAC.pm 24 Oct 2001 10:54:50 -0000 1.10 +++ SAC.pm 11 Aug 2003 02:55:43 -0000 1.11 @@ -744,7 +744,7 @@ $lname = ($3 eq '*')?undef:$3; if (defined $2 and $2 eq '|') { if (!$1) { - $ns = $sac->[_ns_map_]->{'#default'} || ''; + $ns = ''; # |E matches elements in no namespace } elsif ($1 eq '*') { $ns = undef; # undef means all, '' means default @@ -754,7 +754,9 @@ } } else { - $ns = $sac->[_ns_map_]->{'#default'} || ''; + # E matches elements in the default namespace or + # any namespace if no default namespace is declared + $ns = $sac->[_ns_map_]->{'#default'} || undef; } # push it @@ -791,7 +793,7 @@ $lname = ($3 eq '*')?undef:$3; if (defined $2 and $2 eq '|') { if (!$1) { - $ns = $sac->[_ns_map_]->{'#default'} || ''; + $ns = '' # [|a] matches attributes in no namespace; } elsif ($1 eq '*') { $ns = undef; # undef means all, '' means default @@ -801,7 +803,7 @@ } } else { - $ns = $sac->[_ns_map_]->{'#default'} || ''; + $ns = ''; # [a] is equivalent to [|a] } # if there's more, parse on |