I've written a query as follows that querys a user and returns a value.
This works fine using the following -

<do-set-local-variable name="var_searchcreateattr" scope="policy">
<arg-string>
<token-query class-name="User" datastore="src" scope="subtree">
<arg-dn>
<token-text xml:space="preserve">XXX</token-text>
</arg-dn>
<arg-match-attr name="CN">
<arg-value type="string">
<token-local-variable name="var_cnclean"/>
</arg-value>
</arg-match-attr>
<arg-string>
<token-text xml:space="preserve">XXX:initialcreate</token-text>
</arg-string>
</token-query>
</arg-string>
</do-set-local-variable>

The document returned is as follows -

<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.5.10.20070918 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<instance class-name="User" event-id="0"
qualified-src-dn="O=XXX\OU=XXX\OU=USERS\CN=testcreate13"
src-dn="\XXX\XXX\XXX\USERS\testcreate13" src-entry-id="59008">
<association
state="associated">{02AEF012-237D-ac4a-7B80-02AEF012237D}</association>
<attr attr-name="XXX:initialcreate">
<value timestamp="1250162873#6" type="state">true</value>
</attr>
</instance>
<status event-id="0" level="success"></status>
</output>
</nds>

I am however having trouble accessing the returned value to test its
value. I tried to use op-attr and the following xpath

<token-xpath expression="*[@attr-name='XXX:initialcreate']/value"/>

but I keep getting a null value returned. I'm probably missing something
simple, any takers?