Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Using XSL to calculate time (t = hh:mi + mi) >Thread Next - Re: Using XSL to calculate time (t = hh:mi + mi) Re: Using XSL to calculate time (t = hh:mi + mi)To: NULL Date: 12/1/2006 6:07:00 AM I'm not sure what XSLT parser we have here. Any easy way to figure this out? Its hard to find the administrator of the server here, and my guess is that if I find him, he does not have this information at the top of his head. Is the XSLT parser significant for this type of task? I have implemented a preliminary solution to this, though, using string parsing anf number(), substing(), floor(), div and mod functions in the XSL statement. For special interested, the time for next program became: <xsl:choose> <xsl:when test = "floor((number(substring(nr/st,4,2))+number(nr/ln)) div 60)+number(substring(nr/st,1,2)) > 23" > <xsl:value-of select="floor((number(substring(nr/st,4,2))+number(nr/ln)) div 60)+number(substring(nr/st,1,2)) mod 24"/> </xsl:when> <xsl:otherwise > <xsl:value-of select="floor((number(substring(nr/st,4,2))+number(nr/ln)) div 60)+number(substring(nr/st,1,2))"/> </xsl:otherwise> </xsl:choose>:<xsl:choose><xsl:when test = "((number(substring(nr/st,4,2))+number(nr/ln)) mod 60) < 10">0<xsl:value-of select="(number(substring(nr/st,4,2))+number(nr/ln)) mod 60"/> </xsl:when> <xsl:otherwise > <xsl:value-of select="(number(substring(nr/st,4,2))+number(nr/ln)) mod 60"/> </xsl:otherwise> </xsl:choose> Thanks for help! -Per Magnus fedro wrote: > Martin Honnen schrieb: > > > kebabkongen@h... wrote: > > > XSLT/XPath 1.0 have basic string parsing functions which allow you to > > > that sounds not like a job xslt, because the string functions (i.e. > substring-after ect...) are TOO basic. > > Other question: which XSLT-Parser ? | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
