From: Markus Triska Date: Sat, 27 Nov 2021 15:19:16 +0000 (+0100) Subject: use seq//1 and ... //0 which are now available in library(dcgs) X-Git-Tag: v0.9.0~21^2~1 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=25a06b0bea360d9c30768da99243afe4a4572e7f;p=scryer-prolog.git use seq//1 and ... //0 which are now available in library(dcgs) --- diff --git a/src/lib/xpath.pl b/src/lib/xpath.pl index d5e13c6d..1701e424 100644 --- a/src/lib/xpath.pl +++ b/src/lib/xpath.pl @@ -540,7 +540,7 @@ xpath_condition(contains(Haystack, Needle), Value) :- % contains(Haysta !, val_or_function(Haystack, Value, HaystackValue), val_or_function(Needle, Value, NeedleValue), - ( phrase((list(_),list(NeedleValue),list(_)), HaystackValue) + ( phrase((...,seq(NeedleValue),...), HaystackValue) -> true ). xpath_condition(Spec, Dom) :- @@ -626,10 +626,7 @@ text_of_list([H|T]) --> text_of_1(element(_,_,Content)) --> text_of_list(Content). -text_of_1([C|Cs]) --> list([C|Cs]). - -list([]) --> []. -list([L|Ls]) --> [L], list(Ls). +text_of_1([C|Cs]) --> seq([C|Cs]). % For now, we use number_chars/2 to parse XML numbers. % If the need arises, we can extend this to additional