<xslTutorial creator="nicmila@idoox.com">
<index keywords='// /'/>
<description>// is very common in location paths. When it is used at the beginning of location path, it means: select all nodes in the document of the specified type. (<stylesheet id='id2'/>). In the middle of a location path it means: select all nodes which appear in a node selected with the first part of location path. (<stylesheet id='id3'/> </description>
<xmlSource id="id1">
<AAA id='a1' pos='start'>
<BBB id='b1'/>
<BBB id='b2'/>
</AAA>
<AAA id='a2'>
<BBB id='b3'/>
<BBB id='b4'/>
<CCC id='c1'>
<DDD id='d1'/>
</CCC>
<BBB id='b5'>
<CCC id='c2'/>
</BBB>
</AAA>
</xmlSource>
<attValues>
</attValues>
<xslStylesheet id="id2">
<xsl:template match="/">
<xsl:apply-templates select="//BBB"/>
<xsl:apply-templates select="//CCC"/>
<xsl:apply-templates select="//DDD"/>
<xsl:apply-templates select="//AAA"/>
</xsl:template>
<xsl:template match="AAA">
<DIV style="color:navy">
<xsl:value-of select="name()"/>
<xsl:text> id=</xsl:text>
<xsl:value-of select="@id"/>
</DIV>
</xsl:template>
<xsl:template match="BBB">
<DIV style="color:purple">
<xsl:value-of select="name()"/>
<xsl:text> id=</xsl:text>
<xsl:value-of select="@id"/>
</DIV>
</xsl:template>
<xsl:template match="CCC">
<DIV style="color:red">
<xsl:value-of select="name()"/>
<xsl:text> id=</xsl:text>
<xsl:value-of select="@id"/>
</DIV>
</xsl:template>
<xsl:template match="DDD">
<DIV style="color:blue">
<xsl:value-of select="name()"/>
<xsl:text> id=</xsl:text>
<xsl:value-of select="@id"/>
</DIV>
</xsl:template>
</xslStylesheet>
<xslStylesheet id="id3">
<xsl:template match="/">
<xsl:apply-templates select="/xslTutorial/AAA//CCC"/>
<xsl:apply-templates select="/xslTutorial//AAA/BBB//*"/>
</xsl:template>
<xsl:template match="AAA">
<DIV style="color:navy">
<xsl:value-of select="name()"/>
<xsl:text> id=</xsl:text>
<xsl:value-of select="@id"/>
</DIV>
</xsl:template>
<xsl:template match="BBB">
<DIV style="color:purple">
<xsl:value-of select="name()"/>
<xsl:text> id=</xsl:text>
<xsl:value-of select="@id"/>
</DIV>
</xsl:template>
<xsl:template match="CCC">
<DIV style="color:red">
<xsl:value-of select="name()"/>
<xsl:text> id=</xsl:text>
<xsl:value-of select="@id"/>
</DIV>
</xsl:template>
<xsl:template match="DDD">
<DIV style="color:blue">
<xsl:value-of select="name()"/>
<xsl:text> id=</xsl:text>
<xsl:value-of select="@id"/>
</DIV>
</xsl:template>
</xslStylesheet>
</xslTutorial>