[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Bibliography author repetition handling
In a TEI <biblStruct> bibliography that uses biblStruct/*/author/surname
(etc), I have managed to write the code that checks if the author name
in the prior <biblStruct> is the same, in which case the output is ---.
rather than the author's name. It works fine, but I'm running into a
problem where there the first author name is the same as that of the
prior <biblStruct> entry, but there are also multiple authors, in which
case the full name should be printed out.
I thought that one way I might resolve this is to test if the number of authors in the prior entry is the same as this one, but I can't get it to work. I also don't know if this is even the best way of handling this. The XML is like this: (present output here: http://www.acmuller.net/articles-shisou.html) ------------------------------------------- <biblStruct xml:id="Muller2017"><analytic><author><surname>Muller</surname><forename>A. Charles</forename></author><author><surname>Shimoda</surname><forename>Masahiro</forename></author><author><surname>Nagasaki</surname><forename>Kiyonori</forename></author><title level="a"><ref target="articles/2017-10-sat-taisho.pdf">The SAT TaishE Text Database: A Brief History</ref></title></analytic><monogr><title level="m">Reinventing the Tripitaka: Transformation of the Buddhist Canon in Modern East Asia</title><editor><surname>Wu</surname><forename>Jiang</forename></editor><editor><surname>Wilkinson</surname><forename>Greg</forename></editor><imprint><pubPlace>Lanham, MD</pubPlace><biblScope unit="pp">175b185</biblScope><publisher>Lexington Books</publisher><date>2017</date></imprint></monogr></biblStruct> <biblStruct><analytic><author><surname>Muller</surname><forename>A. Charles</forename></author><title level="a"><ref target="articles/2017-05-20-new-treatise-review.pdf">Xiong Shili and the New Treatise: A review discussion of Xiong Shili, <title level="m">New Treatise on the Uniqueness of Consciousness</title>, an annotated translation by John Makeham</ref></title></analytic><monogr><title level="j">Sophia</title><imprint><biblScope unit="vol">Online First</biblScope><date>2017</date><biblScope unit="pp">1b4</biblScope></imprint></monogr></biblStruct> <biblStruct><analytic><author><surname>Muller</surname><forename>A. Charles</forename></author><title level="a"><ref target="articles/2017-05-01-JKR-04_8.1muller.pdf">The Meaning of the Explicit and Inexplicit Approaches in WEnhyobs <title level="m">System of the Two Hindrances</title> (<title level="m">Ijang E-i</title> d:ig>))</ref></title></analytic><monogr><title level="j">Journal of Korean Religions</title><imprint><biblScope unit="vol">8</biblScope><biblScope unit="issue">1</biblScope><date>2017</date><biblScope unit="pp">63b91</biblScope></imprint></monogr></biblStruct> ------------------------------------------- and the relevant portion of the present XSLT is like this (new dysfunctional code commented out) <xsl:template match="author"> <xsl:variable name="prev-autnum" select="count(preceding::biblStruct[1]/*/author)"/> <xsl:variable name="this-autnum" select="count(*)"/> <xsl:choose> <!-- <xsl:when test="$prev-autnum = $this-autnum"> <xsl:choose>--> <xsl:when test="preceding::biblStruct[1]/*/editor[1] = . or preceding::biblStruct[1]/*/author[1] = ."> <xsl:choose> <xsl:when test="preceding::bibl[1]/author = ."> <xsl:text>----. </xsl:text> </xsl:when> <xsl:when test="preceding::bibl[1]/editor = ."> <xsl:text>----. </xsl:text> </xsl:when> <xsl:when test="preceding::bibl[1]/*/author = ."> <xsl:text>----. </xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>----. </xsl:text> </xsl:otherwise> </xsl:choose> </xsl:when> <!--</xsl:choose> </xsl:when>--> <xsl:otherwise> ..... TIA, Chuck
Graduate School of Humanities and Sociology Faculty of Letters University of Tokyo 7-3-1 HongE , BunkyE -ku Tokyo 113-8654, Japan Office Phone: 03-5841-3735 Web Site: Resources for East Asian Language and Thought http://www.acmuller.net Twitter: @H_Buddhism
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|