1. Bruce D'Arcus
  2. CiteProc Test
  3. Issues
Issue #9 new

variables_TitleShortOnShortTitleNoTitleCondition.txt

Benjamin Geißler
created an issue

Shouldnt be the result of the test in file "variables_TitleShortOnShortTitleNoTitleCondition.txt" the following:

..[0] My Long Title 1 has title-short
..[1] My Long Title 2 does not have title-short
>>[2] 

The specification says: "cs:group and its child elements are suppressed if a) at least one rendering element in cs:group calls a variable (either directly or via a macro), and b) all variables that are called are empty". Because the only variable is "title" and "title" is missing on ITEM-3, so everything should be suppressed.

Comments (8)

  1. Frank Bennett

    The conditions are clearly explained, but at first blush readers might miss that a cs:group with no calls to a variable will never be suppressed (i.e. if precondition (a) fails, suppression condition (b) does not apply). An additional example would make it crystal clear.

  2. Benjamin Geißler reporter

    Sorry, but i still don't get it. :-(

    <group delimiter=" ">
        <text variable="title"/>
        <group>
            <text value="does not have title-short"/>
        </group>
    </group>
    

    The inner group will always return "does not have title-short", but the outer group has one variable call (variable="title") so condition a) is true and because this variable is empty on ITEM-3 condition b) is also true and everthing should be suppressed. Or where is my error in reasoning?

  3. Frank Bennett

    Before applying the suppression rule on a cs:group, the implementation does a depth-first traverse of the node, applying the rule to any cs:group nodes below, evaluating each atomically, independent of the parent context. Any cs:group that renders something has the same effect as a successful variable.

    In the test, the single cs:text value call in the cs:else condition ("does not have title-short") will always render under the rule, since it has no siblings that call variables (and no sibling cs:group nodes). Since that node renders, the parent node renders as well.

    That's the logic, anyway.

  4. Bruce D'Arcus repo owner

    (Reply via bda...@gmail.com):

    That was my understanding as well, Frank. But then isn't the spec language a little misleading (since it focuses on "variables")?

  5. Log in to comment