I’ve checked in a set of tests that exercise the basic name forms in
citeproc-js, and I think I’m nearly done with the handling of
individual names. There are two issues that might warrant some
discussion. One seems to invite a new CSL attribute. The other is a
minor extension that I think may not be an immediate CSL issue.
“Asian” Display Ordering
For Japanese and other names that may, depending on the style, be
displayed sort-key-end first, I have included a hint in the test data.
The terminal exclamation point in the name data string is the hint,
but it could take any form that plays nicely with the environment into
which a processor is deployed. I reckon that the test below is
actually incorrect. The default should probably be Western ordering
for romanized Japanese names, but with “localized ordering” as an
option. In either case, though, I think this means that some option
would be needed to trigger the alternate behaviour.
//
// INPUT: Miyamoto, Musashi !
{
“citation”:[ {“source”:“book::simple-sticky-name-1”} ],
“testof”: “citation”,
“csl”:"
",
“result”:“Miyamoto Musashi”
}
Thoughts on adding such an option?
Commas in Name Suffixes
The following two tests show how I have tried to cope with the
space-or-comma name suffix issue by adding a hint to the suffix field.
As with the name-ordering hint above, specific implementations can
provide the hint in any way that works locally; the syntax here is
just a simple-to-type format used for testing.
//
// INPUT: Doe, Jeffrey, Jr.
{
“citation”:[ {“source”:“book::western-name-with-comma-suffix-1”} ],
“testof”: “citation”,
“csl”:"
",
“result”:“Jeffrey Doe Jr.”
}
//
// INPUT: Doe, Jeffrey,! Jr.
{
“citation”:[ {“source”:“book::western-name-with-comma-suffix-1”} ],
“testof”: “citation”,
“csl”:"
",
“result”:“Jeffrey Doe, Jr.”
}
Frank