use seq//1 and ... //0 which are now available in library(dcgs)
This commit is contained in:
@@ -540,7 +540,7 @@ xpath_condition(contains(Haystack, Needle), Value) :- % contains(Haysta
|
|||||||
!,
|
!,
|
||||||
val_or_function(Haystack, Value, HaystackValue),
|
val_or_function(Haystack, Value, HaystackValue),
|
||||||
val_or_function(Needle, Value, NeedleValue),
|
val_or_function(Needle, Value, NeedleValue),
|
||||||
( phrase((list(_),list(NeedleValue),list(_)), HaystackValue)
|
( phrase((...,seq(NeedleValue),...), HaystackValue)
|
||||||
-> true
|
-> true
|
||||||
).
|
).
|
||||||
xpath_condition(Spec, Dom) :-
|
xpath_condition(Spec, Dom) :-
|
||||||
@@ -626,10 +626,7 @@ text_of_list([H|T]) -->
|
|||||||
|
|
||||||
text_of_1(element(_,_,Content)) -->
|
text_of_1(element(_,_,Content)) -->
|
||||||
text_of_list(Content).
|
text_of_list(Content).
|
||||||
text_of_1([C|Cs]) --> list([C|Cs]).
|
text_of_1([C|Cs]) --> seq([C|Cs]).
|
||||||
|
|
||||||
list([]) --> [].
|
|
||||||
list([L|Ls]) --> [L], list(Ls).
|
|
||||||
|
|
||||||
% For now, we use number_chars/2 to parse XML numbers.
|
% For now, we use number_chars/2 to parse XML numbers.
|
||||||
% If the need arises, we can extend this to additional
|
% If the need arises, we can extend this to additional
|
||||||
|
|||||||
Reference in New Issue
Block a user