Last active
October 15, 2019 14:20
-
-
Save SebDeclercq/93c3ce61d8324c41eb695923975e167a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<xsl:stylesheet | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
version="1.0"> | |
<xsl:output | |
method="xml" | |
encoding="UTF-8" | |
indent="yes"/> | |
<xsl:template name="ola" match="/"> | |
<xsl:param name="string" select="'hello world'"/> | |
<xsl:param name="idx" select="1"/> | |
<xsl:if test="string-length($string) >= $idx"> | |
<xsl:element name="ola"> | |
<xsl:value-of select="substring($string, 0, $idx)"/> | |
<xsl:value-of select="translate( | |
substring($string, $idx, 1), | |
'abcdefghijklmnopqrstuvwxyz', | |
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
)"/> | |
<xsl:value-of select="substring($string, $idx + 1)"/> | |
</xsl:element> | |
<xsl:call-template name="ola"> | |
<xsl:with-param name="idx" select="$idx + 1"/> | |
</xsl:call-template> | |
</xsl:if> | |
</xsl:template> | |
</xsl:stylesheet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<ola>Hello world</ola><ola>hEllo world</ola><ola>heLlo world</ola><ola>helLo world</ola><ola>hellO world</ola><ola>hello world</ola><ola>hello World</ola><ola>hello wOrld</ola><ola>hello woRld</ola><ola>hello worLd</ola><ola>hello worlD</ola> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment