docs: private void putElement(final String elemName, final Attributes atts, final boolean removeConref) throws SAXException {
          //parameter boolean removeConref specifies whether to remove
          //conref information like @conref @conaction in current element
          //when copying it to pushcontent. True means remove and false means
          //not remove.
          final Set<String> namespaces = new HashSet<>();
          try {
              pushcontentWriter.writeStartElement(elemName);
              for (int index = 0; index < atts.getLength(); index++) {
                  final String name = atts.getQName(index);
                  if (!removeConref ||
                          !ATTRIBUTE_NAME_CONREF.equals(name) && !ATTRIBUTE_NAME_CONACTION.equals(name)) {
                      String value = atts.getValue(index);
                      if (ATTRIBUTE_NAME_HREF.equals(name) || ATTRIBUTE_NAME_CONREF.equals(name)) {
                          // adjust href for pushbefore and replace
                          value = replaceURL(value);
                      }
                      final int offset = atts.getQName(index).indexOf(":");
                      final String prefix = offset != -1 ? atts.getQName(index).substring(0, offset) : "";
                      if (!namespaces.contains(prefix)) {
                          namespaces.add(prefix);
                          if (!prefix.isEmpty()) {
                              pushcontentWriter.writeNamespace(prefix, atts.getURI(index));
                          }
                      }
                      pushcontentWriter.writeAttribute(prefix, atts.getURI(index), atts.getLocalName(index), value);
                  }
              }
              //id attribute should only be added to the starting element
              //which dosen't have id attribute set
              if (ATTR_CONACTION_VALUE_PUSHREPLACE.equals(pushType) &&
                      atts.getValue(ATTRIBUTE_NAME_ID) == null &&
                      level == 1) {
                  final String fragment = target.getFragment();
                  if (fragment == null) {
                      //if there is no '#' in target string, report error
                      logger.error(MessageUtils.getMessage("DOTJ041E", target.toString()).toString());
                  } else {
                      String id;
                      //has element id
                      if (fragment.contains(SLASH)) {
                          id = fragment.substring(fragment.lastIndexOf(SLASH) + 1);
                      } else {
                          id = fragment;
                      }
                      //add id attribute
                      pushcontentWriter.writeAttribute(ATTRIBUTE_NAME_ID, id);
                  }
              }
          } catch (final XMLStreamException e) {
              throw new SAXException(e);
          }
      }