docs: public static boolean useXhtmlContentType(HttpServletRequest request) {
  		// Some test accept headers:
  		//   Firefox: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
  		//   IE 6: */*
  		//   IE 8: */*
  		//   IE 8 Compat: */*
  		@SuppressWarnings("unchecked")
  		Enumeration<String> acceptValues = request.getHeaders("Accept");
  
  		boolean hasAcceptHeader = false;
  		boolean hasAcceptApplicationXhtmlXml = false;
  		boolean hasAcceptHtmlHtml = false;
  		boolean hasAcceptStarStar = false;
  		if(acceptValues!=null) {
  			while(acceptValues.hasMoreElements()) {
  				hasAcceptHeader = true;
  				for(String value : StringUtility.splitString(acceptValues.nextElement(), ',')) {
  					value = value.trim();
  					final List<String> params = StringUtility.splitString(value, ';');
  					final int paramsSize = params.size();
  					if(paramsSize>0) {
  						String acceptType = params.get(0).trim();
  						if(acceptType.equals("*/*")) {
  							// No q parameter parsing for */*
  							hasAcceptStarStar = true;
  						} else if(
  							// Parse and check the q for these two types
  							acceptType.equalsIgnoreCase(CONTENT_TYPE_XHTML)
  							|| acceptType.equalsIgnoreCase(CONTENT_TYPE_HTML)
  						) {
  							// Find any q value
  							boolean hasNegativeQ = false;
  							for(int paramNum = 1; paramNum<paramsSize; paramNum++) {
  								String paramSet = params.get(paramNum).trim();
  								if(paramSet.startsWith("q=") || paramSet.startsWith("Q=")) {
  									try {
  										float q = Float.parseFloat(paramSet.substring(2).trim());
  										if(q<0) {
  											hasNegativeQ = true;
  											break;
  										}
  									} catch(NumberFormatException err) {
  										// Intentionally ignored
  									}
  								}
  							}
  							if(!hasNegativeQ) {
  								if(acceptType.equalsIgnoreCase(CONTENT_TYPE_XHTML)) hasAcceptApplicationXhtmlXml = true;
  								else if(acceptType.equalsIgnoreCase(CONTENT_TYPE_HTML)) hasAcceptHtmlHtml = true;
  								else throw new AssertionError("Unexpected value for acceptType: "+acceptType);
  							}
  						}
  					}
  				}
  			}
  		}
  		// If the Accept header explicitly contains application/xhtml+xml  (with either no "q" parameter or a positive "q" value) deliver the document using that media type.
  		if(hasAcceptApplicationXhtmlXml) return true;
  		// If the Accept header explicitly contains text/html  (with either no "q" parameter or a positive "q" value) deliver the document using that media type.
  		if(hasAcceptHtmlHtml) return false;
  		// If the accept header contains "*/*" (a convention some user agents use to indicate that they will accept anything), deliver the document using text/html.
  		if(hasAcceptStarStar) return false;
  		// If has no accept headers
  		if(!hasAcceptHeader) return true;
  		// This choice is not clear from either of the cited documents.  If there is an accept line,
  		// and it doesn't have */* or application/xhtml+xml or text/html, we'll serve as text/html
  		// since it is a fairly broken client anyway and would be even less likely to know xhtml.
  		return false;
  
  	}