I am attempting to modify the CHICAGO.XSL bibliographic style to conform with the 16th edition of the Chicago Manual of Style. I have been able to make a number of tweaks and get things closer, however, I have been unable to solve the following issue. If I have two references in a single in-text citation that are from the same author but have different dates, then the correct citation is
(Author Year1, Year2)
However, currently the CHICAGO.XSL style will do this:
(Author, Title Year1, Author, Title Year2)
I have been able to figure out how to remove the spurious Title information, but I have not been able to get Word to remove the Author name from the second, but not the first citation. In a more complicated citation I may have the following:
(Author1 Year 1; Author2 Year2.1, Year2.2; Author3 Year3)
Notice the use of semicolons here (I fixed this already) and the use of the Authors for everything but the third reference.
Now, this functionality is supported in the References section, because the XML object being processed contains all of the sources, and so you can use position() and indexing to look at the previous and next authors and determine whether they are the same as the current author or not. If they are, then you can do something different. However, the logic for the b:Citation part of the template isn't the same, as the b:Citation as far as I can tell will give only a single citation element, not all of the citation elements. This means that there is not an obvious way to compare authors. There is the b:Citation/b:RepeatedAuthor variable that is accessible, but this only indicates whether the given citation has an author that is a repeated author, and does not indicate whether or not you are the first reference of a set of repeated author references, or whether you are the second, third, and so on. What I really need is something like b:Citation/b:AuthorMatchesPreviousAuthor so that I can do something different with the subsequent repeated author citations.
I can hack part of this manually without editing the XSL file by simply manually editing the citation field to insert some strategic \n flags, but this actually doesn't solve the problem, because I need to use a comma to separate the dates of the references that share a common author, but a semicolon to separate the references that have different authors. I cannot modify the punctuation manually in the field, so I need another solution.
I am trying to figure out how to do this, but I cannot find a single reference to the b:Citation XML object and how I might work with it, nor can I find any generation information at all on how to work with Bibliography styles other than some obvious intro stuff. I need to know the actual tree structure I'm working with so that my XSLT makes sense, but I can't find a reference anywhere for how to do this.
Can someone help?