The XPath rules for functions require lookahead:
http://www.w3.org/TR/xpath/#exprlex
If the character following an NCName (possibly after intervening ExprWhitespace) is (, then the token must be recognized as a NodeType or a FunctionName.
libslax does not handle the case when the whitespace contains a newline:
Bock [slax/libslax]% build/slaxproc/slaxproc --format > /dev/null
version 1.1;
var $x = concat(a,b);
Bock [slax/libslax]% build/slaxproc/slaxproc --format > /dev/null
version 1.1;
var $x = concat
(a,b);
-:3: unexpected input: '('; expected semi-colon (';')
-: 1 error detected during parsing (0)
slaxproc: cannot parse file: '-'
Bock [slax/libslax]% build/slaxproc/slaxproc --format > /dev/null
version 1.1;
var $x = concat (a,b);
Bock [slax/libslax]%
The first and third case work correctly, but the second, where a newline is present, does not.
Thanks,
Phil
The XPath rules for functions require lookahead:
http://www.w3.org/TR/xpath/#exprlex
If the character following an NCName (possibly after intervening ExprWhitespace) is (, then the token must be recognized as a NodeType or a FunctionName.
libslax does not handle the case when the whitespace contains a newline:
Bock [slax/libslax]% build/slaxproc/slaxproc --format > /dev/null
version 1.1;
var $x = concat(a,b);
Bock [slax/libslax]% build/slaxproc/slaxproc --format > /dev/null
version 1.1;
var $x = concat
(a,b);
-:3: unexpected input: '('; expected semi-colon (';')
-: 1 error detected during parsing (0)
slaxproc: cannot parse file: '-'
Bock [slax/libslax]% build/slaxproc/slaxproc --format > /dev/null
version 1.1;
var $x = concat (a,b);
Bock [slax/libslax]%
The first and third case work correctly, but the second, where a newline is present, does not.
Thanks,
Phil