I have a requirement wherein I need to generate a 32-character random string value using XSLT containing upper case letters, lower case letters & numbers.
I am using the below code for this right now, however, the values generated are too similar and upper case letters are not included.
Is there an alternate way to achieve this?
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="node()">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="/">
<ABC>
<xsl:for-each select="ABC/ABC">
<DEF>
<externalCode><xsl:value-of select="concat(generate-id(),generate-id(),generate-id(),generate-id())"/></externalCode>
<userId><xsl:value-of select="userId"/></userId>
</DEF>
</xsl:for-each>
</ABC>
</xsl:template>
</xsl:stylesheet>
Thanks