diff options
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/uddf-export.xslt | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/xslt/uddf-export.xslt b/xslt/uddf-export.xslt index 6468e8927..9a0325689 100644 --- a/xslt/uddf-export.xslt +++ b/xslt/uddf-export.xslt @@ -72,12 +72,21 @@ <xsl:value-of select="."/> </xsl:attribute> <personal> - <first_name> - <xsl:value-of select="substring-before(., ' ')"/> - </first_name> - <last_name> - <xsl:value-of select="substring-after(., ' ')"/> - </last_name> + <xsl:choose> + <xsl:when test="contains(., ' ')"> + <first_name> + <xsl:value-of select="substring-before(., ' ')"/> + </first_name> + <last_name> + <xsl:value-of select="substring-after(., ' ')"/> + </last_name> + </xsl:when> + <xsl:otherwise> + <first_name> + <xsl:value-of select="."/> + </first_name> + </xsl:otherwise> + </xsl:choose> </personal> </buddy> </xsl:for-each> |