code: private static void renderHelper(final WebXmlRenderContext renderContext,
  			final Diagnosable component,
  			final List<Diagnostic> diags,
  			final int severity) {
  		if (diags.isEmpty()) {
  			return;
  		}
  
  		XmlStringBuilder xml = renderContext.getWriter();
  
  		xml.appendTagOpen(TAG_NAME);
  		xml.appendAttribute("id", "_wc_".concat(UUID.randomUUID().toString()));
  		xml.appendAttribute("type", getLevel(severity));
  		xml.appendAttribute("for", component.getId());
  		xml.appendClose();
  		for (Diagnostic diagnostic : diags) {
  			xml.appendTag(MESSAGE_TAG_NAME);
  			xml.appendEscaped(diagnostic.getDescription());
  			xml.appendEndTag(MESSAGE_TAG_NAME);
  		}
  		xml.appendEndTag(TAG_NAME);
  	}
docs: Render the diagnostics.
  @param renderContext the current renderContext
  @param component the component being rendered
  @param diags the list of Diagnostic objects
  @param severity the severity we are rendering