private static boolean isHtml(XmlElementDescriptor o) {
    if (o instanceof CompositeDescriptor) {
      for (DElementPattern pattern : ((CompositeDescriptor)o).getElementPatterns()) {
        if (isHtml(pattern)) return true;
      }
    } else if (o instanceof RngElementDescriptor) {
      return isHtml(((RngElementDescriptor)o).getElementPattern());
    }
    return false;
  }
private static boolean isHtml(XmlElementDescriptor o)