Xpath syntax to read all attributes in a generated query


I'm again ask help to XPATH expert to get information from an XML query.

The source XML/XDS  is a query generated by the REST driver :

<nds dtdversion="3.5" ndsversion="8.x">
<product build="20181130_1107" instance="Rest Driver" version="">Identity Manager REST Driver</product>
<contact>NetIQ Corporation.</contact>
<query class-name="User">
<search-class class-name="User"/>
<search-attr attr-name="cn ">
<value> *bla</value>
<read-attr attr-name="CN "/>
<read-attr attr-name=" Surname "/>
<read-attr attr-name=" Given Name "/>
<read-attr attr-name=" Internet Email Address"/>


And I need to get each queried attribute to make some condition, I did that :

<description>Check query content - idsa 16 sept 2019</description>
<if-operation mode="nocase" op="equal">query</if-operation>
<if-xpath op="true">@class-name="User"</if-xpath>
<do-set-local-variable name="ReadAttrName" scope="policy">
<token-xpath expression="$current-op/read-attr/@attr-name[last()]"/>
<token-xpath expression="$current-node/read-attr/@attr-name"/>
<do-set-local-variable name="attrvalue" scope="policy">
<token-xpath expression="$current-value"/>

I can see all attributes in the local variable ReadAttrName, but the "for each" does not give any value.


Any help ?


Thanks a lot.