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!
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!
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. ;)
<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.
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.
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
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?
I'll look at the style later, but it looks right to me at first glance
class="note"
.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'