I was planning to abstract terms in such a way that it wouldn’t matter
within my code (when a term contains only text, I’d just assume that the
text applies to both single and multiple).
I just mean that “editor” and “edited-by” are different variables. You
need logic to account for that in the current approach. It’d be mildly
easier to just look up a role (“editor”) and then from there the
specific rendering.
In that case, why couldn’t we just do:
Edited By
Since the term is in a separate class, we don’t have to worry about
conflicting names.
I’m a bit unclear on locators. Why does contain a tag
while all bibliography elements contain elements? Why is there an
include-label attribute on the tag?
This is a tricky issue to deal with, and I’m not I have it exactly right.
Remember, locator is the base class so to speak. Pages are a kind of locator.
In reference lists, you really have to use the specific locators
because order and formatting is that specific.
In citations, however, you typically have a single locator, which is
usually – but not always – page numbers. So consider a style like
APA, which should be like (Doe, 1999:23). The locator isn’t printed.
But what if you need to indicate a paragraph number?
Ah. What threw me off is that, in csl.rnc, volume and issue also inherit
from locator.
That’s what we need to configure.
This is another one of those things that becomes more awkward,
incidentally, with the localized approach. Earlier, there would be
lcoator elements (terms), and if one was present, then the label would
get printed. If it wasn’t, it didn’t.
Ah, I see. This issue is pretty tricky. We have to be able to specify:
pp105-106
pp. 105-106
p105-106 (as Johan pointed out a while back)
pages 105-106
As well as:
¶1-2 (maybe?)
¶ 1-2
paragraphs 1-2
There’s also the situation of citing law, about which you probably know much
more than I do (is there only one format?). And finally, there’s the Bible,
the Constitution, and other similar documents, but I think we’d be wise to
consider these as special cases we don’t necessarily have to handle.
The main problem here is that, while there are short and long roles, there
are also many possible permutations of the two. There are more variations on
page number than on paragraphs, and prefix/suffix can change depending on
the locator (how do you specify that you want "pp. " for multiple pages but
"¶ " for paragraphs?).
Right now, there are three solutions that come to mind:
-
Use a class-based approach similar to what I recommended for roles and
define a very wide range of possible classes.
-
Define only “short” and “long” forms and expect people who need "pp. "
and "¶ " to re-define the terms at the top of the file. (It probably doesn’t
matter too much that the localized version would be missing a period.)
-
Expect people who want "pp. " and "¶ " to define the element
separately from in to add a period to the label. (Of
course, this still doesn’t solve the irritating “p105-106” situation, which
would require redefining a term).
Either way, I would prefer to specify the label as a child element instead
of via a simple include-label attribute, since that way we can define a
prefix or suffix.
Perhaps you have some other solution to this issue in mind? I’d be happy to
hear something simpler/nicer than what I’ve got.
Simon