W3C home > Mailing lists > Public > public-xformsusers@w3.org > March 2019

Re: itemset/@copy

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Mon, 18 Mar 2019 15:40:08 +0100
To: " XForms" <public-xformsusers@w3.org>
Message-ID: <op.zyuq06lpsmjzpq@steven-xps>
On Thu, 14 Mar 2019 16:19:36 +0100, Steven Pemberton  
<steven.pemberton@cwi.nl> wrote:

> https://www.w3.org/community/xformsusers/wiki/XForms_2.0#The_itemset_Element
> I don't think we illustrate well enough how @copy works (copying a whole  
> subtree). I propose we use a better example that shows a subtree being  
> copied. I'll think about a better example.
> (Also the description of the copy attribute is weak).
> Steven

Something like this?

   <model xmlns="http://www.w3.org/2002/xforms">
       <transaction xmlns="">
     <instance id="contacts">
       <contacts xmlns="">
	  <name>John Smith</name>
	  <street>11 Main Street</street>
	  <postcode>W1 1AA</postcode>
	  <name>Jane Bond</name>
	  <street>7 License Lane</street>
	  <name>Frederick Angel</name>
	  <street>123 Marks Street</street>
	  <city>New York</city>

   <group xmlns="http://www.w3.org/2002/xforms">
     <select1 ref="addressee">
       <label>Choose address</label>
       <itemset ref="instance('contacts')/address"><label ref="name"/><copy  
     <group ref="addressee/address">
       <output ref="street"/>
       <output ref="city"/>
       <output ref="postcode"/>
       <output ref="land"/>

Received on Monday, 18 March 2019 14:40:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:37:51 UTC