| 8338 | } |
| 8339 | |
| 8340 | xpath_string eval_string(const xpath_context& c, const xpath_stack& stack) |
| 8341 | { |
| 8342 | switch (_type) |
| 8343 | { |
| 8344 | case ast_string_constant: |
| 8345 | return xpath_string_const(_data.string); |
| 8346 | |
| 8347 | case ast_func_local_name_0: |
| 8348 | { |
| 8349 | xpath_node na = c.n; |
| 8350 | |
| 8351 | return xpath_string_const(local_name(na)); |
| 8352 | } |
| 8353 | |
| 8354 | case ast_func_local_name_1: |
| 8355 | { |
| 8356 | xpath_allocator_capture cr(stack.result); |
| 8357 | |
| 8358 | xpath_node_set_raw ns = _left->eval_node_set(c, stack); |
| 8359 | xpath_node na = ns.first(); |
| 8360 | |
| 8361 | return xpath_string_const(local_name(na)); |
| 8362 | } |
| 8363 | |
| 8364 | case ast_func_name_0: |
| 8365 | { |
| 8366 | xpath_node na = c.n; |
| 8367 | |
| 8368 | return xpath_string_const(qualified_name(na)); |
| 8369 | } |
| 8370 | |
| 8371 | case ast_func_name_1: |
| 8372 | { |
| 8373 | xpath_allocator_capture cr(stack.result); |
| 8374 | |
| 8375 | xpath_node_set_raw ns = _left->eval_node_set(c, stack); |
| 8376 | xpath_node na = ns.first(); |
| 8377 | |
| 8378 | return xpath_string_const(qualified_name(na)); |
| 8379 | } |
| 8380 | |
| 8381 | case ast_func_namespace_uri_0: |
| 8382 | { |
| 8383 | xpath_node na = c.n; |
| 8384 | |
| 8385 | return xpath_string_const(namespace_uri(na)); |
| 8386 | } |
| 8387 | |
| 8388 | case ast_func_namespace_uri_1: |
| 8389 | { |
| 8390 | xpath_allocator_capture cr(stack.result); |
| 8391 | |
| 8392 | xpath_node_set_raw ns = _left->eval_node_set(c, stack); |
| 8393 | xpath_node na = ns.first(); |
| 8394 | |
| 8395 | return xpath_string_const(namespace_uri(na)); |
| 8396 | } |
| 8397 |
no test coverage detected