Juris-M / citeproc-js

A JavaScript implementation of the Citation Style Language (CSL) https://citeproc-js.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`section` field treated as locator

georgd opened this issue · comments

I’m implementing the IBFD citation guidelines in CSLand CSLm and got some unexpected output with the use of the variable section. This variable is listed as a standard variable in the documentation so I assume no special behaviour tied to it.

The guidlines require the following for national legislation:

Full citation:
– Abbreviated country name:
– Title law in full [in original language if available, plus [Translation in English]],
– Type of law and/or number with date and/or year,
– Year of law [if not mentioned earlier or different],
– sec./art. Number,
– (amended Year) [never preceded by a comma],
– Abbreviated source
– Volume number
– (Source year)
– Start page number,
– Pinpoint reference,
– Collection name.

The fifth point sec./art. Number would be implemented using the Zotero/Juris-M field Section which maps to variable section.

I‘m getting the expected output on calling the variable directly like this:

<text variable="section"/>

But to my surprise the contents of the field are rendered again when calling the locators with this macro:

<macro name="locator">
  <group delimiter=" ">
    <label variable="locator" form="short"/>
    <text variable="locator"/>
  </group>
</macro>

This time, the field contents (I tested with field contents sec. 8-1 are treated and parsed as numeric, so they print secs. 8-1.

I don’t think this is correct behaviour. IMO, locators shouldn’t be drawn from the record but only from the corresponding field in the citation popup (when using a word processor).

This is by intention, but we may have some work to do. Some statutory §'s are referred to frequently enough that managing comments in the DB would be useful. (In particular, so §'s of the U.S. Tax Code are many pages long, with deeply nested subsections.) Merging section and locator is meant to address that use case, while allowing users to cite by locator pinpoint only if that is their preference. It's syntactically messy, but convenient.

Where these two variables need to be treated separately, we have a few options for schema revision. We could add a style option that disables merger for one or more jurisdictions. We could add a separate variable for independent use. Or we could disable merger if the section variable is rendered on its own within the cite. There may be other options, but those are the ones that pop up on quick reflection.

Hello! Was this discussion ever expanded on? I'm been trying to implement the long-dreaded constitutional statute citation for Canada, and I'm running into the same problem that Georg had.