[citeproc bug] substitute doesn't work correctly for title macro
sample citation style and RDF here:
https://gist.github.com/3670153
Expected output:
“Dictionary Entry.” 2009. <i>Book With Series Title 3rd Edition</i>. Series 3. Location: Test Publisher.
Actual output:
“Dictionary Entry.” 2009. “Dictionary Entry.” <i>Book With Series Title 3rd Edition</i>. Series 3. Location: Test Publisher.
In other words, contrary to specs, the susbtituted macro doesn't get suppressed in the rest of the citation.
(Tested with current stable Zotero, not with branch)
https://gist.github.com/3670153
Expected output:
“Dictionary Entry.” 2009. <i>Book With Series Title 3rd Edition</i>. Series 3. Location: Test Publisher.
Actual output:
“Dictionary Entry.” 2009. “Dictionary Entry.” <i>Book With Series Title 3rd Edition</i>. Series 3. Location: Test Publisher.
In other words, contrary to specs, the susbtituted macro doesn't get suppressed in the rest of the citation.
(Tested with current stable Zotero, not with branch)
The fault is due to this construct:
<macro name="contributors">
<names variable="author">
<name and="text" name-as-sort-order="first"
sort-separator=", " delimiter=", "
delimiter-precedes-last="always"/>
<label form="verb-short"
prefix=", " suffix="."
text-case="lowercase" strip-periods="true"/>
<substitute>
<text macro="editor"/>
<text macro="translator"/>
<text macro="title"/>
</substitute>
</names>
<text macro="recipient"/>
</macro>
The editor and translator macros both look like this:
<macro name="editor">
<names variable="editor">
<name name-as-sort-order="first" and="text"
sort-separator=", " delimiter=", "
delimiter-precedes-last="always"/>
<label form="short" prefix=", " suffix="." strip-periods="true"/>
</names>
</macro>
So the top-level contributors macro is looking for "author", not finding it, and trying the children of the top-level cs:substitute. When it tries the editor macro, it finds a nested full-form cs:names construct. This macro-nested construct is apparently corrupting the substitution list pointer in the processor, allowing it to throw the extra copy of the title.
The cs:name code in each of the two nested macros uses the same attributes as the master cs:name node in the top-level contributors. As far as I can tell, the two macro calls could be simplified to this, without any change to rendered output:
<names variable="editor"/>
<names variable="translator"/>
I'll take a look at the processor and see if I can get it to behave correctly on these multiply-nested names constructs; but in this case (unless I'm missing something) they don't seem to be necessary.
In the locales, it looks like verb-short on creators has been used to provide the short form without pluralisation (which seems like an abuse of the semantics, but that's another issue). In the original CMS style construct, verb-short was only applied on "author", where it turns up empty, while plain short (which pluralises) was used in the editor and translator macros.