Add a kind element to the node tree. Improve support for XPath by