|
From: Hugh G. <hug...@gm...> - 2012-06-06 11:15:16
|
I am trying to make a call to a JavaScript function. I started out with this:
b:addEventListener(b:dom()//button[@id='test'], "onclick",
b:js-call('test'))
But when I ran it I got:
> err:XPTY0004 Function Item expected
So instead I tried wrapping the js-call in a local function:
declare sequential function local:test()
{
b:js-call('test')
};
b:addEventListener(b:dom()//button[@id='test'], "onclick",
xs:QName("local:test"))
Same thing:
> err:XPTY0004 Function Item expected
So I removed the QName part:
declare sequential function local:test()
{
b:js-call('test')
};
b:addEventListener(b:dom()//button[@id='test'], "onclick", local:test)
But now I get:
> err:XPDY0002 Context Item not set for step local:italicize
What am I doing wrong?
|