Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version="2.0">
- <xsl:output method="html" indent="yes"/>
- <xsl:template match="/">
- <xsl:result-document href="bomWebsite/index.html">
- <html>
- <head>
- <meta charset="UTF-8"/>
- <title>BOM</title>
- <link rel="stylesheet" href="w3.css"/>
- </head>
- <body>
- <div class="w3-container w3-padding">
- <div class="w3-row">
- <div class="w3-col m4 l3">
- <h3>Table of Contents</h3>
- <ul class="w3-ul">
- <li><a href="titlepage.html">Title Page</a></li>
- <li><a href="preface.html">Preface</a></li>
- <li>Books:<ul class="w3-ul w3-hoverable">
- <xsl:apply-templates select="//book"/>
- </ul></li>
- </ul>
- </div>
- <div class="w3-col m8 l9">
- <div class="w3-container">
- <h1><xsl:value-of select="tstmt/coverpg/title"/></h1>
- <h2><xsl:value-of select="tstmt/coverpg/title2"/></h2>
- <h3 class="w3-border">
- <xsl:for-each select="tstmt/coverpg/subtitle[1]/p">
- <p><xsl:value-of select="."/></p>
- </xsl:for-each>
- </h3>
- <h3 class="w3-border">
- <xsl:for-each select="tstmt/coverpg/subtitle[2]/p">
- <p><xsl:value-of select="."/></p>
- </xsl:for-each>
- </h3>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
- </xsl:result-document>
- <xsl:apply-templates select="//book" mode="páginas"/>
- </xsl:template>
- <xsl:template match="book">
- <li>
- <a href="book{count(preceding-sibling::book)+1}.html">
- <xsl:value-of select="bktshort"/>
- </a>
- </li>
- </xsl:template>
- <xsl:template match="book" mode="páginas">
- <xsl:result-document href="bomWebsite/book{count(preceding-sibling::book)+1}.html">
- <html>
- <head>
- <meta charset="UTF-8"/>
- <title>Book page</title>
- <link rel="stylesheet" href="w3.css"/>
- </head>
- <body>
- <div class="w3-container w3-padding">
- <a name="top"/>
- <div class="w3-row">
- <div class="w3-col m4 l3">
- <div class="w3-container">
- <h3><xsl:value-of select="bktshort"/> TOC</h3>
- <ul class="w3-ul w3-hoverable">
- <xsl:for-each select="chapter">
- <li>
- <a href="#{generate-id()}">
- <xsl:value-of select="chtitle"/>
- </a>
- </li>
- </xsl:for-each>
- </ul>
- <hr/>
- <div class="w3-panel w3-green">
- <h4 class="w3-opacity">
- <a href="index.html">
- Back to main page
- </a>
- </h4>
- </div>
- </div>
- </div>
- <div class="w3-col m8 l9">
- <h1><xsl:value-of select="bktlong"/></h1>
- <div class="w3-container w3-border">
- <xsl:for-each select="bksum/p">
- <p><xsl:value-of select="."/></p>
- </xsl:for-each>
- </div>
- <xsl:apply-templates select="chapter" mode="páginas"/>
- </div>
- </div>
- </div>
- </body>
- </html>
- </xsl:result-document>
- </xsl:template>
- <xsl:template match="chapter" mode="páginas">
- <div class="w3-card-4">
- <a name="{generate-id()}"/>
- <header class="w3-container w3-teal">
- <h1><xsl:value-of select="chtitle"/></h1>
- </header>
- <div class="w3-container">
- <div class="w3-container w3-border">
- <xsl:for-each select="chsum/p">
- <p><xsl:value-of select="."/></p>
- </xsl:for-each>
- </div>
- <xsl:for-each select="v">
- <p><xsl:value-of select="."/></p>
- </xsl:for-each>
- </div>
- <footer class="w3-container w3-teal">
- <address>End of chapter <xsl:value-of select="count(preceding-sibling::chapter)+1"/></address>
- <address><a href="#top">Back to top</a></address>
- </footer>
- </div>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment