# configuring grouping

**URL:** <https://discourse.citationstyles.org/t/configuring-grouping/112>\
**Category:** CSL Development\
**Created:** [November 20, 2005, 4:05pm UTC](https://discourse.citationstyles.org/t/configuring-grouping/112 "2005-11-20T16:05:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [November 20, 2005, 4:05pm UTC](https://discourse.citationstyles.org/t/configuring-grouping/112/1 "2005-11-20T16:05:24Z")

</div>

I’ve raised this issue a few times before, and have finally gotten  
close to something I’m happy with.

Question, then: how to configure reference list grouping in a way that  
is flexible but elegant, both from an XML standpoint, and WRT to  
implementation in a GUI?

Answer:

Add a cs:groups structure to cs:bibliography. Have that solely be  
responsible for configuring grouping and ordering (not layout of the  
individual reference entries).

Examples:

1. Group by creator.

Some styles explicitly group by author (well all author-year styles do,  
but they just repeat the author name, or some proxy for it, each entry;  
in this case the name is only listed for the first entry).

```
   <groups>
     <group by="creator">
       <heading type="creator-name"/>
     </group>
   </groups>

```

Aside: given what I say parenthetically above, perhaps grouping should  
not be optional for author-year types? That detail bears more thought.

1. Group by genre or reference type. This is quite common in the  
humanities. The logic would work such that if there was no cs:reftype  
child, then this would be assumed the default.

Might be bit of a PITA to process, but not too bad.

1. Primary and secondary sources. This is a tricky one, as David has  
made the argument one would need to assign groups in this case. I am  
assuming the formatter can have some generic logic to handle this.  
E.g., primary sources do not have publishers, and are not articles?

2. Martha’s favorite: see also references; what in BibTeX are called  
"noncite."

Thoughts? Consider, in particular, how this would all work in a GUI,  
or how you would code the processing if you had to write a processor in  
your language of choice.

Bruce
