support name and text in tree data source

rebase and squash of @jmgekeler branch in pull request #787