problem to validate new style

Hi everybody !
I really need your help now...!!
I'm trying to create a new style, corresponding to my school style. I used the online zotero editor ("chrome://zotero/content/tools/csledit.xul") to visualize my changes and it looked like fine.

After that, I wanted to use it in Mendeley & here is the problem : error message :
"Error: JavaScript error found: CSL error: Exception: TypeError: Result of expression 'CSL.Attributes[attrname]' [undefined] is not an object., 416, C:/Program Files (x86)/Mendeley Desktop/citeproc-js/citeproc.js"

I also wanted to validate my style in the http://validator.nu/ webpage. Of course lots of red errors, but I don"t understand why & why it worked fine in the zotero editor.

Can you help me to fix the problem ? I can send you the style I created... Thanks for the help !

Lauranne
  • You'll need to deal with those red errors. The CSL 1.0 specification is here. There is also a primer, which you may want to take a look at first.

    It's not surprising that you get different results in Zotero and Mendeley with an invalid style file. It's a bit like pouring kerosene into the gas tank of two different automobiles; the side effects may be more obvious for one of them, but if you're planning on actually driving somewhere, it's generally not something you want to do.
  • edited July 2, 2011
    In fact I used the primer to make my style

    Where I'm surprised is that the red errors are some commons terms used in csl. For example :

    Error: Attribute term not allowed on element category from namespace http://purl.org/net/xbiblio/csl at this point.
    From line 11, column 5; to line 11, column 34
    thor>↩ ↩ <


  • If you copy/paste your style to https://gist.github.com/ and give us the link to the pasted style we can take a quick look.
  • In this case, for example, it looks like you are trying to use a csl 0.8.1 style -
    <category term="..."
    used to exist in 0.8.1, but has been replaces by
    <category field="...
    and
    <category citation-format="...

    The validator tells you exactly that. You can't use the attribute "term" on the element category - (the only attributes it accepts are field and citation-format).
  • Here is the link for my style :git clone git://gist.github.com/1061959.git gist-1061959

    @Adamsmith : oh my god, this means I'll have to re-do ALL the style ?! Does any convertor exist to transfor 0.8.1 into 1. ??
  • Yes, there is a converter.
  • yep, that's a 0.8.1. style - here are the directions to auto-convert:
    http://citationstyles.org/downloads/upgrade-notes.html#updating-csl-0-8-styles
  • oho, sooooooooooooooo great !!
    THanks a lot!!

This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.