From: Norman W. <nw...@us...> - 2006-04-10 22:22:48
|
Update of /cvsroot/docbook/xsl2/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3118 Modified Files: common.xsl Log Message: Improve handling of personal names Index: common.xsl =================================================================== RCS file: /cvsroot/docbook/xsl2/common/common.xsl,v retrieving revision 1.13 retrieving revision 1.14 diff -u -U2 -r1.13 -r1.14 --- common.xsl 10 Apr 2006 13:31:49 -0000 1.13 +++ common.xsl 10 Apr 2006 22:22:42 -0000 1.14 @@ -83,4 +83,9 @@ <xsl:param name="node" select="."/> + <xsl:variable name="personname" + select="if ($node/self::db:personname) + then $node + else $node/db:personname"/> + <xsl:variable name="style"> <xsl:choose> @@ -105,20 +110,20 @@ <!-- $node/db:personname --> <xsl:choose> - <xsl:when test="not($node/db:personname/*)"> - <xsl:value-of select="$node/db:personname"/> + <xsl:when test="not($personname/*)"> + <xsl:value-of select="$personname"/> </xsl:when> <xsl:when test="$style = 'family-given'"> <xsl:call-template name="person-name-family-given"> - <xsl:with-param name="node" select="$node/db:personname"/> + <xsl:with-param name="node" select="$personname"/> </xsl:call-template> </xsl:when> <xsl:when test="$style = 'last-first'"> <xsl:call-template name="person-name-last-first"> - <xsl:with-param name="node" select="$node/db:personname"/> + <xsl:with-param name="node" select="$personname"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="person-name-first-last"> - <xsl:with-param name="node" select="$node/db:personname"/> + <xsl:with-param name="node" select="$personname"/> </xsl:call-template> </xsl:otherwise> |