docs: public int scanLiteral(int quote, XMLString content)
  	throws IOException {
  
  	// load more characters, if needed
  	if (fCurrentEntity.position == fCurrentEntity.count) {
  	    load(0, true);
  	} else if (fCurrentEntity.position == fCurrentEntity.count - 1) {
  	    fCurrentEntity.ch[0] = fCurrentEntity.ch[fCurrentEntity.count - 1];
  	    load(1, false);
  	    fCurrentEntity.position = 0;
  	}
  
  	// normalize newlines
  	int offset = fCurrentEntity.position;
  	int c = fCurrentEntity.ch[offset];
  	int newlines = 0;
  	boolean external = fCurrentEntity.isExternal();
  	if (c == '\n' || (c == '\r' && external)) {
  	    do {
  		c = fCurrentEntity.ch[fCurrentEntity.position++];
  		if (c == '\r' && external) {
  		    newlines++;
  		    fCurrentEntity.lineNumber++;
  		    fCurrentEntity.columnNumber = 1;
  		    if (fCurrentEntity.position == fCurrentEntity.count) {
  			offset = 0;
  			fCurrentEntity.position = newlines;
  			if (load(newlines, false)) {
  			    break;
  			}
  		    }
  		    if (fCurrentEntity.ch[fCurrentEntity.position] == '\n') {
  			fCurrentEntity.position++;
  			offset++;
  		    }
  		    /*** NEWLINE NORMALIZATION ***/
  		    else {
  			newlines++;
  		    }
  		    /***/
  		}
  		else if (c == '\n') {
  		    newlines++;
  		    fCurrentEntity.lineNumber++;
  		    fCurrentEntity.columnNumber = 1;
  		    if (fCurrentEntity.position == fCurrentEntity.count) {
  			offset = 0;
  			fCurrentEntity.position = newlines;
  			if (load(newlines, false)) {
  			    break;
  			}
  		    }
  		    /*** NEWLINE NORMALIZATION ***
  			 if (fCurrentEntity.ch[fCurrentEntity.position] == '\r'
  			 && external) {
  			 fCurrentEntity.position++;
  			 offset++;
  			 }
  			 /***/
  		}
  		else {
  		    fCurrentEntity.position--;
  		    break;
  		}
  	    } while (fCurrentEntity.position < fCurrentEntity.count - 1);
  	    for (int i = offset; i < fCurrentEntity.position; i++) {
  		fCurrentEntity.ch[i] = '\n';
  	    }
  	    int length = fCurrentEntity.position - offset;
  	    if (fCurrentEntity.position == fCurrentEntity.count - 1) {
  		content.setValues(fCurrentEntity.ch, offset, length);
  		return -1;
  	    }
  	}
  
  	// scan literal value
  	while (fCurrentEntity.position < fCurrentEntity.count) {
  	    c = fCurrentEntity.ch[fCurrentEntity.position++];
  	    if ((c == quote &&
  		 (!fCurrentEntity.literal || external))
  		|| c == '%' || !XMLChar.isContent(c)) {
  		fCurrentEntity.position--;
  		break;
  	    }
  	}
  	int length = fCurrentEntity.position - offset;
  	fCurrentEntity.columnNumber += length - newlines;
  	content.setValues(fCurrentEntity.ch, offset, length);
  
  	// return next character
  	if (fCurrentEntity.position != fCurrentEntity.count) {
  	    c = fCurrentEntity.ch[fCurrentEntity.position];
  	    // NOTE: We don't want to accidentally signal the
  	    //       end of the literal if we're expanding an
  	    //       entity appearing in the literal. -Ac
  	    if (c == quote && fCurrentEntity.literal) {
  		c = -1;
  	    }
  	}
  	else {
  	    c = -1;
  	}
  	return c;
  
      }