# Schema questions

**URL:** https://discourse.citationstyles.org/t/schema-questions/692
**Category:** CSL Development
**Created:** [July 15, 2009, 11:49am UTC](https://discourse.citationstyles.org/t/schema-questions/692 "2009-07-15T11:49:17Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Rintze\_Zelle1](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@Rintze\_Zelle1](https://discourse.citationstyles.org/u/Rintze_Zelle1)
#### Post date: [July 15, 2009, 11:49am UTC](https://discourse.citationstyles.org/t/schema-questions/692/1 "2009-07-15T11:49:17Z")

</div>

Bruce, sorry to bomb you like this, but I had some additional  
questions while reading the schema:

- the plural attribute can be set for term and for label. I guess that  
for term, the plural attribute allows you to choose between the  
single/multiple forms of the term, right? The thing here is that the  
"contextual" option (currently only implemented in csl-core), which  
makes a lot of sense for label, doesn’t make any sense for term, but  
it can be set anyway. Not sure something has to be done about this.

- is the ability to to display multiple variables in a single text or  
date element really useful (e.g. )?  
I’d much rather use the delimiter to delimite date-parts (for which  
currently no delimiter can be set).

- the seems too ill-defined. I’d suggest  
either to: a) scrap it, b) to change it to something useful (e.g.  
“time”), c) or to clearly describe in the spec how implementations  
should cope with it.

- @line 466-468 in  
[http://xbiblio.svn.sourceforge.net/viewvc/xbiblio/csl/schema/trunk/csl.rnc?view=markup:](http://xbiblio.svn.sourceforge.net/viewvc/xbiblio/csl/schema/trunk/csl.rnc?view=markup:)  
“When used in a conditional, number tests if there is a number  
present, allowing conditional formatting.” From reading the schema’s  
description of the choose element, I can’t figure out how you can test  
a number in the conditional other than with is-numeric. But is-numeric  
tests if the entire string can be parsed as a number, not whether a  
number is present in the string (e.g. “12th edition” should fail for  
is-numeric, right?).

- @line 800-803 in  
[http://xbiblio.svn.sourceforge.net/viewvc/xbiblio/csl/schema/trunk/csl.rnc?view=markup:](http://xbiblio.svn.sourceforge.net/viewvc/xbiblio/csl/schema/trunk/csl.rnc?view=markup:)  
“If text inside an block can be used to  
differentiate two otherwise identical citations, it will be added. If  
the citations remain identical after its addition, it will not be  
added.” I don’t understand how this works. Is this test available both  
in citation clusters as well as in  
bibliographies? And doesn’t the test compare all the citations,  
instead of pair-wise comparisons (“two otherwise identical  
citations”). It’s very well possible to have more than two citations  
that are the same, so I don’t understand the “two” here.

- citation-label is a variable, but how is it assigned? I couldn’t  
find any explanation in the schema or on the mailing-list.

Rintze

---

<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: [July 17, 2009, 2:57am UTC](https://discourse.citationstyles.org/t/schema-questions/692/2 "2009-07-17T02:57:38Z")

</div>

> Bruce, sorry to bomb you like this, but I had some additional  
> questions while reading the schema:
> 
> - the plural attribute can be set for term and for label. I guess that  
> for term, the plural attribute allows you to choose between the  
> single/multiple forms of the term, right? The thing here is that the  
> “contextual” option (currently only implemented in csl-core), which  
> makes a lot of sense for label, doesn’t make any sense for term, but  
> it can be set anyway. Not sure something has to be done about this.

Your reading makes some sense. Any other opinions?

FWIW, it seems “contextual” isn’t used at all in the zotero repo.

> - is the ability to to display multiple variables in a single text or  
> date element really useful (e.g. )?  
> I’d much rather use the delimiter to delimite date-parts (for which  
> currently no delimiter can be set).

Well, leave this aside until we settle the new date stuff.

> - the seems too ill-defined. I’d suggest  
> either to: a) scrap it, b) to change it to something useful (e.g.  
> “time”), c) or to clearly describe in the spec how implementations  
> should cope with it.

It’s stuff like “Fall”.

> - @line 466-468 in  
> [XBib download | SourceForge.net](http://xbiblio.svn.sourceforge.net/viewvc/xbiblio/csl/schema/trunk/csl.rnc?view=markup:)  
> “When used in a conditional, number tests if there is a number  
> present, allowing conditional formatting.” From reading the schema’s  
> description of the choose element, I can’t figure out how you can test  
> a number in the conditional other than with is-numeric. But is-numeric  
> tests if the entire string can be parsed as a number, not whether a  
> number is present in the string (e.g. “12th edition” should fail for  
> is-numeric, right?).
> 
> - @line 800-803 in  
> [XBib download | SourceForge.net](http://xbiblio.svn.sourceforge.net/viewvc/xbiblio/csl/schema/trunk/csl.rnc?view=markup:)  
> “If text inside an block can be used to  
> differentiate two otherwise identical citations, it will be added. If  
> the citations remain identical after its addition, it will not be  
> added.” I don’t understand how this works. Is this test available both  
> in citation clusters as well as in  
> bibliographies? And doesn’t the test compare all the citations,  
> instead of pair-wise comparisons (“two otherwise identical  
> citations”). It’s very well possible to have more than two citations  
> that are the same, so I don’t understand the “two” here.

I didn’t write the two pieces above. Simon?

> - citation-label is a variable, but how is it assigned? I couldn’t  
> find any explanation in the schema or on the mailing-list.

It should be in the data (though there have been requested which  
suggest it might be generate at runtime using different algorithms).

Bruce

---

<div class="post-metadata">

### Author: ![Rintze\_Zelle](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/rintze_zelle/32/175_2.png) [@Rintze\_Zelle](https://discourse.citationstyles.org/u/Rintze_Zelle)
#### Post date: [July 17, 2009, 7:57am UTC](https://discourse.citationstyles.org/t/schema-questions/692/3 "2009-07-17T07:57:16Z")

</div>

That’s because the option is new:  
[http://sourceforge.net/apps/trac/xbiblio/changeset/988](http://sourceforge.net/apps/trac/xbiblio/changeset/988) &  
[http://sourceforge.net/tracker/?func=detail&atid=678021&aid=2172202&group\_id=117435](http://sourceforge.net/tracker/?func=detail&atid=678021&aid=2172202&group_id=117435)

Would it be a solution to specify the possible values of ‘plural’ as  
needed? E.g. instead of  
([http://sourceforge.net/apps/trac/xbiblio/browser/csl/schema/branches/split/csl-core.rnc](http://sourceforge.net/apps/trac/xbiblio/browser/csl/schema/branches/split/csl-core.rnc))

419 ## adds a localized term  
420 attribute term { cs-terms },  
421 attribute form { cs-term-forms }?,  
422 include-period,  
423 plural?)

460 label-primitives =  
461 formatting,  
462 include-period?,  
463 attribute form { cs-term-forms },  
464   
465 ##

---

<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: [July 17, 2009, 8:48am UTC](https://discourse.citationstyles.org/t/schema-questions/692/4 "2009-07-17T08:48:15Z")

</div>



---

<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: [July 17, 2009, 10:16pm UTC](https://discourse.citationstyles.org/t/schema-questions/692/5 "2009-07-17T22:16:29Z")

</div>



---

<div class="post-metadata">

### Author: ![Rintze\_Zelle](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/rintze_zelle/32/175_2.png) [@Rintze\_Zelle](https://discourse.citationstyles.org/u/Rintze_Zelle)
#### Post date: [July 18, 2009, 6:12am UTC](https://discourse.citationstyles.org/t/schema-questions/692/6 "2009-07-18T06:12:37Z")

</div>

> So you’re suggesting ‘contextual’ is default? If yes, might better as  
> a Boolean?

Fine with me.

Rintze

---

<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: [July 18, 2009, 8:01pm UTC](https://discourse.citationstyles.org/t/schema-questions/692/7 "2009-07-18T20:01:01Z")

</div>

> > So you’re suggesting ‘contextual’ is default? If yes, might better as  
> > a Boolean?
> 
> Fine with me.

Could do. Might consider doing the same with delimiter-precedes-last,  
for consistency.

---

<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: [July 19, 2009, 2:12pm UTC](https://discourse.citationstyles.org/t/schema-questions/692/8 "2009-07-19T14:12:00Z")

</div>

I haven’t looked at this in awhile. Can you just clarify? Are you  
saying there’s something “contextual” about this feature that should  
be default?

Bruce

---

<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: [July 19, 2009, 9:00pm UTC](https://discourse.citationstyles.org/t/schema-questions/692/9 "2009-07-19T21:00:51Z")

</div>

> > > > So you’re suggesting ‘contextual’ is default? If yes, might better as  
> > > > a Boolean?
> > > 
> > > Fine with me.
> > 
> > Could do. Might consider doing the same with delimiter-precedes-last,  
> > for consistency.
> 
> I haven’t looked at this in awhile. Can you just clarify? Are you  
> saying there’s something “contextual” about this feature that should  
> be default?

## delimiter for the last name is a list

```
  attribute delimiter-precedes-last {

    ## The "always" value means that result is "J. Doe, and T. Timmons"
    "always"
    >
      ## Default behavior; would result in "J. Doe and T.

```

Timmons," but “J. Doe,  
## S. Smith, and T. Timmons” (note comma preceding ‘and’).  
“never”  
}?,

So by default the comma is inserted before “and” in a nameset with  
three names, but not in a nameset with two.

The suggestion is that if the two options to “plural” are true/false,  
it would be consistent to set this with true/false as well. It’s not  
a backward compatible change, and I’m not pushing.

---

<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: [July 19, 2009, 9:16pm UTC](https://discourse.citationstyles.org/t/schema-questions/692/10 "2009-07-19T21:16:15Z")

</div>

OK.

Main thing is clarity and consistency, so it might be worth changing,  
and this is easy to adjust in the code…

Bruce

---

<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: [July 27, 2009, 11:17pm UTC](https://discourse.citationstyles.org/t/schema-questions/692/11 "2009-07-27T23:17:39Z")

</div>



---

<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: [July 28, 2009, 12:10am UTC](https://discourse.citationstyles.org/t/schema-questions/692/12 "2009-07-28T00:10:03Z")

</div>

Yeah, I suppose he has a point.

Bruce

---

<div class="post-metadata">

### Author: ![Rintze\_Zelle](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/rintze_zelle/32/175_2.png) [@Rintze\_Zelle](https://discourse.citationstyles.org/u/Rintze_Zelle)
#### Post date: [August 3, 2009, 5:39am UTC](https://discourse.citationstyles.org/t/schema-questions/692/13 "2009-08-03T05:39:43Z")

</div>

What about:

for terms: attribute plural { xsd:boolean }? (defaults to “false”)  
for labels: attribute pluralize { “always” | “never” | “contextual” }  
(defaults to “contextual”)  
for delimiter-precedes-last: attribute delimiter-precedes-last { “always” |  
“never” | “contextual”}? (defaults to “contextual”)

Having the contextual-option makes it clear the latter two are not boolean  
options, while having the different names “plural” and “pluralize” helps  
distinguishing the two different behaviors.

Rintze

---

<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 3, 2009, 4:06pm UTC](https://discourse.citationstyles.org/t/schema-questions/692/14 "2009-08-03T16:06:31Z")

</div>

…

> What about:
> 
> for terms: attribute plural { xsd:boolean }? (defaults to “false”)  
> for labels: attribute pluralize { “always” | “never” | “contextual” }  
> (defaults to “contextual”)  
> for delimiter-precedes-last: attribute delimiter-precedes-last { “always” |  
> “never” | “contextual”}? (defaults to “contextual”)
> 
> Having the contextual-option makes it clear the latter two are not boolean  
> options, while having the different names “plural” and “pluralize” helps  
> distinguishing the two different behaviors.

I’m losing track of this. Can you tell me:

a) whether the above differs from he current schema, and how?

b) the difference between “plural” and “pluralize” here?

Bruce

---

<div class="post-metadata">

### Author: ![Rintze\_Zelle](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/rintze_zelle/32/175_2.png) [@Rintze\_Zelle](https://discourse.citationstyles.org/u/Rintze_Zelle)
#### Post date: [August 3, 2009, 5:19pm UTC](https://discourse.citationstyles.org/t/schema-questions/692/15 "2009-08-03T17:19:58Z")

</div>

In CSL 0.8:

Labels and terms both use “plural = attribute plural { xsd:boolean }”. If  
the value of plural is not set, the behavior is contextual (in the case of  
labels).  
[http://sourceforge.net/apps/trac/xbiblio/browser/csl/schema/tags/0.8/csl.rnc?rev=768#L599](http://sourceforge.net/apps/trac/xbiblio/browser/csl/schema/tags/0.8/csl.rnc?rev=768#L599)

For delimiter-precedes-last:  
attribute delimiter-precedes-last { “always” | “never”}?  
[http://sourceforge.net/apps/trac/xbiblio/browser/csl/schema/tags/0.8/csl.rnc?rev=768#L321](http://sourceforge.net/apps/trac/xbiblio/browser/csl/schema/tags/0.8/csl.rnc?rev=768#L321)

There are two separate but related issues with all this:

1. plural and delimiter-precedes-last can both be seen as booleans  
defaulting to a third value. Which might be confusing and therefore  
undesirable.
2. the default value of plural for terms can’t be contextual, as terms are  
context-insensitive (right?). I just tested how Zotero currently copes with  
this, and apparently it defaults to “false” for terms.

b) the difference between “plural” and “pluralize” here?

If we want to fix 1, we need explicit contextual-options. As this doesn’t  
make sense for plural when used for terms, I suggested using different  
attributes: “plural” for terms, which is a true boolean, and “pluralize” for  
labels, which has the contextual option. If 1) doesn’t need fixing, this all  
isn’t needed. We’d just have to specify that the default value of plural is  
contextual for labels, and false for terms.

Rintze

---

<div class="post-metadata">

### Author: ![Rintze\_Zelle](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/rintze_zelle/32/175_2.png) [@Rintze\_Zelle](https://discourse.citationstyles.org/u/Rintze_Zelle)
#### Post date: [August 12, 2009, 8:32pm UTC](https://discourse.citationstyles.org/t/schema-questions/692/16 "2009-08-12T20:32:17Z")

</div>

I’ve committed a patch to the schema to wrap this up. I decided to use  
plural for both terms and labels. My earlier proposal to stress the  
difference in options by using plural/pluralize was too confusing, and there  
are other cases where an attribute has different values depending on the  
context (e.g. “form”).

[http://sourceforge.net/apps/trac/xbiblio/changeset/1112](http://sourceforge.net/apps/trac/xbiblio/changeset/1112)

Rintze

---

<div class="post-metadata">

### Author: ![Rintze\_Zelle](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/rintze_zelle/32/175_2.png) [@Rintze\_Zelle](https://discourse.citationstyles.org/u/Rintze_Zelle)
#### Post date: [August 30, 2009, 6:16am UTC](https://discourse.citationstyles.org/t/schema-questions/692/17 "2009-08-30T06:16:28Z")

</div>

> > - is the ability to to display multiple variables in a single text or  
> > date element really useful (e.g. )?  
> > I’d much rather use the delimiter to delimite date-parts (for which  
> > currently no delimiter can be set).
> 
> Well, leave this aside until we settle the new date stuff.

I checked the styles, and none use two or more variables in either  
cs:text or cs:date. So I would like to reiterate that  
IMHO it would be much cleaner to eliminate this ability, and to  
reserve the delimiter attribute of cs:date for delimiting date-part  
elements.

> > - the seems too ill-defined. I’d suggest  
> > either to: a) scrap it, b) to change it to something useful (e.g.  
> > “time”), c) or to clearly describe in the spec how implementations  
> > should cope with it.
> 
> It’s stuff like “Fall”.

So, does Zotero parse “Fall 2000” as { year: 2000, other:Fall }? Or  
does it pass on the entire string as something that can’t be parsed  
cleanly?

Rintze

---

<div class="post-metadata">

### Author: ![Dan\_Stillman](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@Dan\_Stillman](https://discourse.citationstyles.org/u/Dan_Stillman)
#### Post date: [August 30, 2009, 6:39am UTC](https://discourse.citationstyles.org/t/schema-questions/692/18 "2009-08-30T06:39:36Z")

</div>

It parses { year: 2000, other: “Fall” }, but it only uses the known date  
parts. Once [https://www.zotero.org/trac/ticket/888](https://www.zotero.org/trac/ticket/888) is closed along with  
the new processor, it will just pass “Fall 2000” as a literal. My  
understanding is that this literal string will be mutually exclusive  
with the other date-parts, so we’ll want to enforce that in the schema,  
and we should probably change the name.

- Dan

---

<div class="post-metadata">

### Author: ![Rintze\_Zelle](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/rintze_zelle/32/175_2.png) [@Rintze\_Zelle](https://discourse.citationstyles.org/u/Rintze_Zelle)
#### Post date: [August 30, 2009, 8:23am UTC](https://discourse.citationstyles.org/t/schema-questions/692/19 "2009-08-30T08:23:29Z")

</div>

I think it should be sufficient to drop the “other” date-part, and  
(re)-introduce a conditional to test whether a date is presented as a  
literal or a parsed date (maybe “is-parsed-date”?). If the conditional  
fails, the date can be shown using cs:text.

 (localized date) 

Rintze

---

<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: [August 30, 2009, 12:11pm UTC](https://discourse.citationstyles.org/t/schema-questions/692/20 "2009-08-30T12:11:44Z")

</div>

> > > > > - the seems too ill-defined. I’d suggest  
> > > > > either to: a) scrap it, b) to change it to something useful (e.g.  
> > > > > “time”), c) or to clearly describe in the spec how implementations  
> > > > > should cope with it.
> > > > 
> > > > It’s stuff like “Fall”.
> > > 
> > > So, does Zotero parse “Fall 2000” as { year: 2000, other:Fall }? Or  
> > > does it pass on the entire string as something that can’t be parsed  
> > > cleanly?
> > 
> > It parses { year: 2000, other: “Fall” }, but it only uses the known date  
> > parts. Once [#888 ("is-date" should return "true" only if date parses cleanly) – Zotero](https://www.zotero.org/trac/ticket/888) is closed along with  
> > the new processor, it will just pass “Fall 2000” as a literal. My  
> > understanding is that this literal string will be mutually exclusive  
> > with the other date-parts, so we’ll want to enforce that in the schema,  
> > and we should probably change the name.
> 
> I think it should be sufficient to drop the “other” date-part, and  
> (re)-introduce a conditional to test whether a date is presented as a  
> literal or a parsed date (maybe “is-parsed-date”?). If the conditional  
> fails, the date can be shown using cs:text.
> 
> (localized date)

There _might_ be cases where you want different formatting when the  
parse fails, I guess, but in most cases (like your example above) the  
literal can be passed through by the date element itself, with the  
same styling as a “proper” date. In other words, the above could be  
expressed simply as:

without losing anything. … ?

[Next page](https://discourse.citationstyles.org/t/schema-questions/692.md?page=2)
