Difference between revisions of "Bootstrap Element (Data)"

From HLKitWiki
Jump to: navigation, search
(The "bootstrap" Element)
(The "bootstrap" Element)
Line 28: Line 28:
 
|[[AutoTag Element (Data)|autotag]]
 
|[[AutoTag Element (Data)|autotag]]
 
|Zero or more "autotag" elements may appear as defined by the given link. This element specifies tags that are automatically assigned to the added thing.
 
|Zero or more "autotag" elements may appear as defined by the given link. This element specifies tags that are automatically assigned to the added thing.
 +
|-
 +
|[[#assignval|assignval]]
 +
|Zero or more "assignval" elements may appear as defined by the given link. This element specifies modified field values that are automatically assigned to the added thing.
 
|-
 
|-
 
|}
 
|}

Revision as of 17:43, 19 February 2009

Context: HL KitKit Reference  … Multiple Sources

The "bootstrap" Element

In a variety of situations, you will be able to specify individual things that should be automatically added to a container as picks. This process is called bootstrapping and has a diverse set of special rules that must be observed. Each bootstrapped thing is specified through the use of a "bootstrap" element. The complete list of attributes for this element is below.

thing Id – Specifies the unique id of the thing that is to be automatically added to the container.
index (Optional) Integer – Specifies a unique index value for this bootstrap entry. Only global bootstraps that add things to all actors require this attribute and it can be omitted in all other situations. Default: "0".

WARNING! The index is used to uniquely identify this specific bootstrap within saved portfolios. Consequently, it must never be changed or re-used within different versions of the data files. If you eliminate a bootstrap entry, simply leave that index value unused, replacing the old "bootstrap" element with a comment explaining why the hole in numbering is left.

The "bootstrap" element also possesses child elements that pertain to the automatically added things. The list of these child elements is below and must appear in the order shown. Click on the link to access the details for each element.

match An optional "match" element may appear as defined by the given link. This element defines the Match Tag Expression. If omitted, all things are assumed to match and the bootstrap is assigned to all.

IMPORTANT! This element is only applicable when the bootstrap is defined directly within a component. In all other cases, this element may not be specified.

containerreq An optional "containerreq" element may appear as defined by the given link. This element defines the conditional requirements that determine whether the bootstrap is made available within the container. The tag expression is applied against the container of the prospective bootstrapped pick. If the container does not satisfy the tag expression, the bootstrapped pick is treated as non-live.

IMPORTANT! This element is not applicable when the bootstrap is defined within an entity.

autotag Zero or more "autotag" elements may appear as defined by the given link. This element specifies tags that are automatically assigned to the added thing.
assignval Zero or more "assignval" elements may appear as defined by the given link. This element specifies modified field values that are automatically assigned to the added thing.

The "match" Element

The "match" element defines the Match tag expression that determines whether a particular thing receives the specified bootstrap. The tag expression is applied against each thing derived from the component, and the bootstrap is only assigned to things that satisfy the tag expression. The complete list of attributes for this element is below.

PCDATA TagExpr – Specifies the code comprising the Match tag expression.

Example

The following example demonstrates what a "bootstrap" element might look like. All default values are assumed for optional attributes.

<bootstrap thing="AttrIncr">
  <containerreq phase="Setup" priority="500">
    val:Level.? >= 4
    </container>
  <autotag group="TheGroup" tag="TheTag"/>
  </bootstrap>