The XSLT Layout Layer

Listing 9-5 shows an XSLT page generation and layout template.

Listing 9-5. An XSLT page generation and layout template
 1. <xsl:template match="topicMap"> 2. <xsl:for-each select="topic"> 3. <xsl:document href="concat($out-dir,@id,'.html')"> 4. <!--In Xalan: 5. <redirect:write select="concat($out-dir,@id,'.html')"--> 6. <html> 7. <header><style>{. . .}</style> 8. <title><xsl:template name="name"/></title> 9. </header> 10. <body> 11. <a href="default.html" class="h1"> 12. <xsl:call-template name="name"> 13. <xsl:with-param name="topic" select="$root"/> 14. </xsl:call-template> 15. </a> 16. <hr/> 17. <table width="800"><tr> 18. <td valign="top" width="200"> 19. <xsl:call-template name="sitemap"> 20. <xsl:with-param name="classRef" ...

Get XML Topic Maps: Creating and Using Topic Maps for the Web now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.