Hi

 

I've recently upgraded my version of xsltforms to the latest release and
have started to receive the error message - "Two binds affect one node
..." this is thrown from within XFBind.prototype.refresh and occurs when
I'm doing an xf:insert with bindings in place for both the source and
the destination. The insert appears to work regardless of the error
message being thrown, so I'm not sure of the value in making the
validation check.

 

I've attached a simple example that recreates the error and is based on
the deep-copy.xml example distributed with xsltforms.js. 

 

Is there an obvious fix to this problem? My initial thought was to
remove the validation check locally, but I'm not sure of the underlying
reason for introducing that check. Is a repeat a special case where the
check has no meaning?

 

Thanks,

Gordon

 

Gordon Rogers

Senior Developer

Corelogic Limited

www.corelogic.co.uk <http://www.corelogic.co.uk/> 

Tel:       0131 550 0447

Email     [email protected]
<mailto:[email protected]> 

 

This document should only be read by those persons to whom it is
intended, and its contents are private and confidential. If you receive
this email message in error, notify the sender immediately and do not
disclose, copy or distribute this message, or open any attachments

 

<?xml-stylesheet href="xsltforms/xsltforms.xsl" type="text/xsl"?>
<?xsltforms-options debug="yes"?>
<html
     xmlns="http://www.w3.org/1999/xhtml";
     xmlns:ev="http://www.w3.org/2001/xml-events";
     xmlns:xsd="http://www.w3.org/2001/XMLSchema";
     xmlns:xf="http://www.w3.org/2002/xforms";
		 >
     <head>
          <title>Using Origin to do a Deep Copy between instances</title>
          <style type="text/css">
               @namespace xf url("http://www.w3.org/2002/xforms";);
               body {font-family:Helvetica, sans-serif}
               #source-repeat {border: blue solid 1px;}
               #destination-repeat {border: green solid 1px;}
          </style>
          <xf:model>
               
               <xf:instance id="source">
                    <data xmlns="">
                         <a>A1</a>
                         <a>A2</a>
                         <a>A3</a>
                    </data>
               </xf:instance>
               
               <xf:instance id="destination">
                    <data xmlns="">
                      <a/>
                    </data>
               </xf:instance>
               
               <xf:bind nodeset="instance('source')/a" type="xf:string"/>                
               <xf:bind nodeset="instance('destination')/a" type="xf:string"/>
          </xf:model>
     </head>
     <body>
          <h1>Example of deep copy using XForms insert origin</h1>
          
          <h3>Source:</h3>
          <xf:repeat id="source-repeat" nodeset="instance('source')/a">
               <xf:output ref="."/>
          </xf:repeat> 
          
          <h3>Destination:</h3>
          <xf:repeat id="destination-repeat" nodeset="instance('destination')/a">
               <xf:output ref="."/>
          </xf:repeat> 
               
          <xf:trigger>
               <xf:label>Copy data from source to destination</xf:label>     
               <xf:action ev:event="DOMActivate">
                        <xf:insert
                             origin="instance('source')"                        
                             nodeset="instance('destination')"/>
               </xf:action>
          </xf:trigger>
     </body>
</html>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to