protected void processDocAttributes(
      DocumentModel doc, Element el, AttributeConfigDescriptor conf) {
    String targetDocProperty = conf.getTargetDocProperty();

    if (log.isDebugEnabled()) {
      log.debug(
          String.format(
              MSG_UPDATE_PROPERTY,
              targetDocProperty,
              el.getUniquePath(),
              doc.getPathAsString(),
              doc.getType(),
              conf.toString()));
    }
    Property property = doc.getProperty(targetDocProperty);

    if (property.isScalar()) {
      Object value = resolveAndEvaluateXmlNode(el, conf.getSingleXpath());
      if (log.isTraceEnabled()) {
        log.trace(
            String.format(
                MSG_UPDATE_PROPERTY_TRACE,
                targetDocProperty,
                el.getUniquePath(),
                value,
                conf.toString()));
      }
      property.setValue(value);

    } else if (property.isComplex()) {

      if (property instanceof BlobProperty) {
        Object value = resolveBlob(el, conf);
        if (log.isTraceEnabled()) {
          log.trace(
              String.format(
                  MSG_UPDATE_PROPERTY_TRACE,
                  targetDocProperty,
                  el.getUniquePath(),
                  value,
                  conf.toString()));
        }
        property.setValue(value);
      } else {
        Object value = resolveComplex(el, conf);
        if (log.isTraceEnabled()) {
          log.trace(
              String.format(
                  MSG_UPDATE_PROPERTY_TRACE,
                  targetDocProperty,
                  el.getUniquePath(),
                  value,
                  conf.toString()));
        }
        property.setValue(value);
      }

    } else if (property.isList()) {

      ListType lType = (ListType) property.getType();

      Serializable value;

      if (lType.getFieldType().isSimpleType()) {
        value = (Serializable) resolveAndEvaluateXmlNode(el, conf.getSingleXpath());
        if (value != null) {
          Object values = property.getValue();
          if (values instanceof List) {
            ((List) values).add(value);
            property.setValue(values);
          } else if (values instanceof Object[]) {
            List<Object> valuesList = new ArrayList<>();
            Collections.addAll(valuesList, (Object[]) property.getValue());
            valuesList.add(value);
            property.setValue(valuesList.toArray());
          } else {
            log.error(
                "Simple multi value property "
                    + targetDocProperty
                    + " is neither a List nor an Array");
          }
        }
      } else {
        value = (Serializable) resolveComplex(el, conf);
        if (value != null && !conf.getMapping().isEmpty()) {
          property.addValue(value);
        }
      }

      if (log.isTraceEnabled()) {
        log.trace(
            String.format(
                MSG_UPDATE_PROPERTY_TRACE,
                targetDocProperty,
                el.getUniquePath(),
                value,
                conf.toString()));
      }
    }
  }