A Forum reader recently asked:
"After doing a source query, you get an "Instance" document back. How can I add a default attribute to this document? I think I need to use do-append-xml-text or element, but I have not found any examples of this."
And here's the response from Father Ramon ...
<description>add default attribute to instance</description>
<if-operation mode="case" op="equal">instance</if-operation>
<if-class-name mode="nocase" op="equal">User</if-class-name>
<do-append-xml-element expression="." name="attr"/>
<do-set-xml-attr expression="attr[last()]" name="attr-name">
<do-append-xml-element expression="attr[last()]" name="value"/>
<token-text>the value of the attribute</token-text>
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.