Writes the value of a model node's attribute.
Tag Summary | |
---|---|
required |
<attr node="value" name="value" /> |
full tag |
<attr node="value" name="value" format="value" /> |
Required Attributes |
|
---|---|
node | A query expression specifying a single node in the model. |
name | The name of the attribute whose value is to be written |
Optional Attributes | |
---|---|
format | A list of period-separated format codes, indicating additional minor formating to be applied to the value before it is written. These codes do not affect the value in the model. |
Example | |
---|---|
<attr node="plugin/view id='%ref(viewer)%'" name="label" format="rw.l" /> The node attribute contains a dynamic attribute, so the query expression "ref(viewer)" is resolved first. This expression refers to the model node associated with variable name "ref" and resolves to the value of that node's attribute named "viewer". That value is substituted into the outer query expression, which starts at the node associated with name "plugin". The outer query expression steps from the node associated with variable "plugin" to all of its children named "view" who also have an id that's equal to the result of the inner expression. The first node in the resulting collection is used to retrieve a value for attribute "label". Before writing that value, all whitespace in the value is removed (code "rw") and all characters are changed to lower case (code "l"). |
© Copyright IBM Corporation 2000,
2006. All Rights Reserved.