The more I think about it and the more I believe this rule is just bad
design. Take a look at the APSA style:
If the variable “accessed” is set, then
<group prefix=“[“suffix=”]”>
will evaluate to something, and so
will be printed even though the URL variable is not set. I’m sure you
agree with that.
I do, but an item that has an access date without a URL doesn’t make
much sense; it’s effectively a data error.
I think you’re highlighting here a hypothetical, rather than
practical, problem. I expect this macro will work pretty well in
practice.
You may say that “accessed” cannot be set if “URL” is not set.
Well, I wouldn’t say that formally, but yes.
But you are developing a citation style language, which should produce a
predictable output even with strange reference data. Instead, with
this kind of approach, you need to relay on the well-formedness (or
correctness, or coherence, call it as you want) of the reference data
you are displaying.
Sure, but I don’t see how cs:group is any particular problem. If we
removed it, you’d still see this sort of thing (using cs:choose); the
CSL code would just be more complex.
I’m really puzzled, and while I already have the code for implementing
your rule (I just check what happens to the group when
and are removed from the group’s children), I’m not sure
I’m going to keep it. I think that in pandoc a style like that should
just be considered a buggy style.
If you can’t correctly process a valid style, I’d say you have a buggy
implementation
Seriously, though, I’m not understanding your response here. I’ve
explained to you the rule, and you’ve implemented without much effort.
This sort of stuff works (in, for example, Zotero) fine. Why on earth
would you want to remove code??
I’d really like to hear the opinion of the authors of the other
implementations.
Yeah: Liam? Johan?
Bruce