code: @Override
  	public void openDoc(final PrintWriter writer) {
  		UIContext uic = UIContextHolder.getCurrent();
  		String title = getApplicationTitle(uic);
  
  		writer.write(XMLUtil.getXMLDeclarationWithThemeXslt(uic));
  
  		StringBuilder rootElement = new StringBuilder();
  		rootElement.append("\n<ui:root title=\"");
  		rootElement.append(WebUtilities.encode(title));
  		rootElement.append("\" ");
  
  		Locale locale = I18nUtilities.getEffectiveLocale();
  		if (locale != null) {
  			String lang = locale.toLanguageTag();
  			if (lang != null) {
  				rootElement.append("lang=\"");
  				rootElement.append(WebUtilities.encode(locale.toLanguageTag()));
  				rootElement.append("\" ");
  			}
  		}
  
  		rootElement.append(XMLUtil.STANDARD_NAMESPACES);
  		rootElement.append(">");
  
  		writer.write(rootElement.toString());
  	}
docs: {@inheritDoc}