while (length > 0 && isWhiteSpace(chars.charAt(start))) { --length; if(length > 0) ++start; } while (length > 0 && isWhiteSpace(chars.charAt(start + length - 1))) { --length; }
	public void characters(CharSequence chars) throws TransformerException {		int start = 0, length = chars.length();		while (length > 0 && isWhiteSpace(chars.charAt(start))) {			--length;			if(length > 0)				++start;		}		while (length > 0 && isWhiteSpace(chars.charAt(start + length - 1))) {			--length;		}		if(length == 0)			return;	// whitespace only: skip		if(start > 0 || length < chars.length()) {			chars = chars.subSequence(start, length);	// drop whitespace		}		for(int i = 0; i < chars.length(); i++) {			if(chars.charAt(i) == '\n') {				sameline = false;			}		}		super.characters(chars);	}