Sets the default attributes on tags that were specified in <global>
    tags in the XML file.
321372
def _set_global_defaults(xmlglobals):
    """"""
    for key, val in xmlglobals.items():
        if key != "defaults":
            for name, tag in val.items():
                _update_from_globals(tag, xmlglobals, None)
1114946
def set_global(node: Node, key: str, value: Any):
    """"""
    node.node_globals[key] = value
459950
public final void setLink(Attributes attributes) {
        lineValues[GpxMetadata.LINELINK_HREF] = attributes.getValue(GPXTags.HREF);
    }
297509
protected function setActionTags()
    {
        $form = $this->xml->getElementsByTagName('form')->item(0);
        $div = $this->xml->createElement('div');

        $input = $this->xml->createElement('input');
        $input->setAttribute('type', 'hidden');
        $input->setAttribute('name', 'ext');
        $input->setAttribute('value', $this->owner->name);
        $div->appendChild($input);

        $input = $this->xml->createElement('input');
        $input->setAttribute('type', 'hidden');
        $input->setAttribute('name', 'form');
        $input->setAttribute('value', $this->name);
        $div->appendChild($input);

        $form->appendChild($div);
    }
1318611
protected function setIgnoreTags()
    {
        if (!count($this->ignore_tags)) {
            $this->ignore_tags = array_keys($this->parser->tags->all());
        }
    }
732436
def set_defaults(self):
        
        for key, value in self.spec.items():
            setattr(self, key.upper(), value.get("default", None))
404528
public void setTags(java.util.Map<String, String> tags) {
        this.tags = tags == null ? null : new com.amazonaws.internal.SdkInternalMap<String, String>(tags);
    }
133599
public function configDefaults($tag)
    {
        if (count(config('html.default.'.$tag, []))) {
            foreach (config('html.default.'.$tag) as $name => $value) {
                $this->attr($name, $value);
            }
        }
    }
1236847
public void setTags(java.util.Collection<java.util.Map<String, String>> tags) {
        if (tags == null) {
            this.tags = null;
            return;
        }

        this.tags = new java.util.ArrayList<java.util.Map<String, String>>(tags);
    }
1004257
def __setAttributeDefaults(self):
        
        for k,v in self.__class__.attributes.items():
            if v is not None and self.attributes.has_key(k) is False:
                if isinstance(v, types.FunctionType):
                    self.attributes[k] = v(self)
                else:
                    self.attributes[k] = v
224188
private void initializeAttributes(AttributeSet attrs) {
    TypedArray attributes = getContext().obtainStyledAttributes(attrs, R.styleable.draggable_view);
    this.enableHorizontalAlphaEffect =
        attributes.getBoolean(R.styleable.draggable_view_enable_minimized_horizontal_alpha_effect,
            DEFAULT_ENABLE_HORIZONTAL_ALPHA_EFFECT);
    this.enableClickToMaximize =
        attributes.getBoolean(R.styleable.draggable_view_enable_click_to_maximize_view,
            DEFAULT_ENABLE_CLICK_TO_MAXIMIZE);
    this.enableClickToMinimize =
        attributes.getBoolean(R.styleable.draggable_view_enable_click_to_minimize_view,
            DEFAULT_ENABLE_CLICK_TO_MINIMIZE);
    this.topViewResize =
            attributes.getBoolean(R.styleable.draggable_view_top_view_resize, DEFAULT_TOP_VIEW_RESIZE);
    this.topViewHeight = attributes.getDimensionPixelSize(R.styleable.draggable_view_top_view_height,
            DEFAULT_TOP_VIEW_HEIGHT);
    this.scaleFactorX = attributes.getFloat(R.styleable.draggable_view_top_view_x_scale_factor,
            DEFAULT_SCALE_FACTOR);
    this.scaleFactorY = attributes.getFloat(R.styleable.draggable_view_top_view_y_scale_factor,
            DEFAULT_SCALE_FACTOR);
    this.marginBottom = attributes.getDimensionPixelSize(R.styleable.draggable_view_top_view_margin_bottom,
            DEFAULT_TOP_VIEW_MARGIN);
    this.marginRight = attributes.getDimensionPixelSize(R.styleable.draggable_view_top_view_margin_right,
            DEFAULT_TOP_VIEW_MARGIN);
    this.dragViewId =
            attributes.getResourceId(R.styleable.draggable_view_top_view_id, R.id.drag_view);
    this.secondViewId =
            attributes.getResourceId(R.styleable.draggable_view_bottom_view_id, R.id.second_view);
    attributes.recycle();
  }
1255691
private void checkAndAddDefaults(QName name, XMLAttributes atts) {
    List<RelaxNGDefaultValues.Attribute> def = defaults.getDefaultAttributes(
        name.localpart, name.uri);
    if (def != null) {
      for (RelaxNGDefaultValues.Attribute a : def) {
        //EXM-24143 it is possible that the namespace of the default attribute is empty
        //and the namespace of the attribute declared in the XMLAttributes is NULL.
        boolean alreadyDeclared = false;
        alreadyDeclared = atts.getIndex(a.namespace, a.localName) >= 0;
        if(! alreadyDeclared) {
          if("".equals(a.namespace)) {
            //Extra check with NULL Namespace
            alreadyDeclared = atts.getIndex(null, a.localName) >= 0;    
          }
        }
        
        if (! alreadyDeclared) {
          String prefix = null;
          String rawname = a.localName;
          if (a.namespace != null && a.namespace.length() > 0) {
            prefix = context.getPrefix(a.namespace);
            if (prefix == null) {
              for (int i = 0; i < atts.getLength(); i++) {
                String attname = atts.getQName(i);
                if (attname.startsWith("xmlns:")) {
                  if (a.namespace.equals(atts.getValue(i))) {
                    prefix = attname.substring(6);
                  }
                }
              }
            }

            if (prefix != null && prefix.length() > 0) {
              rawname = prefix + ":" + a.localName;
              // double check in case of no namespace aware parsers.
              // if we want to fully handle this case we may need further
              // processing.
              if (atts.getIndex(rawname) < 0) {
                QName attName = new QName(fSymbolTable.addSymbol(prefix),
                    fSymbolTable.addSymbol(a.localName), fSymbolTable.addSymbol(rawname),
                    fSymbolTable.addSymbol(a.namespace));
                atts.addAttribute(attName, "CDATA", a.value);
                int attrIndex = atts.getIndex(attName.uri, attName.localpart);
                atts.setSpecified(attrIndex, false);
              }
            } else {
              int k = 1;
              if(
                  //EXM-24494 Prefer this prefix
                  //See the implementation in: org.dita.dost.reader.MergeTopicParser.startElement(String, String, String, Attributes)
                  //If the file is a composite no attributes are copied from the root element.
                  "http://dita.oasis-open.org/architecture/2005/".equals(a.namespace)) {
                prefix = "ditaarch";
              } else {
              	prefix = "ns" + k;
              }
              while (context.getURI(prefix) != null
                  || atts.getValue("xmlns:" + prefix) != null) {
                k++;
                prefix = "ns" + k;
              }
              rawname = prefix + ":" + a.localName;

              QName attNs = new QName(fSymbolTable.addSymbol("xmlns"),
                  fSymbolTable.addSymbol(prefix), fSymbolTable.addSymbol("xmlns:" + prefix),
                  fSymbolTable.addSymbol("http://www.w3.org/2000/xmlns/"));
              atts.addAttribute(attNs, "CDATA", a.namespace);
              context.declarePrefix(prefix, a.namespace);

              QName attName = new QName(fSymbolTable.addSymbol(prefix),
                  fSymbolTable.addSymbol(a.localName), fSymbolTable.addSymbol(rawname),
                  fSymbolTable.addSymbol(a.namespace));
              atts.addAttribute(attName, "CDATA", a.value);
              int attrIndex = atts.getIndex(attName.uri, attName.localpart);
              atts.setSpecified(attrIndex, false);
            }
          } else {
            String attname = fSymbolTable.addSymbol(a.localName);
            QName attName = new QName(null, attname, attname, null);
            atts.addAttribute(attName, "CDATA", a.value);
            int attrIndex = atts.getIndex(attname);
            atts.setSpecified(attrIndex, false);
          }
        }
      }
    }
  }
46065
public void setInitialAttributes(File file, FileAttribute<?>... attrs) {
    // default values should already be sanitized by their providers
    for (int i = 0; i < defaultValues.size(); i++) {
      FileAttribute<?> attribute = defaultValues.get(i);

      int separatorIndex = attribute.name().indexOf(':');
      String view = attribute.name().substring(0, separatorIndex);
      String attr = attribute.name().substring(separatorIndex + 1);
      file.setAttribute(view, attr, attribute.value());
    }

    for (FileAttribute<?> attr : attrs) {
      setAttribute(file, attr.name(), attr.value(), true);
    }
  }
1291734
def _set_defaults(self):
        
        for field_name in self._fields:
            if field_name in self._init_fields:
                continue
            field = self.get_field(field_name)
            if hasattr(field, "default"):
                field.proxy_set(field.default)
1341558
def set_defaults(object, filter = method(:skip_default?))
      each do |attribute|
        next if filter.call(object, attribute)
        attribute.set_default_value(object)
      end
    end
1233651
public void setAttributes(java.util.Collection<Value> attributes) {
        if (attributes == null) {
            this.attributes = null;
            return;
        }

        this.attributes = new java.util.ArrayList<Value>(attributes);
    }
838922
def _set_defaults(self):
        
        self.contents.setdefault('log', [])
        self.contents.setdefault('rollback', None)
        self.contents.setdefault('rollforward', None)