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

Selection of all child elements or all attributes of an element

If star "*" is used instead of element names, all names of elements are matched. Similarly, "@*" matches all attribute nodes.

Function name() returns name of currently processed elements or attributes.


            <xsl:output  method="xml"

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

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

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

            <xsl:template  match="@*">
                        <xsl:value-of  select="name()"/>
                        <xsl:text>: </xsl:text>
                        <xsl:value-of  select="."/>


      <aaa  p="1"

            <z1>bbb: B</z1>
            <z1>ccc: C</z1>
            <z1>ddd: D</z1>
            <z2>p: 1</z2>
            <z2>r: 2</z2>
            <z2>s: 3</z2>

Previous chapter: - - -
Next chapter: Sequences
Previous page: Shared templates for several elements
Next page: Template priorities

Kevin Carr in Stanton

Natural Skin Care and European Soaps
TickTalk 5
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