add basic LyteDOMXPath, generalise some other code