How get first name initial and last name in XSLT
问题 I want yo get the first name initial and last name. Input : <root> <ele name="Samp Huwani"/> <ele name="Gong Gitry"/> <ele name="Dery Wertnu"/> </root> Output <names>S Huwani</name> <names>G Gitry</name> <names>D Wertnu</name> Tried Code: <xsl:template match="root/name"> <names> <xsl:value-of select="@name" /> </name> </xsl:template> I am using XSLT 2.0 . Thank you 回答1: With the given example, you could use: <xsl:template match="/root"> <xsl:copy> <xsl:for-each select="ele"> <name> <xsl:value