Bootstrap Element (Data): Difference between revisions

From HLKitWiki
Jump to navigationJump to search
No edit summary
Line 22: Line 22:
{{important}}This element is only applicable when the bootstrap is defined within a component. In all other cases, this element may not be specified.
{{important}}This element is only applicable when the bootstrap is defined within a component. In all other cases, this element may not be specified.
|-
|-
|[[#container|container]]
|[[ContainerReq Element (Data)|containerreq]]
|A single "container" element must appear as defined by the given link. This element defines the [[Container Tag Expression]].
|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.
{{important}}This element is not applicable when the bootstrap is defined within an entity.
|-
|-
Line 38: Line 38:
|class="leftnormal"|PCDATA
|class="leftnormal"|PCDATA
|TagExpr – Specifies the code comprising the Match tag expression.
|TagExpr – Specifies the code comprising the Match tag expression.
|-
|}
==The "container" Element{{anchor|container}}==
The "container" element defines the [[Container Tag Expression|Container tag expression]] that determines 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. The complete list of attributes for this element is below.
:{| class="infotable"
|class="leftnormal"|PCDATA
|TagExpr – Specifies the code comprising the Container tag expression.
|-
|-
|}
|}
Line 57: Line 47:
<pre>
<pre>
<bootstrap thing="AttrIncr">
<bootstrap thing="AttrIncr">
   <container phase="Setup" priority="500">
   <containerreq phase="Setup" priority="500">
     val:Level.? >= 4
     val:Level.? >= 4
     </container>
     </container>

Revision as of 12:05, 28 November 2008

Context: HL Kit &#133; Kit Reference  &#133; 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 differnt 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.

IMPORTANT! This element is only applicable when the bootstrap is defined 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.

The "match" Element

The "match" element defines the Match script 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>