} 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(PATH_FACTORY.createElement(name));
if (isAttributeNameTest(node)) {
ts.setReferencesProperty(true);
}
}
} catch (RepositoryException e) {
exceptions.add(new InvalidQueryException("Illegal name: " + child.getValue()));
}