Juris-M / zotero

Juris-M is a variant of the free and friendly Zotero research platform, with support for legal and multilingual materials.
https://juris-m.github.io
Other
75 stars 12 forks source link

Implement fallback attribute on cs:law-module #95

Closed fbennett closed 3 years ago

fbennett commented 3 years ago

Further to the point that arose in https://github.com/Juris-M/zotero/issues/93#issuecomment-711444901, I've implemented a "fallback" attribute on cs:law-module.

When selecting a jurisdiction module for a legal item, the processor chooses the first module that matches the jurisdiction or one of its "ancestors" and either (a) has no value set for cs:law-module/@types or (b) lists the target item type in cs:law-module/@types. When no match is found, the processor normally falls back to the us jurisdiction, which provides macros for all legal item types. Unfortunately, US citation formatting is an outlier and will be inappropriate for most other jurisdictions.

The fallback attribute on cs:law-module takes a single jurisdiction as its argument. If the target item type is not included in cs:law-module/@types, the processor will try the fallback jurisdiction before continuing to ancestors of the item jurisdiction, if any. (The fallback is a single attempt: ancestors and fallbacks of the fallback jurisdiction itself are not processed.)

Where a module adopts all macros of the fallback, cs:law-module/@types can be set to "none".

fbennett commented 3 years ago

This and your latest changes to DE abbrevs and the JM-IBFD style are up now in the latest Mac beta.

How are we looking for a release?

georgd commented 3 years ago

Thank you! I just applied the update but the NL Hoge Raad is still printed hoge09/03219 (court code + docket no.) in the citation.

Edit: I think that was intended to be fixed in the previous beta?

fbennett commented 3 years ago

Yes, I missed a detail, and the written-yesterday test framework that covers automated abbrevs also had a bug that masked the error. Have identified the problems and run trials again to be sure it's fixed. Taking a short break now, will get a refresh of the beta out within an hour or so. Truly close now! (He said again.)

fbennett commented 3 years ago

Should be better this time ... the refreshed beta is now up.

georgd commented 3 years ago

The NL-issue is fixed :), something else appeared, though: https://github.com/Juris-M/zotero/issues/96