styles icon indicating copy to clipboard operation
styles copied to clipboard

1.0.2: Update `event` to `event-title`

Open bwiernik opened this issue 3 years ago • 8 comments

Zotero has now started exporting its data with event-title instead of event, so APA and other styles including event information need to be updated.

I'm not sure the data status for other CSL implementations, so what do we think is the best approach here?

I see 3 options:

  1. Manually update individual styles, starting with high priority major ones
  2. Do a batch update via regex to change "event" to "event-title"
  3. Do a batch update, but replace "event" with a conditional to show "event-title" but"event" if "event-title" is not present.

I lean toward (2). To limit pain points for other implementations, we can add a check to citeproc-js (@retorquere @larsgw) to replace "event" with "event-title" in input data.

What do you think? @adam3smith @POBrien333

bwiernik avatar Jul 22 '22 22:07 bwiernik

Do a batch update via regex to change "event" to "event-title"

There's also stuff like this (surprisingly a lot of styles use this, I'm assuming that was all copied from one style):

<if variable="event version" type="speech" match="none">

Do a batch update, but replace "event" with a conditional to show "event-title" but "event" if "event-title" is not present.

(3) would make CSL 1.0.2 data & styles compatible with CSL 1.0.1 processors.

To limit pain points for other implementations, we can add a check to citeproc-js to replace "event" with "event-title" in input data.

I think it's better to copy "event" to "event-title" instead of replacing it, since the CSL implementation could then also still be used with CSL 1.0.1 data and styles.

larsgw avatar Jul 22 '22 22:07 larsgw

I think it's better to copy "event" to "event-title" instead of replacing it, since the CSL implementation could then also still be used with CSL 1.0.1 data and styles.

Ah, yes. Agreed

bwiernik avatar Jul 23 '22 00:07 bwiernik

Let's say Mendeley doesn't update their CSL processor for 6 months, a lot of people will have issues. Could we not build in the conditional as per (3) and then, in a few months, remove the conditional and just leave event-title? Is this automatable and easy enough to do?

POBrien333 avatar Jul 26 '22 08:07 POBrien333

Okay, to that end, let's use this macro so that we can find it easily later:

  <macro name="event-title">
    <choose>
      <!-- TODO: We expect "event-title" to be used,
           but processors and applications may not be updated yet.
           This macro ensures that either "event" or "event-title" can be accpeted.
           Remove if procesor logic and application adoption can handle this. -->
      <if variable="event-title">
        <text variable="event-title"/>
      </if>
      <else>
        <text variable="event"/>
      </else>
    </choose>
  </macro>

bwiernik avatar Jul 26 '22 18:07 bwiernik

This one is relatively trivial (various):

<if variable="event version" type="speech" match="none">

But this one maybe not (united-states-international-trade-commission.csl):

<else-if type="speech" match="all" variable="event event-place">

larsgw avatar Jul 26 '22 23:07 larsgw

Hmm, match="all" is tricky

bwiernik avatar Jul 27 '22 00:07 bwiernik

In the latest Zotero beta, we're now automatically substituting event-title for event in all styles that don't include event-title. This will be in Zotero 6.0.12 soon.

dstillman avatar Aug 10 '22 05:08 dstillman

Thanks!

adam3smith avatar Aug 10 '22 08:08 adam3smith