Non-CSL compliance for self-edited style

Hello all! I'm not well-versed in code editing, even if it's as easy-looking as XML. I've made the following change to an APA-derived citation style : the last names of authors will be in uppercase.

Checking for CSL-compliance of my file using https://validator.citationstyles.org/, it returns this error : 'Line 72: Element “name” from namespace “http://purl.org/net/xbiblio/csl” not allowed as child of element “macro” from namespace “http://purl.org/net/xbiblio/csl” in this context. (Suppressing further errors from this subtree.)' I've followed the name-part-formatting section of the documentation for CSL. I don't see what else to do. Help me please?

Here is the full section where the error is occuring : https://pastebin.com/2CjHU5Nn
  • No, you're repeating the name element, you want
    <if variable="author">
    <names variable="author">
    <name name-as-sort-order="all" and="text" sort-separator=", " initialize-with=". " delimiter=", " delimiter-precedes-last="never">
    <name-part name="family" text-case="uppercase"/>
    </name>


    (note the deleted / at the end of the name line.)



  • And to which element should name-part be the child? I also don't get how to make it so both in the Zotero Style editor and in Notepad++...
  • It’s a child of <name>
  • I give you the first 5lines above. No need to guess
  • (and indenting is purely cosmetic. Only the logical structure matters)
  • Aaaah, there it is. I thought indentation made the child-parent relation since it shows up little lines connecting both together lol :) Thank you!
Sign In or Register to comment.