Zotero Style Editor: xml line break

What code does the Style Editor accept as a line break?

I'm trying to create an annotated style and want a line break before <text variable="note"/>.

I've tried display=block, XML carriage return (can't get it to display in this comments field), XML line feed (same), CDATA ... and haven't yet found anything that works.
  • display="block" will work in the actual style, even if the editor doesn't take it. Go with that.
  • edited April 5, 2016
    I think that line break is not in CSL specification. But display="block" should be work. As you can see in style APA 6th with abstract https://www.zotero.org/styles?q=APA%206th%20abs (code line:547)
  • Thanks for the recommendations. I'm going with <text variable="note" display="block"/> ...

    ... but Word>Insert Bibliography - using my custom style - generates this:

    "CSL error: Level mismatch error: wanted bib_first but found_other"

    Any suggestions?
  • use validator http://validator.citationstyles.org/ to find your error
  • My style validates for 1.0 and 1.0.1, though not for 0.8.1 - and Insert Bib still generates "Level mismatch error". Appreciate any further suggestions.
  • Send your code on gist.github.com
  • could you share the style? We've never seen that error. (put on gist.github.com as a private gist or something along those lines)
  • https://gist.github.com/anonymous/828c4c064cfdfa9d864e90378a3775f8

    Thanks for taking a look
  • edited April 5, 2016
    It looks like second-field-align="flush" is incompatible with the <text variable="note" display="block"/> line (which makes kinda sense, since they're contradicting instructions). Removing the former fixes the error.
  • (still, it shouldn't break as long as it's validating, so we should either be explicit about this being disallowed or ask fbennett to look into fixing it).
  • Sure. Can't really test for this in the schema, though, unless we add another Schematron rule.
  • Second-field-align is essentially shorthand for setting a display attribute on the first-rendered variable, and another on a group wrapping everything else. Using both methods at the same time shouldn't crash the processor (I'll fix that), but output may look weird.
  • Removed second-field-align="flush" ... Now, trying to add the style at Preferences>Cite>Styles generates "not a valid style file". Help?
  • edited April 6, 2016
    I only delete second-field-align="flush" from your code on gist.github and all work ok. (I only do not see any note).

    There is link for download: https://drive.google.com/file/d/0B9G2tT5B0K0WQ0tIVmQ1LWpuTkU/view?usp=sharing
  • Thanks! It's working. Appreciate your time on this.
  • edited April 7, 2016
    You are welcome
Sign In or Register to comment.