·  XSLT – Elements – <xsl:value-of>


- Info :

  - If select attribute specifies element's attribute, then it's value is returned.

  - If select attribute specifies an element, then value of FIRST element, which satisfyes select criteria, is returned.

    This means that if specified element contains substructure, string with values of all child text elements is returned.

  - To reference current element, for instance one returned by <xsl:for-each>, set select attribute to "." .


- Example:



    <?xml version="1.0"?>

    <?xml-stylesheet type="text/xsl" href="test.xsl"?>




      List of students

      <student id="88765">











        <age > 23 </age>







    <?xml version="1.0" ?>

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


      <xsl:template match="people">

        <xsl:value-of select="student/name"/> <br/>

        <xsl:value-of select="student/@id" /> <br/>






    Jack Junior