Previous | Next | Indexes
adultinternetusers > Tutorials > XSLT 2.0 Tutorial > Templates - basic usage (7/12) >

Current position

The function position() gives position of the item in currently processed sequence.


            <xsl:output  method="xml"

            <xsl:template  match="/">
                  <xsl:apply-templates  select="aaa"/>

            <xsl:template  match="aaa">
                        <xsl:apply-templates  select="bbb"/>
                        <xsl:apply-templates  select="bbb[position()>2]"/>

            <xsl:template  match="bbb">
                        <xsl:value-of  select="position()"/>
                        <xsl:text>. </xsl:text>
                        <xsl:value-of  select="."/>



            <zzz>1. A</zzz>
            <zzz>2. B</zzz>
            <zzz>3. C</zzz>
            <zzz>4. D</zzz>
            <zzz>1. C</zzz>
            <zzz>2. D</zzz>

Previous chapter: - - -
Next chapter: Sequences
Previous page: Element xsl:apply-templates
Next page: Shared templates for several elements

Kevin Carr in Stanton

Natural Skin Care and European Soaps
Kevin Carr
City of Stanton

You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks