code: public int getValueIndex() {
  
          int result = 0;
          Node previousSibling = getElement().getPreviousSibling();
          while (previousSibling != null) {
              result++;
              previousSibling = previousSibling.getPreviousSibling();
          }
          return result;
      }
docs: Returns the attribute value index.<p>
  
  @return the attribute value index