Sorry but i dont get it ..I used the factory thats not the problem.

XQItem kl = conn.createItemFromObject(new QName("Number"), null);
xqExpr.bindItem(new QName("element"),kl);

I get an error.


 "$r1/*[node-name() = $element] = $r2/Number"

  XPST0017: XQuery static error in #...RD where $r1/*[node-name() = $#:
    Function node-name() must have 1 argument

----------------------------------------------------------------------------------------------------------------------------------

$r1/*[node-name($element)] = $r2/Number"

 XPTY0004: Required item type of first argument of node-name() is node(); supplied value
  has item type xs:QName

So what is the good one ?