CSL-M: Title case conversion bug with cs:layout extension
zepinglee opened this issue · comments
The variable is not correctly converted to title case if it's rendered in the layout with locale
attribute (CSL-M extension). In the following test case, the cite item has "language": "en-US"
and it is rendered with <layout locale="en">
. Then the text-case="title"
should be applied to the title "Review of book by A.N. author"
. In the output, the last word "author" is capitalized as expected but the word "book" remains lowercase.
+ expected - actual
-Review of book by A.N. Author
+Review of Book by A.N. Author
>>===== MODE =====>>
citation
<<===== MODE =====<<
>>===== RESULT =====>>
Review of Book by A.N. Author
<<===== RESULT =====<<
>>===== CSL =====>>
<style
xmlns="http://purl.org/net/xbiblio/csl"
class="note"
default-locale="zh-CN"
version="1.0">
<info>
<id />
<title />
<updated>2009-08-10T04:49:00+09:00</updated>
</info>
<citation>
<layout locale="en">
<text variable="title" text-case="title"/>
</layout>
<layout>
<text variable="title" text-case="title"/>
</layout>
</citation>
</style>
<<===== CSL =====<<
>>===== INPUT =====>>
[
{
"id": "ITEM-1",
"language": "en-US",
"title": "Review of book by A.N. author",
"type": "book"
}
]
<<===== INPUT =====<<
>>===== VERSION =====>>
1.0
<<===== VERSION =====<<