code: public ChainWriter encodeXhtml(Object value) throws IOException {
  		if(value!=null) {
  			if(
  				value instanceof Writable
  				&& !((Writable)value).isFastToString()
  			) {
  				// Avoid unnecessary toString calls
  				Coercion.write(value, textInXhtmlEncoder, out);
  			} else {
  				String str = Coercion.toString(value);
  				BundleLookupMarkup lookupMarkup;
  				BundleLookupThreadContext threadContext = BundleLookupThreadContext.getThreadContext(false);
  				if(threadContext!=null) {
  					lookupMarkup = threadContext.getLookupMarkup(str);
  				} else {
  					lookupMarkup = null;
  				}
  				if(lookupMarkup!=null) lookupMarkup.appendPrefixTo(MarkupType.XHTML, out);
  				textInXhtmlEncoder.write(str, out);
  				if(lookupMarkup!=null) lookupMarkup.appendSuffixTo(MarkupType.XHTML, out);
  			}
  		}
  		return this;
  	}
docs: @see  TextInXhtmlEncoder
  
  @param  value  the value to be encoded