| 6159 | } |
| 6160 | |
| 6161 | xpath_node xpath_first(const xpath_node* begin, const xpath_node* end, xpath_node_set::type_t type) |
| 6162 | { |
| 6163 | if (begin == end) return xpath_node(); |
| 6164 | |
| 6165 | switch (type) |
| 6166 | { |
| 6167 | case xpath_node_set::type_sorted: |
| 6168 | return *begin; |
| 6169 | |
| 6170 | case xpath_node_set::type_sorted_reverse: |
| 6171 | return *(end - 1); |
| 6172 | |
| 6173 | case xpath_node_set::type_unsorted: |
| 6174 | return *min_element(begin, end, document_order_comparator()); |
| 6175 | |
| 6176 | default: |
| 6177 | assert(!"Invalid node set type"); |
| 6178 | return xpath_node(); |
| 6179 | } |
| 6180 | } |
| 6181 | class xpath_node_set_raw |
| 6182 | { |
| 6183 | xpath_node_set::type_t _type; |
no test coverage detected