W3C home > Mailing lists > Public > www-forms@w3.org > May 2006

Repeat styling problem

From: Mark Seaborne <m_seaborne@mac.com>
Date: Thu, 4 May 2006 16:00:50 +0100
Message-Id: <853D67BC-F9A1-4B72-A79C-0212F6D0A75A@mac.com>
To: www-forms@w3.org

Hi,

Can anyone tell me how to achieve the following:

I have an XML instance like this:

<schema>
	<pattern name="fred">
		<rule>
			<assert/>
		</rule>
		<rule>
			<assert/>
			<assert/>
		</rule>
	</pattern>
	<pattern name="bob">....</pattern>.
</schema>

At any one time zero or more assert elements are relevant.

I have used repeats in the following way:

<repeat nodeset="pattern">
	<group ref=".">
		<label><output value="@name"/></label>
		<repeat nodeset="rule/assert"/>
	</group>
</repeat>

So I get a list of all the patterns, with each pattern followed by a  
list of its currently relevant assert elements.

When there are no relevant assert elements for a pattern I want to  
hide the label for the group bound to that pattern. I can't work out  
how to achieve that. I am hoping that I have overlooked some obvious  
solution, and that someone will be kind enough to point it out to me.

All the best

Mark
Received on Thursday, 4 May 2006 20:20:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:04 GMT