Re: disabled controls bindset failure

Sorry for the rather late answer to this question.

I see some potential errors here:

 No xf: on the bind elements. That would stop it working immediately.
 You should combine the two binds for the same nodeset into one bind,  
since that is what the spec says you should do:

  <xf:bind nodeset='stage' relevant='../purpose="ewbrl" or  
relevant='../purpose="nibrf"' />
 or
                 <xf:bind nodeset='stage' relevant='../purpose!="sbr"' />

 If the data value is a string (as in this case) then <xf:value>    
nibrf    </xf:value> is different to <xf:value>nibrf</xf:value> since  
there are extra spaces in there. So the test ../purpose="nibrf" will never  
work.

With those changes it worked for me.

Best wishes,

Steven pemberton

On Tue, 31 Aug 2010 10:23:06 +0200, e-letter <inpost@gmail.com> wrote:

> <?xml version='1.0' encoding='UTF-8'?>
> <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
> 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
> <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'
> xmlns:xf='http://www.w3.org/2002/xforms'>
>         <head>
>                 <meta http-equiv='content-type' content='text/html;
> charset=UTF-8' />
>                 <style type='text/css' id='internalstylesheet'>
>                         code {text-color:black; background:white;
> font-family:verdana, sans-serif}
>                 </style>
>                 <xf:model>
>                         <xf:instance>
>                                 <generalinformation xmlns=''>
>                                         <purpose />
>                                         <stage />
>                                 </generalinformation>
>                         </xf:instance>
>                                 <bind nodeset='stage'
> relevant='../purpose="ewbrl"' />
>                                 <bind nodeset='stage'
> relevant='../purpose="nibrf"' />
>                         <xf:submission
>                                 resource='file:testsubmit.xml'
>                                 method='put'
>                                 id='gi'
>                         />
>                 </xf:model>
>                 <title>
>                 </title>
>         </head>
>         <body>
>                 <p>
>                         <xf:select1 appearance='minimal' ref='purpose'>
>                                 <xf:label>purpose of analysis
>                                 </xf:label>
>                                 <xf:item>
>                                         <xf:label>
>                                                 England and Wales
> Building Regulations part L
>                                         </xf:label>
>                                         <xf:value>ewbrl
>                                         </xf:value>
>                                 </xf:item>
>                                 <xf:item>
>                                         <xf:label>
>                                                 Scottish Building  
> Regulations
>                                         </xf:label>
>                                         <xf:value>
>                                                 sbr
>                                         </xf:value>
>                                 </xf:item>
>                                 <xf:item>
>                                         <xf:label>
>                                                 Northern Ireland
> Building Regulations part F
>                                         </xf:label>
>                                         <xf:value>
>                                                 nibrf
>                                         </xf:value>
>                                 </xf:item>
>                         </xf:select1>
>                 </p>
>                 <p>
>                         <xf:select1 appearance='minimal' ref='stage'>
>                                 <!--should be disabled for purpose value  
> sbr
>                                 -->
>                                 <xf:label>
>                                         Stage of analysis
>                                 </xf:label>
>                                 <xf:item>
>                                         <xf:label>
>                                                 As built
>                                         </xf:label>
>                                         <xf:value>
>                                                 asbuilt
>                                         </xf:value>
>                                 </xf:item>
>                                 <xf:item>
>                                         <xf:label>
>                                                 As designed
>                                         </xf:label>
>                                         <xf:value>
>                                                 asdesigned
>                                         </xf:value>
>                                 </xf:item>
>                         </xf:select1>
>                 </p>
>                 <xf:submit submission='gi'>
>                 <xf:label>
>                 Save
>                 </xf:label>
>                 </xf:submit>
>         </body>
> </html>

Received on Wednesday, 13 October 2010 14:31:07 UTC