If you added modifications to the Defined Action list box, the slider bar to the right of the Defined Action list box becomes active.
To complete the modification, follow these steps:
1. Click the slider bar to the right of the Defined Action list box.
The list box on the left of the dialog changes to Available Operations and displays a list of XModify commands as described in the following table.
|
XModify Command |
Description |
XAL |
|
append create-document clone insert-after insert-before insert-at remove-attribute remove-element replace replace-children set-attribute value-of variable |
Inserts an append. Inserts a create-document. Inserts a clone. Inserts an insert-after. Inserts a before. Inserts an insert-at. Inserts a remove-attribute. Inserts a remove-element. Inserts a replace. Inserts a replace-children. Inserts a set-attribute. Inserts a value-of. Binds an arbitrary variable name to some value. |
<xm:append > <xm:create_document > <xm:clone > <xm:insert-after > <xm:before > <xm:insert-at > <xm: remove-attribute > <xm: remove-element > <xm:replace > <xm:replace-children > <xm:set-attribute > <xm:value-of name="myvar"/> <xm:variable name="myvar" |
2. Select a macro operation as follows:
|
Figure 34: Avaialble Operations. |
Document: Leave blank for the specified XModify command to execute against the UI document. Or specify the name of another document - for example, a data document - against which to execute this XModify command. Available Operations: Select an XModify command and click Add. The command you selected appears in the Defined Operations list box. The tab at the bottom of the dialog displays the XPath Query builder for the selected command. |
3. Specify the XPath query syntax:
|
Figure 35: XPath Statement.
Figure 36: Build Xpath Expression Dialog |
XPath Query: Either: - Enter the XPath expression to select the location in the document where you want the XModify command to execute, Or: - Click To use the Build XPath Epression wizard: Data to append: Specify the XML-formatted data or UI components for this XModify command to act on at the selected location in this document. |
4. Click Finish.
Nexaweb Studio adds the complete macro to the Source of the selected file. The Macro appears in the Outline view.
5. To view the file, click the Visual Editor Source tab. The macro appears similar to the following, for a parameterized macro:
macro:macro xmlns:macro="http://openxal.org/core/macro" name="defaultMacro1">
<macro:macro xmlns:macro="http://openxal.org/core/macro" name="defaultMacro">
<xm:modifications xmlns:xm="http://openxal.org/core/xmodify">
<xm:set-attribute select="/xal/freePane">
<xm:attribute name="backgroundColor" value="white"/>
</xm:set-attribute>
</xm:modifications>
</macro:macro>