From: Stefano D. <st...@de...> - 2004-06-30 00:08:17
|
hello Ben, sorry, no model item property is supported at the moment in DENG ciao ste Ben Kimball ha scritto: > Hey all. > > I just put together a simple offline table lookup form. It has two > instances; one for user interaction (integers specifying row and column, > plus a third for output) and one for the data table, which is in an XML > file. The output element has a bind element specifying a calculation to do > the actual lookup: > > ... > <xf:bind nodeset="/root/xp" > calculate="instance('xptable')/row[@lvl=instance('form')/lvl]/xp[@cr=instanc > e('form')/cr]"/> > ... > > In formsPlayer this is working correctly; anytime focus leaves an input box, > fP recalculates the db lookup and updates the output element with the new > value. In DENG, though, the output element remains blank. > > Here's a sample of the data table file: > > <?xml version="1.0" encoding="iso-8859-1"?> > <xptable> > <row lvl="1"> > <xp cr="1">300</xp> > <xp cr="2">600</xp> > <xp cr="3">900</xp> > <xp cr="4">1350</xp> > <xp cr="5">1800</xp> > <xp cr="6">2700</xp> > <xp cr="7">3600</xp> > <xp cr="8">5400</xp> > <xp cr="9">7200</xp> > <xp cr="10">10800</xp> > </row> > <row lvl="2"> > <xp cr="1">300</xp> > <xp cr="2">600</xp> > ... > > Any ideas? Maybe my XPath expression is bad? I'm brand new to it, so I > wouldn't be surprised. > > You can check out the (non-) working code at > <http://ben.vpd.utexas.edu/xforms/> (DENG loader page) or > <http://ben.vpd.utexas.edu/xforms/xp.html> (if you're not using DENG). Note > that the fP-specific <?import?> tag in the <head> element needs to come out > for DENG to parse the file. > > Cheers, > Ben > |