Changeset 8552
- Timestamp:
- 03/31/08 11:24:53 (8 months ago)
- Location:
- lang/perl/HTML-Selector-XPath/trunk
- Files:
-
- 2 modified
-
lib/HTML/Selector/XPath.pm (modified) (1 diff)
-
t/01_xpath.t (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/HTML-Selector-XPath/trunk/lib/HTML/Selector/XPath.pm
r1286 r8552 114 114 if ( $1 eq 'first-child') { 115 115 $parts[$#parts] = '*[1]/self::' . $parts[$#parts]; 116 } elsif ( $1 eq 'last-child') { 117 push @parts, '[not(following-sibling::*)]'; 116 118 } elsif ($1 =~ /^lang\(([\w\-]+)\)$/) { 117 119 push @parts, "[\@xml:lang='$1' or starts-with(\@xml:lang, '$1-')]"; -
lang/perl/HTML-Selector-XPath/trunk/t/01_xpath.t
r1284 r8552 126 126 --- xpath 127 127 //E[count(preceding-sibling::*) = 0] 128 129 === 130 --- selector 131 E:last-child 132 --- xpath 133 //E[not(following-sibling::*)] 134 135 136 === 137 --- selector 138 F E:last-child 139 --- xpath 140 //F//E[not(following-sibling::*)] 141 142 === 143 --- selector 144 F > E:last-child 145 --- xpath 146 //F/E[not(following-sibling::*)] 147
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)