docs: public static void getTopicLinkIds(final Node node, final Set<String> linkIds) {
          // If the node is null then there isn't anything to find, so just return.
          if (node == null) {
              return;
          }
  
          if (node.getNodeName().equals("xref") || node.getNodeName().equals("link")) {
              final NamedNodeMap attributes = node.getAttributes();
              if (attributes != null) {
                  final Node idAttribute = attributes.getNamedItem("linkend");
                  if (idAttribute != null) {
                      final String idAttributeValue = idAttribute.getNodeValue();
                      linkIds.add(idAttributeValue);
                  }
              }
          }
  
          final NodeList elements = node.getChildNodes();
          for (int i = 0; i < elements.getLength(); ++i) {
              getTopicLinkIds(elements.item(i), linkIds);
          }
      }