Should the output from this be a,bcd,e
or a,b,c,d,e
?
<group delimiter="," >
<text value="a" />
<choose>
<if position="first"> <!-- assume true -->
<text value="b" />
<text value="c" />
<text value="d" />
</if>
</choose>
<text value="e" />
</group>
It seems from reading the spec that it should be a,bcd,e
, since <choose>
is both a rendering element and a direct child element of <group>
here, but the three text
nodes are descendants (not children).
The
cs:group
rendering element must contain one or more rendering elements (with the exception ofcs:layout
).cs:group
may carry the delimiter attribute to separate its child elements
citeproc-js
produces a,b,c,d,e
, so this is probably the only real option. I’m mostly asking because while it isn’t in the spec really, a,b,c,d,e
makes sense, and would make even more sense if you allowed people to remove the surrounding <choose>
. It would be good to have some clarity before doing that. This is a feature (implicit-choose
) I intend to implement, which will of course save us all millions of human-hours.
<group delimiter=",">
<text value="a" />
<if position="first">
<text value="b" />
<text value="c" />
<text value="d" />
</if>
<text value="e" />
</group>
(Every other programming language manages without extra delimiters surrounding their if/else chains. In fact, if
and else
are delimiters already, no need for more. If you have two if blocks in a row, that’s not an issue at all, they are independent and distinguishable by the compiler into two separate chains.)