[xquery-talk] function node-name()

fatma helmy fatmahelmy2000 at yahoo.com
Sun Jun 4 01:35:47 PDT 2006


i tried this query on xquest it worked , but did not
work on saxon giving this error
Java version 1.4.2_06
Compiling query from attr.xq
Error on line 3 column 55 of
file:/E:/fatmahelmy/fatma/saxonsa8-7-1j/attr.xq:
  XPST0017: XQuery static error in
#...self::*/@*/node-name()) return#:
    Function node-name() must have 1 argument
Failed to compile query


let $j:=doc("tryfatma.xml")
for $a in
distinct-values($j//ancestor-or-self::*/@*/node-name())
return 
<mml>
<attrname>
{$a}
</attrname>
<attrvalue>
{distinct-values($j//ancestor-or-self::*/@*[node-name()
eq $a])
}
</attrvalue>
</mml>




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the talk mailing list