Previous | Next | Indexes
Zvon > Tutorials > XSLT 2.0 Tutorial > Sequences (6/10) >

Combination of sequences created with "to" operator

Sequences created with "to" operator are not special sequences and so they can be combined according to standard rules.
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">
                  <xsl:value-of  select="1 to 5,'a',10,'b',-2 to 2"/>
            </xsl:template>

      </xsl:stylesheet>
XML

      <aaa/>
Output
1 2 3 4 5 a 10 b -2 -1 0 1 2


Previous chapter: Templates - basic usage
Next chapter: Sequence Combinations
Previous page: Creating sequences using "to" operator
Next page: Function reverse