code: public static List<String> checkTopicContentBasedOnType(final ServerSettingsWrapper serverSettings, final BaseTopicWrapper<?> topic,
              final Document doc, boolean skipNestedSectionValidation) {
          final ServerEntitiesWrapper serverEntities = serverSettings.getEntities();
          final List<String> xmlErrors = new ArrayList<String>();
  
          if (topic.hasTag(serverEntities.getRevisionHistoryTagId())) {
              // Check to make sure that a revhistory entry exists
              final String revHistoryErrors = DocBookUtilities.validateRevisionHistory(doc, DATE_FORMATS);
              if (revHistoryErrors != null) {
                  xmlErrors.add(revHistoryErrors);
              }
          } else if (topic.hasTag(serverEntities.getInfoTagId())) {
              // Check that the info topic doesn't contain invalid fields
              if (DocBookUtilities.checkForInvalidInfoElements(doc)) {
                  xmlErrors.add("Info topics cannot contain <title>, <subtitle> or <titleabbrev> elements.");
              }
          } else if (isTopicANormalTopic(topic, serverSettings)) {
              // Check that nested sections aren't used
              final List<Node> subSections = XMLUtilities.getDirectChildNodes(doc.getDocumentElement(), "section");
              if (subSections.size() > 0 && !skipNestedSectionValidation) {
                  xmlErrors.add("Nested sections cannot be used in topics. Please consider breaking the content into multiple topics.");
              }
          }
  
          return xmlErrors;
      }
docs: Check a topic and return an error messages if the content doesn't match the topic type.
  
  @param serverSettings              The server settings.
  @param topic                       The topic to check the content for.
  @param doc                         The topics XML DOM Document.
  @param skipNestedSectionValidation Whether or not nested section validation should be performed.
  @return A list of error messages for any invalid content found, otherwise an empty list.