Sorry again. It should be node-name(.). (For some reason, name() and local-name() take "." as the default argument, but node-name() doesn't. A frequent mistake).
Michael Kay

From: Erik Rens []
Sent: 02 April 2009 13:30
To: Mailing list for the SAXON XSLT and XQuery processor
Subject: Re: [saxon] Fwd: Xpath 2.0 sequences and Saxon examples problems.

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 ?