|
XSLT
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/> <xsl:template match="/aaa"> <xxx> <xsl:value-of select="reverse(1 to 5)"/> </xxx> <yyy> <xsl:value-of select="reverse(('c','b','a'))"/> </yyy> <zzz> <xsl:value-of select="reverse(bbb)"/> </zzz> </xsl:template> </xsl:stylesheet> |
|
|
XML
<aaa> <bbb>b1</bbb> <bbb>b2</bbb> <bbb>b3</bbb> </aaa> |
Output
<xxx>5 4 3 2 1</xxx> <yyy>a b c</yyy> <zzz>b3 b2 b1</zzz> |
| Previous chapter: | Templates - basic usage |
| Next chapter: | Sequence Combinations |
| Previous page: | Combination of sequences created with "to" operator |
| Next page: | Creation of sequences using for ... in ... return instruction |