Request debug on modified RSC style

srk
edited December 4, 2022
Hello,
I've made a modified Royal Society of Chemistry style that includes support for the 'software' type. For some reason I can't get validator.citationstyles.org to return a result - it keeps telling me the checker may be down. Could someone here take a look? Currently Zotero will not let me import it. How can I upload it here?

  • <?xml version="1.0" encoding="utf-8"?>
    <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-GB">
    <info>
    <title>Royal Society of Chemistry(new)</title>
    <id>http://www.zotero.org/styles/royal-society-of-chemistry-new</id>
    <link href="http://www.zotero.org/styles/royal-society-of-chemistry-new" rel="self"/>
    <link href="http://www.rsc.org/learn-chemistry/resource/download/res00001664/cmp00004956/pdf" rel="documentation"/>
    <link href="http://www.rsc.org/journals-books-databases/journal-authors-reviewers/prepare-your-article/#format-layout" rel="documentation"/>
    <author>
    <name>Julian Onions</name>
    <email>julian.onions@gmail.com</email>
    </author>
    <contributor>
    <name>Ivan Bushmarinov</name>
    <email>ib@ineos.ac.ru</email>
    </contributor>
    <category citation-format="numeric"/>
    <category field="chemistry"/>
    <summary>The Royal Society of Chemistry journal style.</summary>
    <updated>2018-12-26T22:22:35+00:00</updated>
    <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
    </info>
    <macro name="editor">
    <names variable="editor">
    <label form="short" suffix=" "/>
    <name initialize-with=". " and="text" delimiter=", " delimiter-precedes-last="never"/>
    </names>
    </macro>
    <locale xml:lang="en">
    <terms>
    <term name="presented at">presented in part at the</term>
    </terms>
    </locale>
    <macro name="author">
    <choose>
    <if type="patent">
    <group delimiter=", ">
    <choose>
    <if variable="authority">
    <text variable="authority"/>
    </if>
    <else>
    <text variable="publisher"/>
    </else>
    </choose>
    <text variable="number"/>
    </group>
    </if>
    <else>
    <names variable="author">
    <name initialize-with=". " and="text" delimiter=", " delimiter-precedes-last="never"/>
    <label form="short" prefix=", " text-case="capitalize-first"/>
    <substitute>
    <names variable="editor"/>
    </substitute>
    </names>
    </else>
    </choose>
    </macro>
    <macro name="title">
    <choose>
    <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
    <text variable="title" font-style="italic"/>
    </if>
    <else>
    <text variable="title"/>
    </else>
    </choose>
    </macro>
    <macro name="publisher">
    <group delimiter=", ">
    <text variable="publisher"/>
    <text variable="publisher-place"/>
    </group>
    </macro>
    <macro name="pages">
    <label variable="page" form="short" suffix=" "/>
    <text variable="page"/>
    </macro>
    <macro name="book-container">
    <group delimiter=", ">
    <group delimiter=" ">
    <text term="in"/>
    <text variable="container-title" font-style="italic"/>
    </group>
    <text macro="editor"/>
    </group>
    </macro>
    <macro name="issued">
    <choose>
    <if type="speech" match="any">
    <date variable="issued">
    <date-part name="month" suffix=", "/>
    <date-part name="year"/>
    </date>
    </if>
    <else>
    <date date-parts="year" form="text" variable="issued"/>
    </else>
    </choose>
    </macro>
    <macro name="edition">
    <choose>
    <if is-numeric="edition">
    <group delimiter=" ">
    <number variable="edition" form="ordinal"/>
    <text value="edn" suffix="."/>
    </group>
    </if>
    <else>
    <text variable="edition" suffix="."/>
    </else>
    </choose>
    </macro>
    <citation collapse="citation-number">
    <sort>
    <key variable="citation-number"/>
    </sort>
    <layout delimiter="," vertical-align="sup">
    <text variable="citation-number"/>
    </layout>
    </citation>
    <bibliography second-field-align="flush" entry-spacing="0">
    <layout suffix=".">
    <text variable="citation-number"/>
    <text macro="author" suffix=", "/>
    <choose>
    <if type="thesis">
    <group delimiter=", ">
    <text variable="genre"/>
    <text variable="publisher"/>
    <text macro="issued"/>
    </group>
    </if>
    <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
    <text macro="title" suffix=", "/>
    <group delimiter=", ">
    <text macro="publisher"/>
    <text macro="edition"/>
    <text macro="issued"/>
    <text variable="volume" prefix="vol. "/>
    </group>
    </else-if>
    <else-if type="chapter paper-conference" match="any">
    <group delimiter=", ">
    <text macro="book-container"/>
    <text macro="publisher"/>
    <text macro="edition"/>
    <text macro="issued"/>
    <text variable="volume" prefix="vol. "/>
    <text macro="pages"/>
    </group>
    </else-if>
    <else-if type="article-journal">
    <group delimiter=", ">
    <text variable="container-title" font-style="italic" form="short"/>
    <choose>
    <if variable="page">
    <text macro="issued"/>
    <text variable="volume" font-weight="bold"/>
    <text variable="page"/>
    </if>
    <else>
    <text variable="DOI" prefix=", DOI:"/>
    </else>
    </choose>
    </group>
    </else-if>
    <else-if type="webpage post-weblog" match="any">
    <group delimiter=", ">
    <text variable="title" form="short"/>
    <text variable="URL"/>
    <group delimiter=" " prefix="(" suffix=")">
    <text term="accessed"/>
    <date form="text" variable="accessed"/>
    </group>
    </group>
    </else-if>
    <else-if type="software" match="any">
    <group delimiter=", ">
    <text variable="title" form="short"/>
    <group delimiter=" " prefix="(version " suffix=")">
    <text variable="version"/>
    </group>
    <if variable="publisher">
    <text macro="publisher"/>
    </if>
    <else>
    <if variable="DOI">
    <text variable="DOI" prefix=", DOI:"/>
    </if>
    <else-if variable="URL">
    <text variable="URL" prefix=", "/>
    </else-if>
    </else>
    <group delimiter=", ">
    <text term="issued"/>
    </group>
    </group>
    </else-if>
    <else-if type="speech" match="any">
    <group delimiter=", ">
    <group delimiter=" ">
    <text term="presented at"/>
    <text variable="event"/>
    </group>
    <text variable="event-place"/>
    <text macro="issued"/>
    </group>
    </else-if>
    <else>
    <group delimiter=", ">
    <text variable="container-title" form="short" font-style="italic"/>
    <text macro="issued"/>
    <text variable="volume"/>
    <text variable="page"/>
    </group>
    </else>
    </choose>
    </layout>
    </bibliography>
    </style>
  • edited December 4, 2022
    Some ; should be replaced with whitespace.
    There is no term issued
    And <choose> </choose> pairs should be added before <if> and after </else>.
  • Thanks johnmy!


    <?xml version="1.0" encoding="utf-8"?>
    <style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="en-GB">
    <info>
    <title>Royal Society of Chemistry(new)</title>
    <id>http://www.zotero.org/styles/royal-society-of-chemistry-new</id>
    <link href="http://www.zotero.org/styles/royal-society-of-chemistry-new" rel="self"/>
    <link href="http://www.rsc.org/learn-chemistry/resource/download/res00001664/cmp00004956/pdf" rel="documentation"/>
    <link href="http://www.rsc.org/journals-books-databases/journal-authors-reviewers/prepare-your-article/#format-layout" rel="documentation"/>
    <author>
    <name>Julian Onions</name>
    <email>julian.onions@gmail.com</email>
    </author>
    <contributor>
    <name>Ivan Bushmarinov</name>
    <email>ib@ineos.ac.ru</email>
    </contributor>
    <contributor>
    <name>Steven R. Kirk</name>
    <email>steven.kirk@cantab.net</email>
    </contributor>
    <category citation-format="numeric"/>
    <category field="chemistry"/>
    <summary>The Royal Society of Chemistry journal style.</summary>
    <updated>2018-12-26T22:22:35+00:00</updated>
    <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
    </info>
    <macro name="editor">
    <names variable="editor">
    <label form="short" suffix=" "/>
    <name initialize-with=". " and="text" delimiter=", " delimiter-precedes-last="never"/>
    </names>
    </macro>
    <locale xml:lang="en">
    <terms>
    <term name="presented at">presented in part at the</term>
    </terms>
    </locale>
    <macro name="author">
    <choose>
    <if type="patent">
    <group delimiter=", ">
    <choose>
    <if variable="authority">
    <text variable="authority"/>
    </if>
    <else>
    <text variable="publisher"/>
    </else>
    </choose>
    <text variable="number"/>
    </group>
    </if>
    <else>
    <names variable="author">
    <name initialize-with=". " and="text" delimiter=", " delimiter-precedes-last="never"/>
    <label form="short" prefix=", " text-case="capitalize-first"/>
    <substitute>
    <names variable="editor"/>
    </substitute>
    </names>
    </else>
    </choose>
    </macro>
    <macro name="title">
    <choose>
    <if type="bill book graphic legal_case legislation motion_picture report song" match="any">
    <text variable="title" font-style="italic"/>
    </if>
    <else>
    <text variable="title"/>
    </else>
    </choose>
    </macro>
    <macro name="publisher">
    <group delimiter=", ">
    <text variable="publisher"/>
    <text variable="publisher-place"/>
    </group>
    </macro>
    <macro name="pages">
    <label variable="page" form="short" suffix=" "/>
    <text variable="page"/>
    </macro>
    <macro name="book-container">
    <group delimiter=", ">
    <group delimiter=" ">
    <text term="in"/>
    <text variable="container-title" font-style="italic"/>
    </group>
    <text macro="editor"/>
    </group>
    </macro>
    <macro name="issued">
    <choose>
    <if type="speech" match="any">
    <date variable="issued">
    <date-part name="month" suffix=", "/>
    <date-part name="year"/>
    </date>
    </if>
    <else>
    <date date-parts="year" form="text" variable="issued"/>
    </else>
    </choose>
    </macro>
    <macro name="edition">
    <choose>
    <if is-numeric="edition">
    <group delimiter=" ">
    <number variable="edition" form="ordinal"/>
    <text value="edn" suffix="."/>
    </group>
    </if>
    <else>
    <text variable="edition" suffix="."/>
    </else>
    </choose>
    </macro>
    <citation collapse="citation-number">
    <sort>
    <key variable="citation-number"/>
    </sort>
    <layout delimiter="," vertical-align="sup">
    <text variable="citation-number"/>
    </layout>
    </citation>
    <bibliography second-field-align="flush" entry-spacing="0">
    <layout suffix=".">
    <text variable="citation-number"/>
    <text macro="author" suffix=", "/>
    <choose>
    <if type="thesis">
    <group delimiter=", ">
    <text variable="genre"/>
    <text variable="publisher"/>
    <text macro="issued"/>
    </group>
    </if>
    <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
    <text macro="title" suffix=", "/>
    <group delimiter=", ">
    <text macro="publisher"/>
    <text macro="edition"/>
    <text macro="issued"/>
    <text variable="volume" prefix="vol. "/>
    </group>
    </else-if>
    <else-if type="chapter paper-conference" match="any">
    <group delimiter=", ">
    <text macro="book-container"/>
    <text macro="publisher"/>
    <text macro="edition"/>
    <text macro="issued"/>
    <text variable="volume" prefix="vol. "/>
    <text macro="pages"/>
    </group>
    </else-if>
    <else-if type="article-journal">
    <group delimiter=", ">
    <text variable="container-title" font-style="italic" form="short"/>
    <choose>
    <if variable="page">
    <text macro="issued"/>
    <text variable="volume" font-weight="bold"/>
    <text variable="page"/>
    </if>
    <else>
    <text variable="DOI" prefix=", DOI:"/>
    </else>
    </choose>
    </group>
    </else-if>
    <else-if type="webpage post-weblog" match="any">
    <group delimiter=", ">
    <text variable="title" form="short"/>
    <text variable="URL"/>
    <group delimiter=" " prefix="(" suffix=")">
    <text term="accessed"/>
    <date form="text" variable="accessed"/>
    </group>
    </group>
    </else-if>
    <else-if type="software" match="any">
    <group delimiter=", ">
    <text variable="title" form="short"/>
    <group delimiter=" " prefix="(version " suffix=")">
    <text variable="version"/>
    </group>
    <choose>
    <if variable="publisher">
    <text macro="publisher"/>
    </if>
    <else>
    <choose>
    <if variable="DOI">
    <text variable="DOI" prefix=", DOI:"/>
    </if>
    <else-if variable="URL">
    <text variable="URL" prefix=", "/>
    </else-if>
    </choose>
    </else>
    </choose>
    <text macro="issued"/>
    </group>
    </else-if>
    <else-if type="speech" match="any">
    <group delimiter=", ">
    <group delimiter=" ">
    <text term="presented at"/>
    <text variable="event"/>
    </group>
    <text variable="event-place"/>
    <text macro="issued"/>
    </group>
    </else-if>
    <else>
    <group delimiter=", ">
    <text variable="container-title" form="short" font-style="italic"/>
    <text macro="issued"/>
    <text variable="volume"/>
    <text variable="page"/>
    </group>
    </else>
    </choose>
    </layout>
    </bibliography>
    </style>
  • Can you try that one? The validator times out when I upload the CSL file there for checking.
  • edited December 4, 2022
    You could paste as text instead of uploading csl file in that url.
  • Tried that, still got a timeout
  • ; are still in your code.
  • Those were in the original style.
    Many thanks for your help!
  • (the ; are inserted by the forums in some cases. No idea what's going on, but very little likely they weren't the actual problem with the style)
Sign In or Register to comment.