From 1e25c91bcaabcbb9f503351518af3b46f5674843 Mon Sep 17 00:00:00 2001 From: Davide Brunato Date: Thu, 12 Dec 2019 21:59:21 +0100 Subject: [PATCH] Fix issue #13 --- elementpath/xpath1_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elementpath/xpath1_parser.py b/elementpath/xpath1_parser.py index b0a6f3d5..eeaf5971 100644 --- a/elementpath/xpath1_parser.py +++ b/elementpath/xpath1_parser.py @@ -1071,12 +1071,12 @@ def evaluate(self, context=None): for k in range(len(self))) -@method(function('string-length', nargs=1)) +@method(function('string-length', nargs=(0, 1))) def evaluate(self, context=None): return len(self.get_argument(context, default_to_context=True, default='', cls=string_base_type)) -@method(function('normalize-space', nargs=1)) +@method(function('normalize-space', nargs=(0, 1))) def evaluate(self, context=None): if self.parser.version == '1.0': arg = self.string_value(self.get_argument(context, default_to_context=True, default=''))