t:person-name — Formats a personal name.

Defined in:
Used in:


<xsl:template name="t:person-name">
                  <xsl:param name="style" as="xs:string"/>


This template formats a personal name according to the specified style. This template must only be called when the current context item is a personname. The personname element can be used in two different ways, it can just contain the name:

  |<personname>Norman Walsh</personname>

or it can contain the name with markup:


How the name is formatted depends on which form of markup is used and which style is selected. Several styles are supported:

  1. If the name contains no markup, it is simply formatted as is.

  2. If the style is “FAMILY-given”, it is formatted with t:person-name-family-given and generally produces the family name in upper case followed by the given name. For example: “WALSH Norman”.

  3. If the style is “last-first”, it is formatted with t:person-name-last-first and generally produces the family name followed by the given name separated by a comma. For example: “Walsh, Norman”.

  4. If the style is “first-last”, it is formatted with t:person-name-first-last and generally produces the given name followed by the family name. For example: “Norman Walsh”.

  5. Any other value raises dbe:INVALID-NAME-STYLE.

Given names

Historically, DocBook used firstname for the given name of a person. In DocBook 5.1, the givenname element was introduced as an alternative. The stylesheets treat them identically.

The stylesheets attempt to determine what style to use for each personname:

  1. First, by looking at that the role attribute on that element. If any of styles from the $v:personal-name-styles list appear in the role, that style will be selected. (If more than one style appears, the results are undefined.)

  2. If the personname doesn’t identify a style, and if it’s a child of author, editor, or othercredit, the role attirbute of its parent is inspected.

  3. If the $personal-name-style is defined, it is is selected.

  4. If a style still hasn’t been selected the style in the localization file is used.

Personal names are notoriously complicated (see Names). DocBook includes several tags for identifying parts of names:

firstname or givenname

for a given name,


for a family name,


for lineage (such as “Jr” or “III”),


for an honorific title (such as “Dr” or “Ms”), and


for everything else.

In all likelihood, if your document contains a variety of personal names, you will need to use roles to disambiguate special cases and you will have to provide alternate or additional templates to format them.