OK, what to do about conditions? Let’s accept Simon’s if/else-if/else
structure.
So we say we’ll do:
div {
this could be “choose” also
cs-conditonal = element cs:conditional { cs-if, cs-else-if*, cs-else }
cs-if = element cs:if { cs-conditional.content }
cs-else-if = element cs:else-if { cs-conditional.content }
cs-else = element cs:else { cs-conditional.content }
}
My concern is about the content of the “cs-conditional.content” pattern.
I see these options:
attribute type { type-list } | attribute field { field-list }
attribute type { “field”}, attribute condition { field-list }
attribute type { “type”}, attribute condition { type-list }
-
element children
cs-type | cs-fields
What I dislike about 1 and 2 is that it maps a string to a namespaced
element. Maybe I’m being needlessly anal here, because aside from 3, I
think the only alternative is to change fields to a generic element.
<cs:field name="title"/>
… which I earlier rejected because more difficult to validate and I
guess more ugly.
Bruce