@Override
  public boolean isWellFormed() {
    final String text = getUnescapedText();
    final char quoteChar = getQuoteChar();
    if (!text.endsWith(String.valueOf(quoteChar)) || text.indexOf(quoteChar) == text.lastIndexOf(quoteChar)) {
      return false;
    }

    if (getXPathVersion() == XPathVersion.V2) {
      final String value = getStringBetweenQuotes();
      final String unescaped = unescape(quoteChar, value);
      return escape(quoteChar, unescaped).equals(value);
    } else {
      if (getValue().indexOf(quoteChar) != -1) {
        return false;
      }
    }

    return !textContains('\n') && !textContains('\r');
  }
@Override
  public boolean isWellFormed()