code: public Object visit(QueryRootNode node, Object data) throws RepositoryException {
          StringBuilder sb = (StringBuilder) data;
          node.getLocationNode().accept(this, data);
          InternalQName[] selectProps = node.getSelectProperties();
          if (selectProps.length > 0) {
              sb.append('/');
              boolean union = selectProps.length > 1;
              if (union) {
                  sb.append('(');
              }
              String pipe = "";
              for (int i = 0; i < selectProps.length; i++) {
                  try {
                      sb.append(pipe);
                      sb.append('@');
                      sb.append(resolver.createJCRName(encode(selectProps[i])).getAsString());
                      pipe = "|";
                  } catch (NamespaceException e) {
                      exceptions.add(e);
                  }
              }
              if (union) {
                  sb.append(')');
              }
          }
          if (node.getOrderNode() != null) {
              node.getOrderNode().accept(this, data);
          }
          return data;
      }
docs: -------------< QueryNodeVisitor interface >-------------------------------