Code snippet "leaking" into other sections

edited 4 days ago
Hi everyone

I have been customising a Swiss legal citation style and there is an error I am not able to fix.This is the code of the relevant section (I provided a screenshot, because copying the code for some reason did not work).

https://s3.amazonaws.com/zotero.org/images/forums/u18337405/31qwgwkelwh279izulq7.png

As you can see, I need for different courts (authorities) different outputs. For some reason, the "Nr." in the section EGMR "leaks" into the others, causing it to appear everywhere. For the EuGH it should look like this: EuGH, Güezli, C-4/05, 2.10.2002.
but it looks like this "EuGH, Güezli, Nr. C-4/05, 2.10.2002."

I tried everything from the csl validator, to troubleshooting the word processor and zotero to updating the whole computer - I am at my wit's end.

Thank you for your help.
  • CSL doesn't allow you to match on variable content -- I'm surprised the above code validates
  • The validator did say what you did. But since the output was correct – I could create an extra item for the EGMR –, I did not mind. That's why I don't think that this is where the problem lies.
  • No, that's exactly where the problem is -- the processor just ignores the "value" part of the conditions and checks for the presence of a variable, "authority", which is always true for anything that has a court listed, so you get EGMR style citations for everything.

    There are just limits to how far you can take legal citations with Zotero and this may well be it.
  • That's unfortunate.

    Thank you for your help!
  • edited 3 days ago
    How hard would it be to customise a CSL Word processor with Javascript to achieve the desired results (me being a programming novice, having some xml experience but none with programming languages)?
  • You can look into the CSL-m extension of the language, which has expanded support for modular legal styles https://juris-m.github.io/cslm-docs/
  • Quite hard for what you're asking
Sign In or Register to comment.