Switching based on variable contents

Is there any way to test the contents of any of the variables? I ask because, in my particular case, I need to cite a large number of legal cases, but the citation form differs depending on whether they are domestic or foreign. (Generally speaking, we cite foreign cases as they would be cited in the native country). Obviously the easiest way for me to do this would be to have a switch in my csl, based on (for eg) the 'extra' field representing a country code.

Can anyone think of an alternative way to accomplish the same thing? (A crude way would be to test whether 'extra' is set at all, I suppose... but I was hoping for something a bit more robust.)
  • MLZ Zotero, designed specifically for legal citations, allows you to change citations depending on the jurisdiction field (which only exists & is a dropdown menu in MLZ). We should eventually get this into mainstream Zotero, but it won't be any time soon - likely years rather than months.
    www.citationstylist.org
    In regular Zotero you can only test for the presence of a variable and, for some specified variables, whether it's numeric or not.
    Since Zotero uses the same citation processor at MLZ, you might be able to make something work by creating a style that's technically invalid (I think using 2 letter country codes in the language field should work), but I'd really recommend taking a look at MLZ.
  • edited October 4, 2013
    This looks interesting, but I hesitate to change horses mid-stream, since it looks like MLZ has been incompatible with Zotero for some time now, and I don't really want to reconstruct my databases...

    I also have spent a fair bit of time modifying the AGLC3 csl to make it serve my purposes.

    Lack of standalone is a bit of a shame too :(

    Thanks for the tip.
  • well, incompatible isn't actually correct. You can load a Zotero database into MLZ directly (though not the other way around) and they're sync-compatible, so you could certainly give this a try in a new profile. As I say, it's likely the best you'll get anytime soon and Frank is very keen to see it spread more widely in law, so I'm sure he'd love to help you.
  • edited October 4, 2013
    Forgive my ignorance, but how do I run this in parallel in a new profile? I have only used Zotero Standalone, never a Firefox plugin. I installed the MLZ plugin but didn't let it upgrade my existing database, since I don't want to mess with that.

    Is there an equivalent of the Zotero Word plugin for MLZ, by the way?
  • point Firefox to a different database location than your Standalone (in the advanced tab of the preferences under files/folders). You'd then see an empty library in Firefox. Now copy your Zotero data folder to the new profile (i.e. you'd have the same thing twice now in two different data directories):
    http://www.zotero.org/support/kb/transferring_a_library
    and then install MLZ and allow it to upgrade the database. I think syncing should be safe, but if you want to be extra cautious, leave that disabled for the time being.
  • and yes, the Zotero Word/LO plugins just work for MLZ.
  • I get "Zotero could not load the component needed to communicate with your word processor" when I try to use the plugin with MLZ :/
  • you need to also install the plugin in Firefox, potentially re-install it from the Cite tab of the preferences.
  • Thanks. Worked.

    So ideally (based on what the MLZ website says), it should be safe to sync the MLZ library with my Standalone, but I still need to keep two separate local libraries?
  • exactly. I'm pretty sure syncing is safe - the sync server sees to that - but obviously data for fields that don't exist in Zotero won't sync from MLZ.
  • Is the 'storage' folder + all sqlite files a complete library backup?

    Thanks for all your help, by the way.
  • exactly. I'm pretty sure syncing is safe - the sync server sees to that - but obviously data for fields that don't exist in Zotero won't sync from MLZ.
    Just to reiterate, you should sync Zotero Standalone and Zotero for Firefox through zotero.org. DO NOT set them to the same data directory.
  • Hmm, I am pleasantly surprised that I don't even need to modify the Word fields I added via Standalone. How is it that the references update when I modify in MLZ if they use a different local library? Interesting... Unique identifiers set in the sqlite, which copied over when I duplicated the database?
  • Word processor communicates directly with whatever version of Zotero is running. So if you have MLZ open, it will talk to MLZ and use whatever fields MLZ supplies. That also means that if you have Standalone open and decide to refresh your references in Word, you will lose some info in your citations. If you have both open, that may cause unexpected results.
  • . Unique identifiers set in the sqlite, which copied over when I duplicated the database?
    and this, yes.
Sign In or Register to comment.