[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Advise on xsl usage producing very complex html
> the question is: Ah. Ok well in that case I think I'd go with Mike Kay's suggestion. Specifically if you can arrange that each of your large chunks is a well formed XML fragment with as many </xxx> as <xxx> you can stick them in separate documents such as big-chunk-of table-head.xml big-chunk-of-table-foot.xml big-chunk-of-html-head.xml Then your stylesheet looks something like this <xsl:stylesheet....> <xsl:variable name="html-head" select="document('big-chunk-of-html-head.xml')"/> <xsl:variable name="table-head" select="document('big-chunk-of-table-head.xml')"/> <xsl:variable name="table-foot" select="document('big-chunk-of-table-foot.xml')"/> <xsl:template match="/"> <html> <!-- the <head> eleemnt pulled in from file --> <xsl:copy-of select="$html-head"/> <body> <xsl:templates/> </body> </html> <!-- the <head> eleemnt pulled in from file --> <xsl:copy-of select="$html-head"/> </xsl:template> <xsl:template match="input-table-element"> <table> <!-- the <thead> eleemnt pulled in from file --> <xsl:copy-of select="$table-head"/> <!-- the <tfoot> eleemnt pulled in from file --> <xsl:copy-of select="$table-foot"/> <tbody> <xsl:templates/> </tbody> </table> </xsl:template> </xsl:stylesheet> Note thatthis way whoever is writing the "templates" for the table head and foot need only write (X)HTML code, and not any XSL syntax at all. David 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
|