-
-
Notifications
You must be signed in to change notification settings - Fork 60
Processor input (JSON)
In order to come up with definitive naming conventions for CSL Processor input, here is a (work in progress) collection of inconsistencies found in the current JSON format. Since the majority of attributes use a minus to separate terms, this list includes strictly camel-cased names.
- citationItems
- noteIndex (properties)
- ciationID
- sortedItems
The valid items seem to distinguish between minus and underscore in that the minus seems to be used to distinguish between subtypes and the underscore is used to connect terms. For example, it is motion_picture' but
article-journal'. This approach is consistent by itself, but since the most other attributes use a minus as a connector I find this confusing; is the distinction really necessary, or could we use a minus everywhere? An alternative would be to use `/' for sub-typing.
- shortTitle
- journalAbbreviations
- archive_location / archive-place
Both non-dropping-particle
is really long; wouldn't it be easier to have particle
and dropping-particle
and demote-particle
?
- isInstitution
To filter items to be included in the bibliography, a list of conditions can be passed in an array. As far as I can tell, the order of the individual elements in the array is of no concern; each element has exactly two properties: 'field' and 'value'. Instead of an array of hashes, it seems to me, a single hash would suffice. For example
var myarg = {
"select" : [
{
"field" : "type",
"value" : "book"
},
{
"field" : "categories",
"value" : "1990s"
}
]
}
Could then be written as:
var myarg = {
"select" : {
"type" : "book",
"categories" : "1990s"
}
}
Also, in the Ruby implementation we're mapping select
, include
, exclude
, quash
to all
, any
, none
, and skip
, respectively, as the first three directly correspond to list filters in Ruby. Since the citeproc-js manual describes the meaning of select, include, and exclude using exactly these terms (all, any, none), I wonder if they would not be the more intuitive choice in the first place.
- bibliography_errors (the contents too, but perhaps these can remain implementation depependent?)
These are just suggestions:
- line-spacing instead of linespacing
- entry-spacing instead of entryspacing
- indent or hanging-indent instead of hangingindent
- offset or max-offset instead of maxoffset
- preamble or before instead of bibstart
- postamble or after instead of bibend (I know postamble is probably not proper English outside of Computer Science, but GNU Make uses it, for example)
- citation_errors (same as above)