Re: invalid binding expression error

On 12 Sep 2010, at 10:54 , e-letter wrote:

> On 12/09/2010, C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>  
> wrote:
>
>> You might try rephrasing the nodeset value to "/purpose/analysis/ 
>> @type"
>> or "analysis/@type" (if that is what you actually intend) and see if
>> that helps at all.
>>
> The latter worked thank you, but I wanted the user to see the values
> (i.e. epc england, epc scotland), not the attributes.

That's a straightforward change to the XPath expression:
/purpose/analysis/@type points to the attribute, and to
point to the analysis element you want /purpose/analysis
or (given that /purpose is the document element and thus
in this case the context node) just "analysis".


>
> Also, the submit element does not produce the output file. Any  
> advice please?

I'm not sure exactly how the Open Office forms:* attributes
are expected to work, so my first guess is a pure speculation
based on general principles:  your 'save' button needs, somehow,
to be linked to a submission element.  I'm guessing that that's
the point of the form:xforms-submission attribute.  The value
of that attribute is "form", and I'd guess that the processor
is looking for a submission element with an ID or name or
label of "save".  If so, it's not finding one, since the only
xforms:submission element in the form you showed in your
original mail has an ID of "savepagegeneralinformation".

Another possible complication is that the xforms:submission
element in your second model has

   action="file://~tmp/testsubmit.xml"

but that's not really a legal file: URL, since "~tmp" is not
a legal host name.  If your aim is to save the file on the local
file system, you want the host name to be either 'localhost'
(so you have something beginning "file://localhost/...") or the
empty string, which is probably more common (so you have
something like "file:///...").  The path part of the URL you have
may be faulty, too -- at least, it looks a little unconventional.
In systems I'm familiar with, "~tmp" typically means the home
directory of the user named "tmp".  You may want either of

   file:///tmp/testsubmit.xml
   file:///~/tmp/testsubmit.xml

instead.  (Or not -- where you want to save the file is up to
you, and where you CAN save it is up to you and your softwre,
not me.)

The bind attribute on the xforms:submission element also may
need some attention:  right now its value is "purpose/@type",
which isn't legal:  the value of 'bind' should be an IDREF, and
the identifier specified should be the ID of some 'bind' element.
You only need it if you wish the submission to submit only
part of the instance in question, rather than the entire
instance, so it may simplify the task of getting the form
working if you just delete it for now and bring it back later
if you really want it.

I hope this helps.

-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************

Received on Sunday, 12 September 2010 19:04:52 UTC