Word add-in wrongly declaring style invalid (Word 2010 on Windows 7, Zotero 4.0.12)
A valid CSL 1.0.1 style file ( available from http://imada.sdu.dk/~petersk/sdulaw-en.csl ) is declared to be invalid ( see http://imada.sdu.dk/~petersk/sdulaw-en.rtf for a screenshot ).
Steps to reproduce:
1. Start Firefox
2. Add style file to Zotero (no complaints)
3. Start Word 2010
4. Create a new document
5. Add a citation
6. Select "SDU Law 35 (English, Fullnote)" as the style
The style validates in the online validator. I have tried bisecting the file with strange results. Removing the type "legal_case" helps, but putting it back in, I get strange behaviour. Two comments with <!-- --> are invalid, while one is valid etc.
Please help!
Cheers,
Peter
Steps to reproduce:
1. Start Firefox
2. Add style file to Zotero (no complaints)
3. Start Word 2010
4. Create a new document
5. Add a citation
6. Select "SDU Law 35 (English, Fullnote)" as the style
The style validates in the online validator. I have tried bisecting the file with strange results. Removing the type "legal_case" helps, but putting it back in, I get strange behaviour. Two comments with <!-- --> are invalid, while one is valid etc.
Please help!
Cheers,
Peter
Edit: Dan, 4.0.11 tag is missing from github
[JavaScript Error: "too much recursion" {file: "chrome://zotero/content/xpcom/citeproc.js" line: 11269}]
fbennett will need to look at this.
You can find a working version of the style here:
https://gist.github.com/adam3smith/7258466/raw/47029c0ca0606e21c0aa07aec5aa1b4b2a1dc2ac/sdulaw-en.csl
all it does it to simplify the macros "types" and "notes" without altering their output. Obviously valid styles should never produce errors, but this will allow you to work with this until fbennett is able to fix the issue breaking your version.
So ... either the file under that link has been updated with the version offered by Sebastian, or a difference in platforms (OS, Firefox version) affects the behaviour.
I'll wait for further news about the genesis of the file under that link before going further.
I actually got a working version by removing some unnecessary groups, tests etc. I will look at the simplification of the types and notes macros by adamsmith.
Anyway, a valid style file of reasonable size and complexity should be handled without complaints - where reasonable size is << 100K and reasonable complexity is nesting to depths << 100 ;)
Cheers,
Peter
https://gist.github.com/adam3smith/7267539
Although I can't reproduce the error here, if this particular code consistently fails on a specific platform (Windows?) under Firefox 25 or above and Zotero 4.0.12 Processor Gadget 1.0.132, it would be good to know. The CSL code isn't very complicated, and certainly shouldn't throw a recursion error.
Just to restate - the error is only thrown when I try to use the style in LO. It works in the test pane, e.g.
Anything I can provide as output? I had a brief look at debug, that didn't seem like it had anything useful.
Apart from that, I've no idea what could be causing the error.