Using instance with setvalue

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Using instance with setvalue

mjgraham
Hi,

I have two instances:

<instance id="one">
  <form>
    <userid/>
  </form>
</instance>
<instance id="two">
  <form>
    <user/>
  </form>
</instance>

and with a submit button, I do:

<xf:trigger>
  <xf:label>Submit</xf:label>
  <xf:action ev:event="DOMActivate">
    <xf:setvalue ref="instance('two')/user" value="instance('one')/userid"/>
    <xf:send submission="formsubmit"/>
  </xf:action>
</xf:trigger>

However, with the 2909 build OP3.5M1, this gives an exception:

http-8080-Processor23 ERROR webapp.ProcessorService - Exception at null,
line -1, column -1
org.orbeon.saxon.trans.StaticError: XPath syntax error at char 48 in
{...instance('one'/userid, 1, ...}:
    Unknown system function instance()
        at
org.orbeon.saxon.expr.ExpressionParser.grumble(ExpressionParser.java:127)
        at
org.orbeon.saxon.expr.ExpressionParser.parseFunctionCall(ExpressionParser.java:1796)
        at
org.orbeon.saxon.expr.ExpressionParser.parseBasicStep(ExpressionParser.java:1278)
        at
org.orbeon.saxon.expr.ExpressionParser.parseStepExpression(ExpressionParser.java:1187)
        at
org.orbeon.saxon.expr.ExpressionParser.parseRelativePath(ExpressionParser.java:1127)
        at
org.orbeon.saxon.expr.ExpressionParser.parsePathExpression(ExpressionParser.java:1113)

Any ideas?

    Cheers,

    Matthew




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Using instance with setvalue

Erik Bruchez
Administrator
Matthew,

I do not reproduce this with the attached example, whether with the
latest code or with 3.5 M1.

-Erik

Matthew Graham wrote:

> Hi,
>
> I have two instances:
>
> <instance id="one">
>  <form>
>    <userid/>
>  </form>
> </instance>
> <instance id="two">
>  <form>
>    <user/>
>  </form>
> </instance>
>
> and with a submit button, I do:
>
> <xf:trigger>
>  <xf:label>Submit</xf:label>
>  <xf:action ev:event="DOMActivate">
>    <xf:setvalue ref="instance('two')/user" value="instance('one')/userid"/>
>    <xf:send submission="formsubmit"/>
>  </xf:action>
> </xf:trigger>
>
> However, with the 2909 build OP3.5M1, this gives an exception:
>
> http-8080-Processor23 ERROR webapp.ProcessorService - Exception at null,
> line -1, column -1
> org.orbeon.saxon.trans.StaticError: XPath syntax error at char 48 in
> {...instance('one'/userid, 1, ...}:
>    Unknown system function instance()
>        at
> org.orbeon.saxon.expr.ExpressionParser.grumble(ExpressionParser.java:127)
>        at
> org.orbeon.saxon.expr.ExpressionParser.parseFunctionCall(ExpressionParser.java:1796)
>
>        at
> org.orbeon.saxon.expr.ExpressionParser.parseBasicStep(ExpressionParser.java:1278)
>
>        at
> org.orbeon.saxon.expr.ExpressionParser.parseStepExpression(ExpressionParser.java:1187)
>
>        at
> org.orbeon.saxon.expr.ExpressionParser.parseRelativePath(ExpressionParser.java:1127)
>
>        at
> org.orbeon.saxon.expr.ExpressionParser.parsePathExpression(ExpressionParser.java:1113)
>
>
> Any ideas?
>
>    Cheers,
>
>    Matthew
--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

view.xhtml (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Using instance with setvalue

mjgraham
Hi Erik,

I'm really not certain what is going on here - these definitely do not
work on my setup: latest version of Firefox, Tomcat 5.5.17, Java
1.5.0_06 + latest version(s) of OPS - clean installation. This is also
the second or third example case I've sent you recently where you can't
reproduce it. I wonder whether there is some horrible legacy dependency
on my system?

    Cheers,

    Matthew

Erik Bruchez wrote:

> Matthew,
>
> I do not reproduce this with the attached example, whether with the
> latest code or with 3.5 M1.
>
> -Erik
>
> Matthew Graham wrote:
>> Hi,
>>
>> I have two instances:
>>
>> <instance id="one">
>>  <form>
>>    <userid/>
>>  </form>
>> </instance>
>> <instance id="two">
>>  <form>
>>    <user/>
>>  </form>
>> </instance>
>>
>> and with a submit button, I do:
>>
>> <xf:trigger>
>>  <xf:label>Submit</xf:label>
>>  <xf:action ev:event="DOMActivate">
>>    <xf:setvalue ref="instance('two')/user"
>> value="instance('one')/userid"/>
>>    <xf:send submission="formsubmit"/>
>>  </xf:action>
>> </xf:trigger>
>>
>> However, with the 2909 build OP3.5M1, this gives an exception:
>>
>> http-8080-Processor23 ERROR webapp.ProcessorService - Exception at
>> null, line -1, column -1
>> org.orbeon.saxon.trans.StaticError: XPath syntax error at char 48 in
>> {...instance('one'/userid, 1, ...}:
>>    Unknown system function instance()
>>        at
>> org.orbeon.saxon.expr.ExpressionParser.grumble(ExpressionParser.java:127)
>>
>>        at
>> org.orbeon.saxon.expr.ExpressionParser.parseFunctionCall(ExpressionParser.java:1796)
>>
>>        at
>> org.orbeon.saxon.expr.ExpressionParser.parseBasicStep(ExpressionParser.java:1278)
>>
>>        at
>> org.orbeon.saxon.expr.ExpressionParser.parseStepExpression(ExpressionParser.java:1187)
>>
>>        at
>> org.orbeon.saxon.expr.ExpressionParser.parseRelativePath(ExpressionParser.java:1127)
>>
>>        at
>> org.orbeon.saxon.expr.ExpressionParser.parsePathExpression(ExpressionParser.java:1113)
>>
>>
>> Any ideas?
>>
>>    Cheers,
>>
>>    Matthew
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>  



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Using instance with setvalue

Erik Bruchez
Administrator
Matthew,

That is surprising!

Did you try cleaning your browser cache? Or tried with another web browser?

-Erik

Matthew Graham wrote:

> Hi Erik,
>
> I'm really not certain what is going on here - these definitely do not
> work on my setup: latest version of Firefox, Tomcat 5.5.17, Java
> 1.5.0_06 + latest version(s) of OPS - clean installation. This is also
> the second or third example case I've sent you recently where you can't
> reproduce it. I wonder whether there is some horrible legacy dependency
> on my system?
>
>    Cheers,
>
>    Matthew
>
> Erik Bruchez wrote:
>> Matthew,
>>
>> I do not reproduce this with the attached example, whether with the
>> latest code or with 3.5 M1.
>>
>> -Erik
>>
>> Matthew Graham wrote:
>>> Hi,
>>>
>>> I have two instances:
>>>
>>> <instance id="one">
>>>  <form>
>>>    <userid/>
>>>  </form>
>>> </instance>
>>> <instance id="two">
>>>  <form>
>>>    <user/>
>>>  </form>
>>> </instance>
>>>
>>> and with a submit button, I do:
>>>
>>> <xf:trigger>
>>>  <xf:label>Submit</xf:label>
>>>  <xf:action ev:event="DOMActivate">
>>>    <xf:setvalue ref="instance('two')/user"
>>> value="instance('one')/userid"/>
>>>    <xf:send submission="formsubmit"/>
>>>  </xf:action>
>>> </xf:trigger>
>>>
>>> However, with the 2909 build OP3.5M1, this gives an exception:
>>>
>>> http-8080-Processor23 ERROR webapp.ProcessorService - Exception at
>>> null, line -1, column -1
>>> org.orbeon.saxon.trans.StaticError: XPath syntax error at char 48 in
>>> {...instance('one'/userid, 1, ...}:
>>>    Unknown system function instance()
>>>        at
>>> org.orbeon.saxon.expr.ExpressionParser.grumble(ExpressionParser.java:127)
>>>
>>>        at
>>> org.orbeon.saxon.expr.ExpressionParser.parseFunctionCall(ExpressionParser.java:1796)
>>>
>>>        at
>>> org.orbeon.saxon.expr.ExpressionParser.parseBasicStep(ExpressionParser.java:1278)
>>>
>>>        at
>>> org.orbeon.saxon.expr.ExpressionParser.parseStepExpression(ExpressionParser.java:1187)
>>>
>>>        at
>>> org.orbeon.saxon.expr.ExpressionParser.parseRelativePath(ExpressionParser.java:1127)
>>>
>>>        at
>>> org.orbeon.saxon.expr.ExpressionParser.parsePathExpression(ExpressionParser.java:1113)
>>>
>>>
>>> Any ideas?
>>>
>>>    Cheers,
>>>
>>>    Matthew
>>
>> ------------------------------------------------------------------------
>>
>>
>> --
>> You receive this message as a subscriber of the
>> [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>  
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws