Re: newbie question: combining two trees

Subject: Re: newbie question: combining two trees
From: "Sebastian Rahtz" <sebastian.rahtz@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 Jan 2000 21:33:00 +0000 (GMT)
See the following. I really only changed the ../EMPS you had to
/TABLES/EMPS. It is rather a brute force approach. 

A shame to see all upper-case data in this day and age.....

Sebastian

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
  <xsl:template match="/">
    <html>
      <head>
        <title>Employees</title>
      </head>
      <body>
        <xsl:apply-templates select="TABLES/DEPTS"/>
      </body>
    </html>
  </xsl:template>

  <xsl:template match="DEPTS">
      <xsl:for-each select="ROW_DEPT">
              <xsl:value-of select="NAME"/><br/>
        <xsl:variable name="test" select="DEPTNR"/>
        <xsl:for-each select="/TABLES/EMPS/ROW_EMP[DEPTNR=$test]">
                <xsl:value-of select="NAME"/>
        </xsl:for-each>
         <br/>
   <xsl:text>
   </xsl:text>
      </xsl:for-each>
  </xsl:template>
</xsl:stylesheet>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread