[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

problem with multiple xml docs and 1 xsl sheet

Subject: 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
xml xsl sheet
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.