Fix XPath return type for contains() and string-length()
git-svn-id: http://pugixml.googlecode.com/svn/trunk@944 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
2e4f6c54a8
commit
33301e9f42
1 changed files with 2 additions and 2 deletions
|
@ -8883,7 +8883,7 @@ PUGI__NS_BEGIN
|
|||
return new (alloc_node()) xpath_ast_node(ast_func_count, xpath_type_number, args[0]);
|
||||
}
|
||||
else if (name == PUGIXML_TEXT("contains") && argc == 2)
|
||||
return new (alloc_node()) xpath_ast_node(ast_func_contains, xpath_type_string, args[0], args[1]);
|
||||
return new (alloc_node()) xpath_ast_node(ast_func_contains, xpath_type_boolean, args[0], args[1]);
|
||||
else if (name == PUGIXML_TEXT("concat") && argc >= 2)
|
||||
return new (alloc_node()) xpath_ast_node(ast_func_concat, xpath_type_string, args[0], args[1]);
|
||||
else if (name == PUGIXML_TEXT("ceiling") && argc == 1)
|
||||
|
@ -8945,7 +8945,7 @@ PUGI__NS_BEGIN
|
|||
if (name == PUGIXML_TEXT("string") && argc <= 1)
|
||||
return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_0 : ast_func_string_1, xpath_type_string, args[0]);
|
||||
else if (name == PUGIXML_TEXT("string-length") && argc <= 1)
|
||||
return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_length_0 : ast_func_string_length_1, xpath_type_string, args[0]);
|
||||
return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_length_0 : ast_func_string_length_1, xpath_type_number, args[0]);
|
||||
else if (name == PUGIXML_TEXT("starts-with") && argc == 2)
|
||||
return new (alloc_node()) xpath_ast_node(ast_func_starts_with, xpath_type_boolean, args[0], args[1]);
|
||||
else if (name == PUGIXML_TEXT("substring-before") && argc == 2)
|
||||
|
|
Loading…
Add table
Reference in a new issue