[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Separating layout and content
Hi, i have several types of documents that i want to display in HTML having the same overall layout. Doctype specific differences are kept in a doctype specific stylesheet. At the moment the following solution works: 1. The doctype specific stylesheet doctypeA.xsl calls <xsl:call-template name="doLayout"/> 2. doLayout is imported from layout.xsl and looks as follows: <xsl:template name="doLayout"> <!-- e.g. a rather simple snipet of site layout --> <table width="100%" cellpadding="3" class="TableRahmenkpl"> <tr valign="top"> <td class="TD"> <xsl:call-template name="navigation" /> <xsl:call-template name="head" /> <xsl:call-template name="title" /> <xsl:call-template name="text" /> </td> </tr> </table> </xsl:template> 3. Each of the doctype specifiy stylesheets holds the above templates implementing each part of the doctype specific output: <xsl:template name="navigation"> <!-- output the doctype specific navigation --> ... </xsl:template> <xsl:template name="head"> <!-- output the doctype specific head --> ... </xsl:template> <xsl:template name="title"> <!-- output the doctype specific title --> ... </xsl:template> <xsl:template name="text"> <!-- output the doctype specific text --> ... </xsl:template> I wonder whether there is a better way to do this. Any Ideas? Best regards, Thomas.
|
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
|