Error with CSL for custom style

Hi can anyone please help with a custom style we used to use in Mendeley Desktop, which now wont work in Mendeley Reference Manager because the 'custom style is malformed'? I was told by Mendeley "This may have worked on Mendeley Desktop previously as it had a basic malformed CSL (XML) repairing tool built into it, which Mendeley Cite currently does not have."

The error appears to be to do with not having a date form:
In the style validator here https://validator.citationstyles.org/

The error is on Line 354 and Line 360

The full style is here
https://csl.mendeley.com/styles/559622351/OfstedHouseStyle

It seems to have been based on MHRS style, so I am wondering whether to just go back to that one and adjust or if it is worth salvaging this one.

I have tried amending the date form field in the visual editor as I am unsure how to edit the code correctly. But this didn't seem to work.

Thanks in advance for any help!
  • Error:

    Have a look at the other dates in that macro and how they're formed.
    the "date-parts" are surrounded by the "date". You have both together in one line.

    If you can't figure out how to fix, let us know. I want you to try first though. ;)

  • edited June 15, 2023
    Thanks so much, I think I have worked it out and I made the changes below:
    <macro name="issued">
    <choose>
    <if type="report article-newspaper article-magazine personal_communication" match="any">
    <date variable="issued">
    <date-part name="day" suffix=" "/>
    <date-part name="month" suffix=" "/>
    <date-part name="year"/>
    </date>
    </if>
    <else-if type="webpage" match="any">
    <date variable="issued">
    <date-part name="day" suffix=" "/>
    <date-part name="month" suffix=" "/>
    <date-part name="year"/>
    </date>
    </else-if>
    <else>
    <date variable="issued">
    <date-part name="year"/>
    </date>
    </else>
    </choose>
    </macro>

    (sorry the csl doesn't show above)

    But another problem now...I have tried using csl.mendeley.com and it won't allow me to save my amendments in code editor. It only seems to allow changes to be saved in the visual editor. When I go to visual editor it removed all the changes. citationstyles.org seems to be letting me download the style but I'm not clear if the changes are saved - it doesn't allow changes to the url file.
  • (wrap CSL between <code> and </code> tags here)

    We don't have anything to do with the editor at csl.mendeley.com, but I heard this complaint a number of times now -- Mendeley hasn't exactly prioritized maintenance of their fork of the tool...

    While the editor at citationstyles.org (which I help maintain as part of the CSL project) doesn't provide URLs for edited styles, you can get a URL (to then load a style into Mendeley) with a workaround: Save the style to your hard disk, then open it with any text editor (like notepad), select all, copy, paste it to pastebin.com (or any number of similar sites: you can use pastebin without creating an account), add the filename with .csl extension at the bottom and "Create new paste", then click on "Raw" and copy the link to the style from the URL (this sounds more complicated than it is -- will barely take a minute). You can probably also use download links from file syncing services like Dropbox, Gooogle Drive, or Box -- just make sure you provide a direct download link to Mendeley -- though I haven't tested that.
  • Thank you, great will do.

    I have now managed to create a URL on the Mendeley URL and the CSL now works on the validator - thank you damnation.

    Another problem though! An error when loading the style URL into Mendeley: "Mendeley Cite does not currently support the use of footnote citation styles"

    Is it feasible to change a style to author-date so that it is no longer footnotes as a workaround?
    It may be out of my depth but any advice would be appreciated. Thanks in advance
  • A great way to solve your problems is to download the free Zotero and transfer your library. You should realize that Mendeley is a commercial product and you are receiving technical support from Zotero volunteers.
  • Yeah, I'd agree that sticking with Mendeley at this point is probably not a good idea, but for your question, that is actually quite simple: just change class="note" to class="in-text" in the first line of the style
  • edited June 19, 2023
    Hello, thank you DWL-SDCA because it is for an organisation, it would be great to look into this. It isn't going to help me in the short term with my current project as is likely to take a while to make a decision to change and I can't load software without approval.

    And adamsmith thank you for the suggestion. I have now changed that and I get the same error message that 'footnote styles are not supported' https://csl.mendeley.com/styles/682885091/ofsted-house-style-2-no-footer

    I saw line 20 also references "note" and tried changing this here:
    https://csl.mendeley.com/styles/682885091/ofsted-house-style2023-2-no-footer

    But it corrupts the style as it obviously isn't a correct field. Is there any other suggestion that might adapt it to work?
  • edited June 19, 2023
    DWL-SDCA could you direct me to any information on organisational use of Zotero? (i.e. is there a subscription for organisations) And does Zotero definitely support footnote style referencing?
  • https://www.zotero.org/storage/institutions and yes
    I'll look at the style later, but it looks right to me at first glance
  • In line 1 also change it to class="note".
  • No, that was just changed to in-text
  • Thanks damnation

    In https://csl.mendeley.com/styles/682885091/ofsted-house-style-2-no-footer I changed line 1 to "in-text" as a work around to try to get the style to work in-text. It was originally class="note" but the style won't work as it is 'footnote style'
  • Sorry for the confusion. Ignore what I said. I hadn't read the full thread.
Sign In or Register to comment.