srkumar Posted April 15, 2008 Share Posted April 15, 2008 HI,I am translating xml files with xsl...Input XML file:<sec><title>1 Introduction</title><sec><title>1.1 XY Leo</title>I want to convert output xml file like below:Output XML file:<sec><title>Introduction</title><sec><title>XY Leo</title>Thanks in Advance,S. Rajamuthukumar Link to comment Share on other sites More sharing options...
boen_robot Posted April 15, 2008 Share Posted April 15, 2008 Ouch... you're asking for a text translation. Those things always hurt.Well, let's try it like this: <xsl:template match="*"><xsl:copy><xsl:apply-templates/></xsl:copy></xsl:template><xsl:template match="text()"><xsl:value-of select="substring-after(.,' ')"/></xsl:template> This relies on the fact that there is never a space before all the numbers are out. Hope the rest of your input XML has as consistently spaced content. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.