Ok, that’s what I though. My comment then would be this… (I didn’t search the archives on this topic , so forgive me if this has already been beaten to death)
I think group processing would be a lot more efficient if the dependent variable (or macro) were attached to the group tag as an attribute. That way I don’t have don’t have to sort through the group only to find out I don’t have anything to do.
Ron.From: Rintze Zelle [mailto:@Rintze_Zelle]
Sent: February 11, 2010 9:45 AM
To: development discussion for xbiblio
Subject: Re: [xbiblio-devel] CSL Group handling
On Thu, Feb 11, 2010 at 3:31 PM, Bruce D’Arcus <@Bruce_D_Arcus1mailto:Bruce_D_Arcus1> wrote:
On Thu, Feb 11, 2010 at 8:57 AM, Jerome, Ron <@Jerome_Ronmailto:Jerome_Ron> wrote:
As Bruce is aware, but probably most others are not, I’m working on a version of CiteProc for PHP and am just trying to understand the processing if “groups”.
The text that is confusing is (from the specifications.txt):
cs:group acts as an conditional: if none
of the enclosed elements reference a non-empty variable or macro,
cs:text elements that output verbatim text or
<text value="some text"> and
<text term="editor">) are ignored.”
Says if “none” of the enclosed references a non-empty variable, the decorating elements are ignored.
Shouldn’t they be ignored if they reference an empty variable?
Basically, if all variable content within a group is empty, then
nothing gets printed. A common use case might be where you want to
print "retrieved from " a URL. Makes no sense to print that text if
there is no such variable.
We probably need to change the language of this to be more clear
(double negatives and such)? Any suggestions?
I agree that the current description is unclear. Would the following do?:
cs:group implicitly acts as a conditional: the
cs:group element and its child elements are only processed if at least one of the rendering elements included in the
cs:group element call a non-empty variable (either directly or via a macro). For example,
would result in “(Published by: Company A)” when the publisher variable is set to “Company A”, but wouldn’t generate any output when the publisher variable is empty.