Punctuation issues

But how do we put a comma between editor and translator if and only if both
exist? With:

We have:

(K.V. Kukil, Ed.J. Doe, Trans.)

We want:

(K.V. Kukil, Ed., J. Doe, Trans.)

Unfortunately, basic prefix and suffix behavior won’t cut it here, because
we want a prefix if and only if the field exists. In the case that
there’s a translator but no editor, we don’t want to end up with:

(, J. Doe, Trans.)

Perhaps we need to add a “delimiter” attribute to the group field?

Simon

I think that’s indeed the more clean solution.

Bruce

I think I see. When you do substitution, you are wanting to carry the
formatting logic along with the variable.

That’s not how I see it. If an editor is substituted for an author,
then the editor takes on the formatting of the author. So …

Ah. Then we have other problems. My previous assumption was that if there
was a substitute element, the substitute element inherited as follows:

child element
overrides
element with the same name in the same
overrides
default element.

I admit that this hierarchy is a bit clearer:

child element
overrides
author element
overrides
default element

But, we need some way to control the italicization of the title, which
depends on the type. In most styles, a book title gets italicized, but an
article title does not. How do we do this within a element? Do
we just assume no one will have books without authors or editors?

We could use the rule that substitute contributors use the second hierarchy
above, while other fields use the first, but that’s kind of a messy
solution.

Wow, this gets incredibly complicated. Here’s what I’m doing right now. I’m
not sure what terminology to use (and the problem is bad enough without
terminology getting in the way), so, to try to make this as clear as
possible:

<-- PARENT ELEMENT





<-- CHILD ELEMENT



  1. Child element properties and children override all others.
  2. If the child element and parent element have the same base class (i.e.,
    both are contributors), then the parent element properties and children
    override the default.
  3. If the child element and parent element have different base classes, but
    an element exists in the current with the same name and relation
    attributes, then use this element to override the default.
  4. If neither of these cases are true, use the default.
  5. And then, after all this is done, copy the prefix and suffix from the
    parent element to the child element.

1 seems obvious. 2 is necessary to handle the editor/translator situation I
was confused about earlier without repetition. 3 is necessary because
will sometimes be italicized, and this is type-dependent. (Perhaps
this should be a special situation for , rather than a general one?
I wish we didn’t have to do this. It takes a lot of code.) 4 seems obvious,
given 3 (and either 3 or 4 is necessary, because has different
child elements than ). 5 is irritating, but necessary
(otherwise nothing comes out right).

I hope what I’m trying to say here is clear. I’m afraid it may not be, but
I’m not sure how to make it more explicit.

From a programming standpoint, this is pretty complex to implement. From a
style writing standpoint, I think that things remain fairly intuitive. It
certainly results in more concise CSL than my previous strategy. But, if at
all possible, I’d still like to simplify things. Any thoughts? We certainly
need some well-defined behavior here.

Simon

  1. If the child element and parent element have different base
    classes, but
    an element exists in the current with the same name and relation
    attributes, then use this element to override the default.

I’m having a hard time understanding this one. Can you try again?

3 is necessary because will sometimes be italicized, and this
is type-dependent. (Perhaps this should be a special situation for
, rather than a general one?

I think when you find yourself needing to do contortions, it probably
suggests needing special treatment.

Remember, too, that I introduced the “titles” (plural) as a wrapper so
that it was easy to support translated and original script titles.

Does rendering of titles change, then, when they are substituted? Like,
say you have a really long title and subtitle combo; does the whole
thing substitute, or just a short “title”? If the latter, what happens
to the rest of it?

Have not run into the problem in my own data and documents yet, but
could imagine it.

I wish we didn’t have to do this. It takes a lot of code.)

Have you looked at how many lines of XSLT I have?

BTW, I’ve been upgrading it over the past few days, and the
substitution stuff is still not totally done. It is somewhat tricky,
and quite different than the earlier approach.

Bruce

#3 means if you have:

... ... ... ...

When substituting for , you need the behavior to work
properly for both types. That is to say, “book” should have an italicized
title, but “article” should not. If you’re citing a dictionary, you need a
bibliography entry:

Merriam-Webster’s collegiate dictionary.(1993). Springfield, MA:
Merriam-Webster.

But if you’re citing a newspaper article, you need a bibliography entry
like:

Health care technology is a promise unfinanced. (2004, December 3). The
New York Times
, p. C5.

Thus, I need to pull from the to get the proper formatting.

I think this solution is incomplete. It solves the problem in the
bibliography but not the citations. Titles that are not italicized in the
bibliography should have quotes around them in the citation, whereas titles
italicized in the bibliography should remain italicized in the citation. It
also fails to solve the following problem:

Merriam-Webster’s collegiate dictionary (10th ed.).(1993).
Springfield, MA: Merriam-Webster.

(Maybe we could fix this by making a child element of ?)

Simon

Perhaps edition can optionally be a child of titles, or standalone;
just like cs:title now (well, at least it probably should).

Is that an actual example above?

Will take a look at the rest later …

Bruce

Yeah, it’s copy-and-pasted from
http://owl.english.purdue.edu/owl/resource/560/06/, although I think
there’s actually supposed to be a space between the period and the year.

Simon

When substituting for , you need the behavior to work
properly for both types. That is to say, “book” should have an
italicized
title, but “article” should not. If you’re citing a dictionary, you
need a
bibliography entry:

Merriam-Webster’s collegiate dictionary.(1993). Springfield, MA:
Merriam-Webster.

OIC. How general is this rule?

I think this solution is incomplete. It solves the problem in the
bibliography but not the citations. Titles that are not italicized in
the
bibliography should have quotes around them in the citation, whereas
titles
italicized in the bibliography should remain italicized in the
citation.

OK, I need to think on this some more; it’s tricky.

And we need to still need a conditional to account for the “if
periodical title use periodical title, else title” case.

Sigh … almost done, but one last hump it seems.

Bruce

When substituting for , you need the behavior to work
properly for both types. That is to say, “book” should have an
italicized
title, but “article” should not. If you’re citing a dictionary, you
need a
bibliography entry:

Merriam-Webster’s collegiate dictionary.(1993). Springfield, MA:
Merriam-Webster.

OIC. How general is this rule?

I believe it’s fairly general. It won’t appear in too many cases (because
there aren’t that many un-authored books), but I know APA and Chicago use
it.

I think this solution is incomplete. It solves the problem in the
bibliography but not the citations. Titles that are not italicized in
the
bibliography should have quotes around them in the citation, whereas
titles
italicized in the bibliography should remain italicized in the
citation.

OK, I need to think on this some more; it’s tricky.

And we need to still need a conditional to account for the “if
periodical title use periodical title, else title” case.

What’s wrong with putting before in
the substitute tag?

Simon

Am thinking no, because that assumes a chapter and an article would get
the same treatment, which I’m not sure (?) is the case.

Bruce

I guess you’re right, but why would you cite a chapter as a chapter (rather
than a book) if it didn’t have its own author?

Simon

True. Let’s just dump this one in the “worry about it later” bin.

Bruce