Is a way to generate random number using XSLT 1.0 [Teamsite CMS]

I'm trying to generate random number using XSLT 1.0 (in Teamsite). Every time I generate a page a new random number should be generated as well.

Answers


Here is the solution:

Teamsite XSLT uses xalan-j processor, it allows you to use Java library functions and below code will helps you creating random number everytime you generate a page.

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" exclude-result-prefixes="xalan math"
                  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                  xmlns:xalan="http://xml.apache.org/xalan"
                  xmlns:math="xalan://java.lang.Math">
       <xsl:template match="/">
           <xsl:value-of select="math:random()"/>
        </xsl:template>

    </xsl:stylesheet>

Need Your Help

Relational query using parse-cloud rest API

ember.js parse-platform

I am trying to fetch data from parse-cloud using parse-rest-api,but don't know what's going wrong. I have four classes in parse-cloud

ambiguous redirection

linux bash redirect

I'm trying to go the current directory and all sub direcotires, and add some annotations into each file that ends in .sql