The stylesheets support three different styles for rendering a person's name from a personname
element. You select the style by adding a role
attribute to the personname
element. The styles are:
personname role attribute | Example output |
---|---|
none | Bob Stayton |
role="last-first" | Stayton, Bob |
role="family-given" | Stayton Bob [FAMILY Given] |
The family-given
style commonly used in Asia adds a text label to identify the style so it won't be confused with the first-name last-name order. If you want to change the way that style is handled, you can customize the template named person.name.family-given
in common/common.xsl
as follows:
<xsl:template name="person.name.family-given"> <xsl:param name="node" select="."/> <!-- The family-given style applies a convention for identifying given --> <!-- and family names in locales where it may be ambiguous --> <xsl:apply-templates select="$node//surname[1]"/> <xsl:if test="$node//surname and $node//firstname"> <xsl:text> </xsl:text> </xsl:if> <xsl:apply-templates select="$node//firstname[1]"/> <xsl:text> [FAMILY Given]</xsl:text> </xsl:template>
DocBook XSL: The Complete Guide - 3rd Edition | PDF version available | Copyright © 2002-2005 Sagehill Enterprises |