| 6130 | } |
| 6131 | |
| 6132 | PUGI__FN const void* document_order(const xpath_node& xnode) |
| 6133 | { |
| 6134 | xml_node_struct* node = xnode.node().internal_object(); |
| 6135 | |
| 6136 | if (node) |
| 6137 | { |
| 6138 | if (node->name && (node->header & xml_memory_page_name_allocated_mask) == 0) return node->name; |
| 6139 | if (node->value && (node->header & xml_memory_page_value_allocated_mask) == 0) return node->value; |
| 6140 | return 0; |
| 6141 | } |
| 6142 | |
| 6143 | xml_attribute_struct* attr = xnode.attribute().internal_object(); |
| 6144 | |
| 6145 | if (attr) |
| 6146 | { |
| 6147 | if ((attr->header & xml_memory_page_name_allocated_mask) == 0) return attr->name; |
| 6148 | if ((attr->header & xml_memory_page_value_allocated_mask) == 0) return attr->value; |
| 6149 | return 0; |
| 6150 | } |
| 6151 | |
| 6152 | return 0; |
| 6153 | } |
| 6154 | |
| 6155 | struct document_order_comparator |
| 6156 | { |
no test coverage detected