code: private List<Element> getNewChildren(final DitaClass cls, final Document doc) {
          final List<Element> res = new ArrayList<>();
          if (metaTable.containsKey(cls.matcher)) {
              metaTable.get(cls.matcher);
              final NodeList list = metaTable.get(cls.matcher).getChildNodes();
              for (int i = 0; i < list.getLength(); i++) {
                  Node item = list.item(i);
                  res.add((Element) doc.importNode(item, true));
              }
          }
          Collections.reverse(res);
          return res;
      }
docs: Get metadata elements to add to current document. Elements have been cloned and imported
  into the current document.
  
  @param cls element class of metadata elements
  @param doc current document
  @return list of metadata elements, may be empty