Zotero Word bibliography ignores "webpage" type

How to reproduce:

Modify default IEEE csl file so that there two additional styles, one for type "article" and one for type "webpage". Make sure styles are distinguishable (i.e. - include prefix="ThisIsArticle")
Put "webpage" before "article" so that "webpage" is processed first.
View formatted webpage bibliographic entry in Zotero CSL editor
Insert bibliography entry into Word, and set style to the modified style.

In the CSL style editor, the bibliographic entry will be formatted as a "webpage"
In Word, the bibliographic entry will be formatted as an "article"

Example CSL expert:

<else-if type="webpage">
<group delimiter=", ">
<text macro="title"/>
<text variable="container-title" font-style="italic"/>
<text variable="URL"/>
<date variable="accessed" >
<date-part name="year" prefix="(" suffix=")"/>
</date>
</group>
</else-if>
<else-if type="article">
<group delimiter=", ">
<text macro="title"/>
<text variable="container-title" font-style="italic"/>
<text variable="URL"/>
<date variable="issued" >
<date-part name="year" prefix="(" suffix=")"/>
</date>
</group>
</else-if>
  • edited January 13, 2010
    I'm not clear on the details, but current CSL does fallbacks on the item types, and article-journal is the fallback for webpage. I think that means that a "webpage" item will return true if you test it for webpage-ness or for journal-article-ness. If that's right, then the first test will return true for both types (which seems to be the behavior you're getting).

    Try reversing the order of the conditions and see what happens.

    (EDIT: Never mind this comment. As bpmccall points out in response below, my read of the CSL operators is right -- but means that the sample is correctly ordered, of course. Something does seem to be up with the way cites are rendered for editing vs how they are rendered for delivery to the document.)
  • Yes, type="article" and type="webpage" both return true for web pages. So, in the example shown above, a web page should be shown in the web page format (i.e. - the second else-if will be ignored because the previous else-if evaluates as "true").

    As I said, the CSL editor (chrome://zotero/content/tools/csledit.xul) gives the correct behavior, but the Word plugin does not.

This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.