Dear experts,

in the following 'article ' (http://tinyurl.com/9xcrz6t)i read something
about the magic to manipulate nodesets. With this knowledge I tried out
the following:


<do-set-local-variable name="lv_test" scope="policy">
<arg-node-set>
<token-split delimiter="#">
<token-text xml:space="preserve">1#2#3#4#5#6</token-text>
</token-split>
</arg-node-set>
</do-set-local-variable>
<do-strip-xpath expression="$lv_test[number(.) &lt; 4]"/>
<do-set-local-variable name="lv_test_count" scope="policy">
<arg-string>
<token-xpath expression="count($lv_test)"/>
</arg-string>
</do-set-local-variable>

After applying this I'd expected that local variable lv_test_count has a
value of 3 but despite the fact what I trie it always has value 6. See
the trace:

[03/05/13 09:41:41.088]:AD TEU PT: Action:
do-set-local-variable("lv_test",scope="policy",arg-node-set(token-split("#","1#2#3#4#5#6"))).
[03/05/13 09:41:41.089]:AD TEU PT:
arg-node-set(token-split("#","1#2#3#4#5#6"))
[03/05/13 09:41:41.089]:AD TEU PT:
token-split("#","1#2#3#4#5#6")
[03/05/13 09:41:41.089]:AD TEU PT:
token-split("#","1#2#3#4#5#6")
[03/05/13 09:41:41.090]:AD TEU PT:
token-text("1#2#3#4#5#6")
[03/05/13 09:41:41.090]:AD TEU PT: Arg Value:
"1#2#3#4#5#6".
[03/05/13 09:41:41.090]:AD TEU PT: Token Value:
{"1","2","3","4","5","6"}.
[03/05/13 09:41:41.090]:AD TEU PT: Arg Value:
{"1","2","3","4","5","6"}.
[03/05/13 09:41:41.091]:AD TEU PT: Action:
do-strip-xpath("$lv_test[number(.) < 4]").
[03/05/13 09:41:41.091]:AD TEU PT: Action:
do-set-local-variable("lv_test_count",scope="policy",token-xpath("count($lv_test)")).
[03/05/13 09:41:41.092]:AD TEU PT:
arg-string(token-xpath("count($lv_test)"))
[03/05/13 09:41:41.092]:AD TEU PT:
token-xpath("count($lv_test)")
[03/05/13 09:41:41.092]:AD TEU PT: Token Value: "6".
[03/05/13 09:41:41.092]:AD TEU PT: Arg Value: "6".

Does anybody of you have an idea what I'm missing or does do-strip-xpath
only applies to the *current document *and *not to local variables*?

Thank you in advance
Andreas


--
IMsyncUnit
------------------------------------------------------------------------
IMsyncUnit's Profile: https://forums.netiq.com/member.php?userid=4485
View this thread: https://forums.netiq.com/showthread.php?t=46998