diff --git a/Changes b/Changes index c349f56..0e95ca9 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,7 @@ {{$NEXT}} + - more fixes to XML :omit option + - document some PDF 2.0 tags + - add :Lang to root element in doco and tests 0.1.14 2023-10-28T14:27:41+13:00 - Avoid whitespace in some tag XML serialization e.g. diff --git a/lib/PDF/Tags/XPath/Actions.rakumod b/lib/PDF/Tags/XPath/Actions.rakumod index c64e0f6..778d3df 100644 --- a/lib/PDF/Tags/XPath/Actions.rakumod +++ b/lib/PDF/Tags/XPath/Actions.rakumod @@ -57,8 +57,9 @@ class PDF::Tags::XPath::Actions { make -> @set { my @step; for @set { - my @group = &axis($_).grep(&node-test); - @group = ($_)(@group) with &predicate; + my @group = .&axis.grep(&node-test); + @group .= &predicate + if &predicate.defined; @step.append: @group; } @step; @@ -75,7 +76,7 @@ class PDF::Tags::XPath::Actions { ++$*position; my $v := &expr(); take $_ if ($v ~~ Bool && $v) - || ($v ~~ Int && $v == $*position); + || ($v ~~ Int && $v == $*position); } } }