Scrier Posted May 20, 2008 Share Posted May 20, 2008 Hi, Is it possible to decrease or increase the value of a number represented in an xml file with xsl? i.e I have the field <number>##</number>What I wan't to do is to get the string value of the above or below number value representation with xsl. I.e if the number was 15 I would like to get 14 or 16. // Andreas Link to comment Share on other sites More sharing options...
aalbetski Posted May 20, 2008 Share Posted May 20, 2008 <top> <value>1</value> <value>2</value> <value>3</value> </top> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aid="Indesign/support" version="1.0"> <xsl:output method="html" /> <xsl:template match="/"> <xsl:for-each select="//value"> <xsl:value-of select="string(number(text())+1)"/> </xsl:for-each> </xsl:template> </xsl:stylesheet> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.