Re: One model, many instances, is it correct?
Allan Beaufour <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Message-ID | <[email protected]> |
Tuesday 18 October 2005 17:21 skrev [email protected]: > <head> > <title>Greenhouse Catalog Data Entry</title> > <link rel="stylesheet" type="text/css" href="greendb.css"/> > <xf:model id="model1"> > <xf:instance src="dbview.xml" id="dbview" ></xf:instance> > <xf:instance src="session.xml" id="session" ></xf:instance> > <xf:instance src="workarea.xml" id="wka" ></xf:instance> > <xf:bind nodeset="/wka/full_name" > calculate='concat(/dbview/genus_name,"aaa ",/dbview/species_name)'/> > <xf:bind id="msg" nodeset="/wka/message" /> > <xf:submission id="squery" ref="instance('dbview')" > method="form-data-post" action="query.php"/> > <xf:submission id="sinsert" ref="instance('dbview')" > method="put" replace="none" includenamespaceprefixes="#default" > action="submit.xml"/> > </xf:model> > </head> > > I read specs carefully, nowhere this is forbidden, will it be supported > ? Yes it is supported. You can have as many instances as you like for each model. > For one instance all works fine, for many those beyond the first become > "mute" > but no error messages. Can I plan the code this way ? (Note the > "calculate" among nodes of different instances) if nodeset="/wka/full_name" should point to the wka instance, you should use nodeset="instance('wka')/full_name", and the same for the calculate: concat(instance('dbview')/genus_name,"aaa ",instance('dbview')/species_name) -- Allan Beaufour Linux Software Engineer Novell, Inc. Software for the Open Enterprise www.novell.com/open