W3C home > Mailing lists > Public > www-forms@w3.org > September 2010

Re: invalid binding expression error

From: John Boyer <boyerj@ca.ibm.com>
Date: Tue, 14 Sep 2010 15:31:01 -0700
To: e-letter <inpost@gmail.com>
Cc: Swithun Crowe <swithun@swithun.servebeer.com>, www-forms@w3.org
Message-ID: <OF3F5EE029.F6087BEA-ON8825779E.007AC4EB-8825779E.007BB0DF@ca.ibm.com>
Dear e-letter,

This is not really a forum for debugging your XForms forms, or the XPaths 
they contain.

It is not clear why your xforms:submission should work without adding 
replace="none" to it because it is a method="put" submission. Particularly 
with a file scheme, I wouldn't expect anything to come back.

However, the reason you're getting nothing is that you seem to be using an 
element reference "type" that does not exist as a child element of 

It seems you are trying to ref the *attribute* called type, so you would 
have to use analysis/@type to reference that node.

That being said, XForms submissions write an XML document.  If you were to 
ref to analysis/@type, the result is not serializable as XML because it is 
only a (textual) attribute value.  So, this leaves the question of what 
you are trying to write.

The whole backstory thread is not available in this email and I haven't 
been wading through it all (due to sentence #1), but it sounds like you 
want to write an XML document containing only analysis elements whose type 
attribute matches a value like "epc".

You need to either use relevance, which may perhaps only be switched on 
for xforms-submit and back off for xforms-submit-done and -error, or you 
need to use the xforms:insert action to construct your data payload on 

Good luck,
John M. Boyer, Ph.D.
IBM Distinguished Engineer, Interactive Web Applications and Documents 
IBM Lotus Forms Architect
Workplace, Portal and Collaboration Software
IBM Canada Software Lab, Victoria
E-Mail: boyerj@ca.ibm.com 

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
Blog RSS feed: 

e-letter <inpost@gmail.com>
Swithun Crowe <swithun@swithun.servebeer.com>
09/14/2010 01:24 PM
Re: invalid binding expression error

When the element 'submission' has the attribute ref="analysis/type",
the resultant output file is empty. The submission element is:

<xforms:submission id="savepagegeneralinformation"
action="file://~/tmp/testsubmit.xml" method="put" indent="false"
omit-xml-declaration="false" standalone="false"/>

When the attribute 'ref' is changed to ref="analysis" the output file is:

<?xml version="1.0"?>
<analysis type="epc">epc england</analysis>
<?xml version="1.0"?>
<analysis type="epc">epc scotland</analysis>

When the attribute 'ref' is removed, the output file is:

<?xml version="1.0"?>
                                 <analysis type="epc">epc 
                                 <analysis type="epc">epc 

If the list menu in writer is used to choose 'epc england', the output
file should only show the element for the value of 'epc england',
correct? Also, even though the attribute 'indent' is set to 'false',
whitespace is applied.
Received on Tuesday, 14 September 2010 22:31:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:24 UTC