} else if (queryNode.getType() == QueryNode.TYPE_PATH) {
root.addSelectProperty(name);
} else if (queryNode.getType() == QueryNode.TYPE_ORDER) {
root.getOrderNode().addOrderSpec(name, true);
} else if (queryNode.getType() == QueryNode.TYPE_TEXTSEARCH) {
TextsearchQueryNode ts = (TextsearchQueryNode)queryNode;
ts.addPathElement(new QPathEntry(name, 0));
if (isAttributeNameTest(node))
{
ts.setReferencesProperty(true);
}
}
} catch (RepositoryException e) {
exceptions.add(new InvalidQueryException("Illegal name: " + child.getValue()));
}