Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="html" version="4.0" indent="yes"/>
- <xsl:preserve-space elements="*"/>
- <xsl:template match="/">
- <html>
- <head>
- <style>
- .sandwichBorder {
- background: #FF9933;
- height:4px;
- border-top: 1px solid black;
- border-bottom: 1px solid black;
- }
- .gradient {
- background: linear-gradient(10deg, #A73335, #FFFF99);
- height:5px;
- margin:7px 0px;
- }
- .name {
- font-size:225%;
- font-family:Georgia, serif;
- font-variant:small-caps;
- font-weight:bold;
- color:#A73335;
- }
- .description {
- font-style:italic;
- }
- .bold {
- font-weight:bold;
- }
- .red {
- color:#A73335;
- }
- table {
- width:100%;
- border:0px;
- border-collapse:collapse;
- color:#A73335;
- }
- th, td {
- width:50px;
- text-align:center;
- }
- .actions {
- font-size:175%;
- font-variant:small-caps;
- margin:17px 0px 0px 0px;
- }
- .hr {
- background: #A73335;
- height:2px;
- }
- .attack {
- margin:5px 0px;
- }
- .attackname {
- font-weight:bold;
- font-style:italic;
- }
- </style>
- </head>
- <body style="background: #FFFF99;">
- <xsl:for-each select="Monsters/Monster[@Include = 'True']">
- <div contenteditable="true" style="width:310px; font-family:Arial,Helvetica,sans-serif;font-size:11px;">
- <div class="sandwichBorder"></div>
- <div class="name"><xsl:value-of select="@Name" /></div>
- <div class="description"><xsl:value-of select="Size" /> <xsl:value-of select="Type" />, <xsl:value-of select="Alignment" /></div>
- <div class="gradient"></div>
- <div class="red">
- <div ><span class="bold red">Armor Class</span><span> <xsl:value-of select="AC" /></span></div>
- <div><span class="bold red">Hit Points</span> <span><xsl:value-of select="HP" /> (<xsl:value-of select="HD" />)</span></div>
- <div><span class="bold red">Speed</span> <span><xsl:value-of select="Speed" /></span></div>
- </div>
- <div class="gradient"></div>
- <table>
- <tr><th>STR</th><th>DEX</th><th>CON</th><th>INT</th><th>WIS</th><th>CHA</th></tr>
- <tr>
- <!-- <td><xsl:value-of select="STR/Value" /> (<xsl:value-of select="STR/Mod" />)</td> -->
- <td><xsl:value-of select="STR" /> (<xsl:value-of select="format-number(floor((STR - 10) div 2),'+#0;-#0')" />)</td>
- <td><xsl:value-of select="DEX" /> (<xsl:value-of select="format-number(floor((DEX - 10) div 2),'+#0;-#0')" />)</td>
- <td><xsl:value-of select="CON" /> (<xsl:value-of select="format-number(floor((CON - 10) div 2),'+#0;-#0')" />)</td>
- <td><xsl:value-of select="INT" /> (<xsl:value-of select="format-number(floor((INT - 10) div 2),'+#0;-#0')" />)</td>
- <td><xsl:value-of select="WIS" /> (<xsl:value-of select="format-number(floor((WIS - 10) div 2),'+#0;-#0')" />)</td>
- <td><xsl:value-of select="CHA" /> (<xsl:value-of select="format-number(floor((CHA - 10) div 2),'+#0;-#0')" />)</td>
- </tr>
- </table>
- <div class="gradient"></div>
- <xsl:for-each select="Detail">
- <div><span class="bold"><xsl:value-of select="@name" /></span> <span><xsl:value-of select="text()" /></span></div>
- </xsl:for-each>
- <div><span class="bold">Challenge</span> <span><xsl:value-of select="CR" /> (<xsl:value-of select="XP" /> XP)</span></div>
- <div class="gradient"></div>
- <xsl:for-each select="Abilities/Ability">
- <div class="attack"><span class="attackname"><xsl:value-of select="@name" /></span> <span><xsl:value-of select="text()" /></span></div>
- </xsl:for-each>
- <div class="actions red">Actions</div>
- <div class="hr"></div>
- <xsl:for-each select="Actions/Action">
- <div class="attack"><span class="attackname"><xsl:value-of select="Title" />.</span> <xsl:if test="Type != ''"><span class="description"><xsl:value-of select="Type" />:</span> </xsl:if><span><xsl:value-of select="Description" /></span> <xsl:if test="Hit != ''"><span class="description">Hit:</span> </xsl:if><span><xsl:value-of select="Hit" /></span></div>
- </xsl:for-each>
- <div class="sandwichBorder"></div>
- </div>
- <br />
- </xsl:for-each>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement