Check for missing title in CSL

Hello,

I'd like to ask if there's a possibility to check within a CSL-style for missing "title"- and "title-short"-variables. I intend to add a function to a CSL-style that automatically adds the text value "o. T." (German for "ohne Titel", which means "no title") in such a case. It would, for example, be useful when adding archive sources or post cards to Zotero that often don't have a title/headline. However, "title" seems to be the only variable that you can't check for match="none".

Take, for example, the CSL-Style "Zeitgeschichte (Deutsch)", and change the "title-long"-macro to:


<macro name="title-long">
<group>
<choose>
<if variable="title" match="none">
<text value="o. T."/>
</if>
<else-if type="book">
<text variable="title"/>
</else-if>
<else>
<text variable="title"/>
<date prefix=" [" variable="original-date" suffix=")">
<date-part name="year"/>
</date>
</else>
</choose>
<text prefix=", " macro="secondary-contributors"/>
</group>
</macro>


Could you please tell me the reason for why it's not working or show me a solution?

Thank you very much in advance.

Kind regards,

Goethe
Sign In or Register to comment.