docs: protected static String buildTopicErrorTemplate(final BuildData buildData, final BaseTopicWrapper<?> topic,
              final String errorTemplate) {
          // Info topics cannot use the regular templates and the information should be hidden so just make a basic one
          if (topic.hasTag(buildData.getServerEntities().getInfoTagId())) {
              if (buildData.getDocBookVersion() == DocBookVersion.DOCBOOK_50) {
                  return DocBookUtilities.addDocBook50Namespace("<info><keywordset><keyword></keyword></keywordset></info>");
              } else {
                  return "<sectioninfo><keywordset><keyword></keyword></keywordset></sectioninfo>";
              }
          }
  
          // Replace the markers in the template with values
          String topicXMLErrorTemplate = errorTemplate;
          topicXMLErrorTemplate = topicXMLErrorTemplate.replaceAll(BuilderConstants.TOPIC_TITLE_REGEX, "Invalid Topic");
  
          // Set the topic id in the error
          final String errorXRefID = topic.getErrorXRefId();
          if (topic instanceof TranslatedTopicWrapper) {
              final Integer topicId = topic.getTopicId();
              final Integer topicRevision = topic.getTopicRevision();
              topicXMLErrorTemplate = topicXMLErrorTemplate.replaceAll(BuilderConstants.TOPIC_ID_REGEX,
                      topicId + ", Revision " + topicRevision);
          } else {
              topicXMLErrorTemplate = topicXMLErrorTemplate.replaceAll(BuilderConstants.TOPIC_ID_REGEX, Integer.toString(topic.getId()));
          }
  
          // Add the link to the errors page. If the errors page is suppressed then remove the injection point.
          if (!buildData.getBuildOptions().getSuppressErrorsPage()) {
              topicXMLErrorTemplate = topicXMLErrorTemplate.replaceAll(BuilderConstants.ERROR_XREF_REGEX,
                      "<para>Please review the compiler error " + "for <xref linkend=\"" + errorXRefID + "\"/> for more detailed " +
                              "information.</para>");
          } else {
              topicXMLErrorTemplate = topicXMLErrorTemplate.replaceAll(BuilderConstants.ERROR_XREF_REGEX, "");
          }
  
          // Replace the root section element if the topic is a revision history or a legal notice
          if (topic.hasTag(buildData.getServerEntities().getRevisionHistoryTagId())) {
              topicXMLErrorTemplate = topicXMLErrorTemplate.replaceAll("(?<=<(/)?)section(?=>)", "appendix");
          } else if (topic.hasTag(buildData.getServerEntities().getLegalNoticeTagId())) {
              topicXMLErrorTemplate = topicXMLErrorTemplate.replaceAll("(?<=<(/)?)section(?=>)", "legalnotice");
          } else if (topic.hasTag(buildData.getServerEntities().getAuthorGroupTagId())) {
              topicXMLErrorTemplate = topicXMLErrorTemplate.replaceAll("(?<=<(/)?)section(?=>)", "authorgroup");
          } else if (topic.hasTag(buildData.getServerEntities().getAbstractTagId())) {
              topicXMLErrorTemplate = topicXMLErrorTemplate.replaceAll("(?<=<(/)?)section(?=>)", "abstract");
          }
  
          // Add the namespaces for docbook 5
          if (buildData.getDocBookVersion() == DocBookVersion.DOCBOOK_50) {
              topicXMLErrorTemplate = DocBookUtilities.addDocBook50Namespace(topicXMLErrorTemplate);
          }
  
          return topicXMLErrorTemplate;
      }