Subject: [xsl] problem with multiple xml docs and 1 xsl sheet From: "Gene LaCava" <e.f.lacava@xxxxxxxxxxx> Date: Wed, 30 Jan 2002 13:53:23 -0500 |
I am so stuck..... I am trying to print the hours info from an XML file DeptHours.xml and the emplyee information from another XML file. Can anyone see what I'm doing wrong ? The employee info comes out fine, but only the Dept_Hours heading and no detail info for the department hours. The XSL file is below... Thank You in advance <?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" /> <xsl:variable name="hours" select="document('DeptHours.xml')"/> <xsl:param name="id"/> <xsl:template match="dataroot"> <HTML> <BODY> <TABLE BORDER="2"> <TR> <TD>Department Hours</TD> </TR> <xsl:for-each select="$hours[Dept_Num=$id]"> <TR> <TD><xsl:value-of select="Dept_Hours1"/></TD> <TD><xsl:value-of select="Dept_Hours2"/></TD> <TD><xsl:value-of select="Dept_Hours3"/></TD> <TD><xsl:value-of select="Dept_Hours4"/></TD> </TR> </xsl:for-each> </TABLE> <TABLE BORDER="2"> <TR> <TD>Department Number</TD> <TD>Department Name</TD> <TD>Department Phone</TD> </TR> <xsl:for-each select="DeptEmployees[Dept_Num=$id]"> <TR> <TD><xsl:value-of select="Dept_Num"/></TD> <TD><xsl:value-of select="Dept_Name"/></TD> <TD><xsl:value-of select="Dept_Phone"/></TD> <TD><xsl:value-of select="Employee_First_Name"/></TD> <TD><xsl:value-of select="Employee_Last_Name"/></TD> <TD><xsl:value-of select="Employee_Title"/></TD> </TR> </xsl:for-each> </TABLE> </BODY> </HTML> </xsl:template> </xsl:stylesheet> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Javascript browser detection , Richard Garcia | Thread | Re: [xsl] problem with multiple xml, Joerg Heinicke |
RE: [xsl] generate xsl 1.0 from 2.0, Michael Kay | Date | RE: [xsl] SETS comparison..?, Michael Kay |
Month |