Previous | Next | Indexes
Zvon > Tutorials > XSLT 2.0 Tutorial > Axes (1/8) >

Steps

An XPath expression may consist of several steps, these steps are separated by slash "/".

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="/">
                  <xxx>
                        <xsl:value-of  select="/aaa/bbb/ccc"/>
                  </xxx>
                  <yyy>
                        <xsl:value-of  select="/*/*/@*"/>
                  </yyy>
            </xsl:template>

      </xsl:stylesheet>
XML

      <aaa>
            <bbb  r="rrr">
                  <ccc>12</ccc>
            </bbb>
      </aaa>
Output

      <xxx>12</xxx>
      <yyy>rrr</yyy>


Previous chapter: Sorting
Next chapter: Named-Templates
Previous page: - - -
Next page: Child and parent axes