|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








