# lists, grouping

**URL:** <https://discourse.citationstyles.org/t/lists-grouping/322>\
**Category:** CSL Development\
**Created:** [August 31, 2007, 8:00pm UTC](https://discourse.citationstyles.org/t/lists-grouping/322 "2007-08-31T20:00:14Z")\
**Posts on this page:** 3\
**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:** [August 31, 2007, 8:00pm UTC](https://discourse.citationstyles.org/t/lists-grouping/322/1 "2007-08-31T20:00:14Z")

</div>

So this is supposedly the last day before we freeze the schema.  
Unfortunately, I have to bring up a potentially big/complex issue:  
reference list configuration and grouping. That does not show up in the  
branch schema.

Is there any reason I can’t just copy over the old definitions below  
(with the exception of the type pattern)?

## Configures the formatting for headings, and optional sectioning.

div {  
cs-list =  
element cs:list {  
element cs:heading {  
element cs:text {  
attribute term-name {  
“references” | “works cited” | “bibliography”  
}  
}?  
},  
Section\*  
}

```
 ## Handles grouping in reference lists.
 Section =
   element section {
     Section-group-options,
     cs-list.heading,
     (cs-list.type*
      > element subsection {
          Section-group-options, cs-list.heading, cs-list.type*
        }+)
   }

 ## Section-group-options
 div {

   ## The grouping logic is such that if a reference is not included
   ## in a specified group, then it is understood to be a part of a
   ## default group. If, for example, one configures a "not cited"
   ## section, then all cited references are part of a default group.
   Section-group-options =

     ## Criterion to use for grouping. The "named group" option
     ## is a user or application selectable category that is not
     ## covered by the other options.
     attribute group-by {
       "author" | "type" | "notcited" | "year" | "named group"
     },

     ## Where named group is used, the name to group on.
     (attribute group-name { text }
      >
        ## Where type group is used, the type to group on.
        attribute group-type { cs-types.optional_list })?
 }
 cs-list.type =
   element cs:type {
     attribute name { text }
   }
 cs-list.heading =
   element heading {
     attribute type { "author" | "year" }
   }

```

}

---

<div class="post-metadata">

**Author:** ![Simon\_Kornblith](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Simon\_Kornblith](https://discourse.citationstyles.org/u/Simon_Kornblith)\
**Post date:** [August 31, 2007, 8:58pm UTC](https://discourse.citationstyles.org/t/lists-grouping/322/2 "2007-08-31T20:58:35Z")

</div>

> So this is supposedly the last day before we freeze the schema.

Personally, I’d suggest we wait a couple of weeks before declaring it  
1.0, even if we decide to freeze now, in case there are more major  
issues. I’m still implementing some of these things, and, while there  
are now people besides me working on CSLs, it might be nice to see  
how these turn out to verify that there are no lingering issues.

> Unfortunately, I have to bring up a potentially big/complex issue:  
> reference list configuration and grouping. That does not show up in  
> the  
> branch schema.
> 
> Is there any reason I can’t just copy over the old definitions below  
> (with the exception of the type pattern)?
> 
> ## Configures the formatting for headings, and optional sectioning.
> 
> div {  
> cs-list =  
> element cs:list {  
> element cs:heading {  
> element cs:text {  
> attribute term-name {  
> “references” | “works cited” | “bibliography”  
> }

See my comments about headings below. At the very least, we should  
add “works cited” and “bibliography” to the terms list, and change  
the attribute from “term-name” to “term” for consistency.

> ```
> }?
> },
> Section*
> }
> 
> ## Handles grouping in reference lists.
> Section =
> element section {
> Section-group-options,
> cs-list.heading,
> (cs-list.type*
> > element subsection {
> Section-group-options, cs-list.heading, cs-list.type*
> }+)
> }
> 
> ## Section-group-options
> div {
> 
> ## The grouping logic is such that if a reference is not  
> 
> ```
> 
> included  
> ## in a specified group, then it is understood to be a part  
> of a  
> ## default group. If, for example, one configures a “not cited”  
> ## section, then all cited references are part of a default  
> group.  
> Section-group-options =
> 
> ```
> ## Criterion to use for grouping. The "named group" option
> ## is a user or application selectable category that is not
> ## covered by the other options.
> attribute group-by {
> "author" | "type" | "notcited" | "year" | "named group"
> },
> 
> ## Where named group is used, the name to group on.
> (attribute group-name { text }
> >
> ## Where type group is used, the type to group on.
> attribute group-type { cs-types.optional_list })?
> }
> cs-list.type =
> element cs:type {
> attribute name { text }
> }
> cs-list.heading =
> element heading {
> attribute type { "author" | "year" }
> 
> ```

It might make sense to change this to “element heading { cs-  
element }” here and above, to:

1. Handle cases where no author should become “Anonymous.”
2. Provide more options when it comes to formatting authors.
3. Handle year formatting.

If we wanted to allow more sophisticated groupings, we could also  
work something out using cs-element, but I doubt that’s necessary.

> ```
> }
> 
> ```
> 
> }

Is it possible to apply this to an actual style, just so I can see  
what it looks like once formatted in XML?

Simon

---

<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:** [August 31, 2007, 9:41pm UTC](https://discourse.citationstyles.org/t/lists-grouping/322/3 "2007-08-31T21:41:28Z")

</div>

Simon Kornblith wrote:\> On Aug 31, 2007, at 4:00 PM, Bruce D’Arcus wrote:

> > So this is supposedly the last day before we freeze the schema.
> 
> Personally, I’d suggest we wait a couple of weeks before declaring it  
> 1.0, even if we decide to freeze now, in case there are more major  
> issues. I’m still implementing some of these things, and, while there  
> are now people besides me working on CSLs, it might be nice to see  
> how these turn out to verify that there are no lingering issues.

I agree. In fact, I’d say we should call it truly frozen until we  
convert all the existing styles to the new version.

Bruce
