Zotero to CSL type and field mappings

2»
  • @adamsmith: There's no need for this to be a plugin anymore. All the mapping info is available in https://github.com/zotero/zotero-schema/blob/master/schema.json (search for "csl").
  • @dstillman
    thanks for the link. I'm extracting the data right now but there are base fields missing for the following creator types:
    artist, attorneyAgent, cartographer, commenter, cosponsor, counsel, interviewee, inventor, performer, podcaster, presenter, programmer, sponsor, wordsBy.

    There are also missing base fields for some normal fields:
    assignee, citationKey, country, dateAdded, dateModified, issueDate, seriesText

    Both are also missing in the old data at https://aurimasv.github.io/z2csl/typeMap.xml

    Those base fields are necessary to address the right fields in the CSL citation style.

    Honestly I don't understand why there are different CSL variables and Zotero fields. why not just use the same variables as CSL?
  • The normal fields that are missing are simply not mapped currently, so that behavior is as expected -- it's easier to see in the website version, because they are explicitly listed next to empty CSL cells, but systematically the JSON representation does the same.

    For the creator types, these fall in two categories: all the primary ones are mapped to 'author' in CSL. All other ones aren't mapped.
    Honestly I don't understand why there are different CSL variables and Zotero fields. why not just use the same variables as CSL?
    CSL and Zotero have both different histories and different functions. For example, we're not going to add a variable to CSL that captures when someone added an item to their library, though that's obviously something highly relevant for managing a Zotero library.
  • @adamsmith For ease of use, we should probably maintain a set of mappings like the old plugin produced based on the JSON. It’s difficult to follow what fields for a specific item type are mapped to when the information is split into several sections
  • Agree, I figured a script to pull the json into XML/HTML/XHTML and continue publishing on gh
  • Thanks! I use that page a lot and am looking forward to an updated version!
  • edited October 2, 2024
    @adamsmith
    thanks for your input. but I think there are some mistakes in the mapping.

    1) "country" (which is only available at patent) should be mapped to "jurisdiction". The csl definition is "Geographic scope of relevance (e.g. “US” for a US patent; the court hearing a legal case)". right now jurisdiction isn't mapped at all.

    2) "citationKey" should be mapped to "citation-key". I'm not sure about this because it's only available at dataset, preprint and standard. maybe it means something else?

    3) The csl variable "shortTitle" is linked to the Zotero field "shortTitle" in line 2949 (https://github.com/zotero/zotero-schema/blob/master/schema.json). This csl variable don't exist. It should be mapped to "title-short".

    3) The csl variable "journalAbbreviation" is mapped to "journalAbbreviation" in line 2904. This csl variable don't exist. It should be mapped to "container-title-short"
  • 1 and 2 have just not happened yet. They both should indeed be mapped (citationKey is going to be introduced for all Zotero items; currently it's just in the new ones, which is why it's not mapped yet, I think).

    3 and 4 are a different story. Both journal abbreviation and short title behave a bit different given the form="short" option to use them (and for journal abbreviations, also the option to automatically generated them in the word processor add-ons). That's why the variable names aren't matching in the schema, even though they are, in fact mapped to title-short and container-title-short, respectively.
  • I have another question. The Zotero variable "place" is mapped to the csl variables "publisher-place" and "event-place". How do I know which variable is used for the citation?
  • It's currently mapped to both, so if you use event-place and publisher-place in a citation, you'd get the same thing twice (obviously that's not a good idea; it'll get fixed eventually I assume).
  • Thanks for the informations.

    I made an excel for my own overview in order to create my own citation style. I mapped every csl variable to the corresponding Zotero field. Then I added the user interface terms for all languages. One can select their language and every table will show the UI terms in their language.

    I also created an overview of all Zotero item types and the available entry fields, so that one knows exactly which field has to be filled or which variables needs to be addressed via the extra field to generate the correct reference via csl.

    The file is available for everybody who is interested at:

    https://github.com/southbam/CSL-to-Zotero-Mapping.git
  • Here is an example picture of the mapping of the csl number-variables:
    https://s3.amazonaws.com/zotero.org/images/forums/u15233917/ab4ldurtlkl5ld8l9oik.png
  • (To state the obvious, any visualization here should be generated automatically from the current schema.json file, not created manually.)
  • You're right. But because there is no user orientated mapping, I had to create my own. It's just for those who have the same troubles with creating an flawless csl citation style. And because the json data isn't optimized for those user orientated mappings it's unfortunately not dynamically renewable.

    I could create it dynamic but this was too much expense and there would be too many tables because power query doesn't allow to extract the whole data after depivoting the data in a form thats neccessary.

    Despite this there would be data missing if one would simply use the pure data from the json file. There is just no complete data with all informations to create an universal csl citation style and clear instructions for users to entry idems correctly.
Sign In or Register to comment.