Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combining Doc Binding and XSL

Status
Not open for further replies.

webmissus

Technical User
Nov 10, 2003
1
US
The Datapagesize doesnot work on the Datafld in the code below. Can I use/combine xsl:apply-templates instead of a SPAN ?
- Newbie

Sample XSL:
<?xml version=&quot;1.0&quot;?>
<xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;<xsl:template match=&quot;/&quot;>
<HTML>
<HEAD>
<TITLE>Reports</TITLE>
</HEAD>
<BODY VLINK=&quot;#808080&quot; ALINK=&quot;#800080&quot; LINK=&quot;#008000&quot;>
<XML ID=&quot;dsoReports&quot; SRC=&quot;Reports.xml&quot;></XML>
<DIV ALIGN=&quot;CENTER&quot;>
<TABLE DATASRC=&quot;#dsoReports&quot; BORDER=&quot;1&quot;>
<TR><TD>
<xsl:apply-templates
select=&quot;Reports/Title&quot;>
</xsl:apply-templates>
</TD></TR>
<TR><TD>
<TABLE ID=&quot;ReportInfoTable&quot; DATAFLD=&quot;ReportInfo&quot; DATAPAGESIZE=&quot;2&quot; BORDER=&quot;1&quot; CELLPADDING=&quot;5&quot; WIDTH=&quot;100%&quot;>
<TR><TD>
<xsl:apply-templates select=&quot;Reports/ReportInfo&quot;>
</xsl:apply-templates>
</TD></TR>
</TABLE>
<HR></HR>
<BUTTON ONCLICK=&quot;ReportInfoTable.firstPage()&quot;>|&lt;First Page</BUTTON>
<BUTTON ONCLICK=&quot;ReportInfoTable.previousPage()&quot;>&lt;Previous Page</BUTTON>
<BUTTON ONCLICK=&quot;ReportInfoTable.nextPage()&quot;>Next Page &gt;</BUTTON>
<BUTTON ONCLICK=&quot;ReportInfoTable.lastPage()&quot;>Last Page &gt;</BUTTON>
</TD></TR>
</TABLE>
</DIV>
</BODY>
</HTML>
</xsl:template>
<xsl:template match=&quot;Reports/Title&quot;>
<TR><TD bgcolor=&quot;fuschia&quot; ALIGN=&quot;CENTER&quot;>
<SPAN STYLE=&quot;FONT-WEIGHT:BOLD;&quot;><xsl:value-of select=&quot;.&quot; /></SPAN>
</TD></TR>
</xsl:template>
<xsl:template match=&quot;Reports/ReportInfo[Period='Weekly']&quot;>
<TR><TD ALIGN=&quot;CENTER&quot;>
<SPAN STYLE=&quot;FONT-STYLE:ITALIC&quot;>Week Ending:
<A>
<xsl:attribute name=&quot;href&quot;>
<xsl:value-of select=&quot;DocName&quot; />
</xsl:attribute>
<xsl:value-of select=&quot;ReportName&quot; />
</A></SPAN></TD></TR>
</xsl:template>
<xsl:template match=&quot;Reports/ReportInfo[Period='Monthly']&quot;>
<TR><TD BGCOLOR=&quot;#COCOFF&quot; ALIGN=&quot;CENTER&quot;>
<SPAN STYLE=&quot;FONT-STYLE:ITALIC; FONT-WEIGHT:BOLD&quot;>Month Ending:
<A>
<xsl:attribute name=&quot;href&quot;>
<xsl:value-of select=&quot;DocName&quot; />
</xsl:attribute>
<xsl:value-of select=&quot;ReportName&quot; />
</A></SPAN></TD></TR>
</xsl:template>
</xsl:stylesheet>

Sample XML:
<?xml version=&quot;1.0&quot;?>
<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;Reports.xsl&quot;?>
<Reports>
<Title>Reports Title</Title>
<ReportInfo>
<DocName>Dec03.doc</DocName>
<ReportName>December 2003</ReportName>
<Period>Monthly</Period>
</ReportInfo>
<ReportInfo>
<DocName>Dec03.doc</DocName>
<ReportName>26 December 2003</ReportName>
<Period>Weekly</Period>
</ReportInfo>
<ReportInfo>
<DocName>Dec03.doc</DocName>
<ReportName>19 December 2003</ReportName>
<Period>Weekly</Period>
</ReportInfo>
<ReportInfo>
<DocName>Dec03.doc</DocName>
<ReportName>12 December 2003</ReportName>
<Period>Weekly</Period>
</ReportInfo>
<ReportInfo>
<DocName>Dec03.doc</DocName>
<ReportName>05 December 2003</ReportName>
<Period>Weekly</Period>
</ReportInfo>
</Reports>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top