| 10844 | } |
| 10845 | |
| 10846 | xpath_string eval_string(const xpath_context& c, const xpath_stack& stack) |
| 10847 | { |
| 10848 | switch (_type) |
| 10849 | { |
| 10850 | case ast_string_constant: |
| 10851 | return xpath_string::from_const(_data.string); |
| 10852 | |
| 10853 | case ast_func_local_name_0: |
| 10854 | { |
| 10855 | xpath_node na = c.n; |
| 10856 | |
| 10857 | return xpath_string::from_const(local_name(na)); |
| 10858 | } |
| 10859 | |
| 10860 | case ast_func_local_name_1: |
| 10861 | { |
| 10862 | xpath_allocator_capture cr(stack.result); |
| 10863 | |
| 10864 | xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first); |
| 10865 | xpath_node na = ns.first(); |
| 10866 | |
| 10867 | return xpath_string::from_const(local_name(na)); |
| 10868 | } |
| 10869 | |
| 10870 | case ast_func_name_0: |
| 10871 | { |
| 10872 | xpath_node na = c.n; |
| 10873 | |
| 10874 | return xpath_string::from_const(qualified_name(na)); |
| 10875 | } |
| 10876 | |
| 10877 | case ast_func_name_1: |
| 10878 | { |
| 10879 | xpath_allocator_capture cr(stack.result); |
| 10880 | |
| 10881 | xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first); |
| 10882 | xpath_node na = ns.first(); |
| 10883 | |
| 10884 | return xpath_string::from_const(qualified_name(na)); |
| 10885 | } |
| 10886 | |
| 10887 | case ast_func_namespace_uri_0: |
| 10888 | { |
| 10889 | xpath_node na = c.n; |
| 10890 | |
| 10891 | return xpath_string::from_const(namespace_uri(na)); |
| 10892 | } |
| 10893 | |
| 10894 | case ast_func_namespace_uri_1: |
| 10895 | { |
| 10896 | xpath_allocator_capture cr(stack.result); |
| 10897 | |
| 10898 | xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first); |
| 10899 | xpath_node na = ns.first(); |
| 10900 | |
| 10901 | return xpath_string::from_const(namespace_uri(na)); |
| 10902 | } |
| 10903 |
no test coverage detected