Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This would give rise to constant time look up in such cases. If this solution is not implemented, users can work around this problem wrapping lists in container nodes, with the container being included in the descendant query, e.g. instead of //books[@title='Matilda'], change the model and use //books/book[@title='Matilda'] as a query. This would then have O(1) performance.

Note: if we wish to avoid creating additional database fields, using list/container name field would offer the best balance of performance, e.g.

idparent_idanchor_idxpathcontainer
1NULL3/bookstorebookstore
213/bookstore/categories[@code='1']categories
323/bookstore/categories[@code='1']/books[@title='Matilda']books
423/bookstore/categories[@code='1']/books[@title='The Gruffalo']books

In this case, attributes for any list element path component would need to be looked up (so it would no longer be index-only).

Work Breakdown for Implementation

...