Nested repeat processing

Hello, I am new to the list. I experiement with an XForms implementation
based upon the Java code Dominic Cooney posted here about a year ago. In
doing so, I have modified it to keep it fairly close the evolving spec.

In thing I implemented was nested repeat processing, but I want to
validate my approach. Here is my sample XForms UI code:

	<repeat nodeset="section">
		<group class="frame">
			<input ref="./title">
				<caption>Section Title</caption>
			</input>
			<repeat ref="." nodeset="div">
				<textarea ref="./.">
					<caption>Paragraph</caption>
				</textarea>
			</repeat>
		</group><br/>
	</repeat>

Notice the nested repeat has both ref and nodeset attributes. Also,
notice that the nested control, textarea, has two current context
references (dots). When I unroll this on the first iteration, it
becomes, for example with 2 sections in my instance:

		<group class="frame">
			<input ref="section[1]/title">
				<caption>Section Title</caption>
			</input>
			<repeat ref="section[1]" nodeset="div">
				<textarea ref="section[1]/.">
					<caption>Paragraph</caption>
				</textarea>
			</repeat>
		</group><br/>
		<group class="frame">
			<input ref="section[2]/title">
				<caption>Section Title</caption>
			</input>
			<repeat ref="section[2]" nodeset="div">
				<textarea ref="section[2]/.">
					<caption>Paragraph</caption>
				</textarea>
			</repeat>
		</group><br/>

The second iteration of unrolling yields with 1 div in section 1 and 3
divs in section 2:
		<group class="frame">
			<input ref="section[1]/title">
				<caption>Section Title</caption>
			</input>
				<textarea ref="section[1]/div[1]">
					<caption>Paragraph</caption>
				</textarea>
		</group><br/>
		<group class="frame">
			<input ref="section[2]/title">
				<caption>Section Title</caption>
			</input>
				<textarea ref="section[2]/div[1]">
					<caption>Paragraph</caption>
				</textarea>
				<textarea ref="section[2]/div[2]">
					<caption>Paragraph</caption>
				</textarea>
				<textarea ref="section[2]/div[3]">
					<caption>Paragraph</caption>
				</textarea>
			</repeat>
		</group><br/>

Is this correct?

Received on Tuesday, 11 December 2001 11:09:14 UTC