<snip/>
Hm, so taking up that rule, maybe we should avoid the confusion with HTML's <select><option> and should maybe rather let <wd:union> become a <wd:choice>
I like "choice" which is a noun better than "select" which is a verb.
Also, it seems to me that "class", "struct" and "new" are variations around the concept of widget groups. We could then have:
- "group-template" for "class"
- "group-instance" for "new"
- "group" for "struct"
How does it sound?
Note also that we can make a direct parallel between "wd:group" (former "struct") and the instance-only "wi:group" wigets I introduced in woody-page-styling.xsl.
Finally, something that bothers me in "choice" (currently "union") is that the various cases only appear in the template, but not in the definition. It would be better IMO to define the choices in the form definition to ensure there's no accidental mixing in the template.
Or maybe was it done on purpose to allow a single widget to be present in several cases? If true, then we can have a single namespace for child widgets as of now, and have additional "case" statements in the definition identifying which widgets can appear in which case.
We could then have: <wd:choice id="schedule" case-widget="travel-type"> <wd:label>Travel schedule</wd:label> <wd:widgets> <wd:field id="departure-date">...</wd:field> <wd:field id="return-date">...</wd:field> </wd:widgets> <wd:when case="one-way"> <wd:use-widget id="departure-date"/> </wd:when> <wd:when case="two-way"> <wd:use-widget id="departure-date"/> <wd:use-widget id="return-date"/> </wd:when> </wd:choice>
We may also have a "permissive mode" when there's no <wd:when> statement that would allow any widget for any case.
Ah, and another question: why is the case-selection widget a sibling of the "choice" widget? Shouldn't it be a child widget? This would allow an stronger semantic grouping. But I'm not sure if this is good...
Sylvain
-- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } Orixo, the opensource XML business alliance - http://www.orixo.com
