Cybersecurity
DevOps Cloud (ADM)
IT Operations Cloud
<do-append-xml-element expression="$XML-TEXT/modify" name="modify-attr"/>
<modify>
<modify-attr>
<add-value>
<value></value>
</add-value>
</modify-attr>
<modify>
<do-set-xml-attr expression="$XML-TEXT/modify/modify-attr" name="attr-name">
<arg-string>
<token-text xml:space="preserve">MyAttribute</token-text>
</arg-string>
</do-set-xml-attr>
<modify>
<modify-attr attr-name='MyAttribute'>
<add-value>
<value type='string></value>
</add-value>
</modify-attr>
<modify>
<do-append-xml-text expression="$XML-TEXT/modify/modify-attr/add-value/value">
<arg-string>
<token-local-variable name="current-node"/>
</arg-string>
</do-append-xml-text>
<modify>
<modify-attr attr-name='MyAttribute'>
<add-value>
<value type='string>SomeValue</value>
</add-value>
</modify-attr>
<modify>
<do-append-xml-element expression="$XML-TEXT/modify/modify-attr" name="value"/>
<do-append-xml-element expression="$XML-TEXT/modify/modify-attr[last()]" name="value"/>
<do-append-xml-element expression="$XML-TEXT/modify/modify-attr[last()]/add-value[last()]" name="value"/>
<do-append-xml-element expression="$XML-TEXT/modify/modify-attr/add-value[last()]" name="value"/>
<rule>
<description>Buildnodeset using a loop and last()</description>
<conditions>
<and/>
</conditions>
<actions>
<do-set-local-variable name="XML-TEXT" scope="policy">
<arg-node-set>
<token-xml-parse>
<token-text xml:space="preserve"><modify/></token-text>
</token-xml-parse>
</arg-node-set>
</do-set-local-variable>
<do-for-each disabled="true">
<arg-node-set>
<token-text xml:space="preserve">One</token-text>
<token-text xml:space="preserve">Two</token-text>
<token-text xml:space="preserve">Three</token-text>
</arg-node-set>
<arg-actions>
<do-append-xml-element expression="$XML-TEXT/modify" name="modify-attr"/>
<do-append-xml-element expression="$XML-TEXT/modify/modify-attr" name="add-value"/>
<do-append-xml-element expression="$XML-TEXT/modify/modify-attr/add-value" name="value"/>
<do-append-xml-text expression="$XML-TEXT/modify/modify-attr/add-value/value">
<arg-string>
<token-local-variable name="current-node"/>
</arg-string>
</do-append-xml-text>
</arg-actions>
</do-for-each>
<do-for-each>
<arg-node-set>
<token-text xml:space="preserve">One</token-text>
<token-text xml:space="preserve">Two</token-text>
<token-text xml:space="preserve">Three</token-text>
</arg-node-set>
<arg-actions>
<do-append-xml-element expression="$XML-TEXT/modify" name="modify-attr"/>
<do-append-xml-element expression="$XML-TEXT/modify/modify-attr[last()]" name="add-value"/>
<do-append-xml-element expression="$XML-TEXT/modify/modify-attr[last()]/add-value[last()]" name="value"/>
<do-append-xml-text expression="$XML-TEXT/modify/modify-attr[last()]/add-value[last()]/value[last()]">
<arg-string>
<token-local-variable name="current-node"/>
</arg-string>
</do-append-xml-text>
</arg-actions>
</do-for-each>
<do-trace-message>
<arg-string>
<token-xml-serialize>
<token-local-variable name="XML-TEXT"/>
</token-xml-serialize>
</arg-string>
</do-trace-message>
</actions>
</rule>