This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

line feed problem



I am reading an XML document and the line breaks and white spaces that were
there are not being processed by my XSL sheet.  Below is my XSL sheet, does
anyone have any idea why they are not showing up, or how I preserve them ?
The element in question is Dept_Hours, it appears as one long string instead
of the proper line breaks..

Thank You in advance

SAMPLE OF XML ELEMENT

<Dept_Hours>Monday  - Thursday        8:00am  to  4:00pm
Friday                              9:00am  to  12:00pm
Tuesday Evening            6:30pm  to  8:30pm
Call for exact times for accountant</Dept_Hours>

XSL SHEET
<?xml version="1.0"  ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html" />
<xsl:param name="id"/>
  <xsl:template match="dataroot">

           <HTML>
           <BODY>
 <TABLE BORDER="2">
             <TR>
               <TD>Department Hours</TD>

             </TR>

             <TR>
                 <TD><xsl:value-of
select="DeptEmployees[Dept_Num=$id]/Dept_Hours"/></TD>

             </TR>
</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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]