# CSL class attributes

**URL:** <https://discourse.citationstyles.org/t/csl-class-attributes/546>\
**Category:** CSL Development\
**Created:** [February 27, 2009, 1:00am UTC](https://discourse.citationstyles.org/t/csl-class-attributes/546 "2009-02-27T01:00:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [February 27, 2009, 1:00am UTC](https://discourse.citationstyles.org/t/csl-class-attributes/546/1 "2009-02-27T01:00:12Z")

</div>

I’m getting close to the bibliography part of the work on citeproc-js,  
and I need some guidance on the class= attribute.

The spec provides for class=“note” and class=“in-text”. It looks like  
the former is for note styles, and the latter for styles that rely on  
a bibliography with in-text citation keys. The spec also contains  
this comment:

## The schema attribute should be understood to specify the controlled

## CSL category list. The terms thus typically include further logic,

## such as the broader categories to which they belong (“humanities”,

## “social sciences”) as well as the class of style (“author-date”,

“note”, etc.).

It looks like “author-date” should “in-text”, and as if the etc.  
should be dropped, since valid styles are always of one or the other  
of the two classes. Would that assumption be correct?

There is also a provision for a class= attribute on group tags. A  
number of styles use it, but the spec doesn’t provide any indication  
of what it does. Is it some sort of legacy thing that’s become a  
noop, or should it affect processing in some way?

Frank

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [February 27, 2009, 1:06am UTC](https://discourse.citationstyles.org/t/csl-class-attributes/546/2 "2009-02-27T01:06:02Z")

</div>

> I’m getting close to the bibliography part of the work on citeproc-js,  
> and I need some guidance on the class= attribute.
> 
> The spec provides for class=“note” and class=“in-text”. It looks like  
> the former is for note styles, and the latter for styles that rely on  
> a bibliography with in-text citation keys. The spec also contains  
> this comment:
> 
> ## The schema attribute should be understood to specify the controlled
> 
> ## CSL category list. The terms thus typically include further logic,
> 
> ## such as the broader categories to which they belong (“humanities”,
> 
> ## “social sciences”) as well as the class of style (“author-date”,
> 
> “note”, etc.).
> 
> It looks like “author-date” should “in-text”, and as if the etc.  
> should be dropped, since valid styles are always of one or the other  
> of the two classes. Would that assumption be correct?

One other question on class= in the style tag. Would it be correct to  
assume that with class=“in-text”, the citation key requires  
disambiguation, but with class=“note” disambiguation is never  
required?

Frank

---

<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:** [February 27, 2009, 1:21am UTC](https://discourse.citationstyles.org/t/csl-class-attributes/546/3 "2009-02-27T01:21:27Z")

</div>

> I’m getting close to the bibliography part of the work on citeproc-js,  
> and I need some guidance on the class= attribute.
> 
> The spec provides for class=“note” and class=“in-text”. It looks like  
> the former is for note styles, and the latter for styles that rely on  
> a bibliography with in-text citation keys. The spec also contains  
> this comment:
> 
> ## The schema attribute should be understood to specify the controlled
> 
> ## CSL category list. The terms thus typically include further logic,
> 
> ## such as the broader categories to which they belong (“humanities”,
> 
> ## “social sciences”) as well as the class of style (“author-date”,
> 
> “note”, etc.).
> 
> It looks like “author-date” should “in-text”, and as if the etc.  
> should be dropped, since valid styles are always of one or the other  
> of the two classes. Would that assumption be correct?

No; this element is drawn from Atom, and is designed not for  
processing, but discovery.

> There is also a provision for a class= attribute on group tags. A  
> number of styles use it, but the spec doesn’t provide any indication  
> of what it does. Is it some sort of legacy thing that’s become a  
> noop, or should it affect processing in some way?

Ideally, you pass those on for output styling (in CSS, or WP styles).

A somewhat related aside: I’d also like to see an RDFa-enhanced output mode.

Bruce

---

<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:** [February 27, 2009, 1:25am UTC](https://discourse.citationstyles.org/t/csl-class-attributes/546/4 "2009-02-27T01:25:23Z")

</div>

Seems a reasonable assumption.

Effectively, disambiguation is required b/c in-text citation markers  
are constructed on-the-fly. This is not required in note styles (or  
even many in-text styles come to think of it).

Bruce

---

<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:** [February 27, 2009, 1:40am UTC](https://discourse.citationstyles.org/t/csl-class-attributes/546/5 "2009-02-27T01:40:14Z")

</div>

Disambiguation is still necessary for subsequent note citations,  
although I don’t know whether any note-based styles use a year suffix  
(as opposed to adding a title, etc.).

Simon

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [February 27, 2009, 2:44am UTC](https://discourse.citationstyles.org/t/csl-class-attributes/546/6 "2009-02-27T02:44:05Z")

</div>

> > > One other question on class= in the style tag. Would it be correct  
> > > to  
> > > assume that with class=“in-text”, the citation key requires  
> > > disambiguation, but with class=“note” disambiguation is never  
> > > required?
> > 
> > Seems a reasonable assumption.
> > 
> > Effectively, disambiguation is required b/c in-text citation markers  
> > are constructed on-the-fly. This is not required in note styles (or  
> > even many in-text styles come to think of it).
> 
> Disambiguation is still necessary for subsequent note citations,  
> although I don’t know whether any note-based styles use a year suffix  
> (as opposed to adding a title, etc.).

Okay, I’ll treat the two cases uniformly. Too early to say for sure,  
but I think this might mean that the distinction between the two  
classes goes away, as far as processing is concerned.

I was worried about how to handle the bibliography stuff, because I  
was feeling some strain just getting citations to work. But cites are  
pretty well under control now, and I think I’ve worked out a way to  
get bibliographies sorted and disambiguation done without a huge  
resource spike. I’ll start putting the plan into place in parallel  
with building the names handler. It will take awhile, but there is a  
glimmer of light at the end of the tunnel.

Frank

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [February 27, 2009, 2:49am UTC](https://discourse.citationstyles.org/t/csl-class-attributes/546/7 "2009-02-27T02:49:49Z")

</div>

> > I’m getting close to the bibliography part of the work on citeproc-js,  
> > and I need some guidance on the class= attribute.
> > 
> > The spec provides for class=“note” and class=“in-text”. It looks like  
> > the former is for note styles, and the latter for styles that rely on  
> > a bibliography with in-text citation keys. The spec also contains  
> > this comment:
> > 
> > ## The schema attribute should be understood to specify the controlled
> > 
> > ## CSL category list. The terms thus typically include further logic,
> > 
> > ## such as the broader categories to which they belong (“humanities”,
> > 
> > ## “social sciences”) as well as the class of style (“author-date”,
> > 
> > “note”, etc.).
> > 
> > It looks like “author-date” should “in-text”, and as if the etc.  
> > should be dropped, since valid styles are always of one or the other  
> > of the two classes. Would that assumption be correct?
> 
> No; this element is drawn from Atom, and is designed not for  
> processing, but discovery.
> 
> > There is also a provision for a class= attribute on group tags. A  
> > number of styles use it, but the spec doesn’t provide any indication  
> > of what it does. Is it some sort of legacy thing that’s become a  
> > noop, or should it affect processing in some way?
> 
> Ideally, you pass those on for output styling (in CSS, or WP styles).
> 
> A somewhat related aside: I’d also like to see an RDFa-enhanced output mode.

I don’t know what RDF-a is, but here’s the output template for citeproc-js:

[XBib download | SourceForge.net](http://xbiblio.svn.sourceforge.net/viewvc/xbiblio/citeproc-js/src/formats.js?revision=641)

If the template can’t be adapted to the RDF-a format, the conversion  
is probably not an appropriate task for this particular tool.

Frank

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [February 27, 2009, 2:51am UTC](https://discourse.citationstyles.org/t/csl-class-attributes/546/8 "2009-02-27T02:51:53Z")

</div>

> > I’m getting close to the bibliography part of the work on citeproc-js,  
> > and I need some guidance on the class= attribute.
> > 
> > The spec provides for class=“note” and class=“in-text”. It looks like  
> > the former is for note styles, and the latter for styles that rely on  
> > a bibliography with in-text citation keys. The spec also contains  
> > this comment:
> > 
> > ## The schema attribute should be understood to specify the controlled
> > 
> > ## CSL category list. The terms thus typically include further logic,
> > 
> > ## such as the broader categories to which they belong (“humanities”,
> > 
> > ## “social sciences”) as well as the class of style (“author-date”,
> > 
> > “note”, etc.).
> > 
> > It looks like “author-date” should “in-text”, and as if the etc.  
> > should be dropped, since valid styles are always of one or the other  
> > of the two classes. Would that assumption be correct?
> 
> No; this element is drawn from Atom, and is designed not for  
> processing, but discovery.
> 
> > There is also a provision for a class= attribute on group tags. A  
> > number of styles use it, but the spec doesn’t provide any indication  
> > of what it does. Is it some sort of legacy thing that’s become a  
> > noop, or should it affect processing in some way?
> 
> Ideally, you pass those on for output styling (in CSS, or WP styles).

Great. That makes good sense and it’s easy to do. I’ll set it up soon.

Frank
