Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="ISO-8859-1"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/1999/xhtml">
- <xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
- doctype-system="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd" indent="yes"
- media-type="application/xhtml+xml" encoding="ISO-8859-1"/>
- <xsl:template match="/characters/character">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
- <head>
- <title>
- <xsl:value-of select="name"/>
- </title>
- <link rel="stylesheet" type="text/css" href="style.css"/>
- <style type="text/css">
- <xsl:text>
- *
- {
- overflow:auto;
- }
- body
- {
- max-width: 210mm;
- font-size: 9pt;
- font-family:sans-serif;
- }
- h3
- {
- margin: 0px;
- text-align: center;
- }
- h4
- {
- page-break-after: avoid;
- text-align: left;
- }
- table
- {
- border-spacing:0px;
- padding:0px;
- width: 99%;
- }
- table td
- {
- text-align: center;
- }
- table td:first-child
- {
- text-align: left;
- }
- td + td
- {
- padding-left: 5px;
- }
- ul,li {
- margin: 0em;
- padding: 0em;
- }
- .pagebox
- {
- border: 1px solid black;
- margin-bottom: 3px;
- page-break-inside: avoid;
- min-height: 285mm;
- }
- .container
- {
- border: 1px dashed black;
- margin-top: 2px;
- margin-bottom: 2px;
- width: 99%;
- }
- .multifloatleft
- {
- width: 99%;
- text-align: justify;
- overflow:hidden;
- }
- .multifloatleft > span
- {
- font-size: 1px ;
- width: 100%;
- }
- .multifloatleft > *
- {
- /*display: table-cell;*/
- display: inline-block;
- vertical-align: top;
- }
- .floatleft > *
- {
- width: 49% !important;
- float: right;
- }
- .floatleft > *:first-child
- {
- float: left;
- }
- #skillbox
- {
- column-count: 3;
- -moz-column-count: 3;
- }
- #qualities
- {
- width: auto; /*needs to be resized to fit into column*/
- }
- .t80-20 td
- {
- width: 20% !important;
- }
- .t80-20 td:first-child
- {
- width: 80% !important;
- }
- tr.specialization > td:first-child
- {
- font-style:italic;
- text-indent: 1em;
- }
- #defaultskills
- {
- column-width: auto;
- column-count: 4;
- }
- #defaultskills p,dir
- {
- margin-top: 0px;
- margin-bottom: 0px;
- }
- #rightofskills
- {
- width: 49%
- }
- .cm
- {
- padding-left:10px;
- padding-right: 10px;
- }
- #rightofskills > .cm
- {
- width: 32%;
- }
- #conditionmonitors .cm
- {
- width: 49%;
- }
- table#cm td
- {
- margin: 0px;
- padding: 0px;
- width: 1em;
- }
- #implants
- {
- width: 99%;
- }
- .stdtable > tr:first-child
- {
- font-variant: small-caps;
- page-break-after:avoid;
- break-after:avoid;
- }
- .stdtable tr > td
- {
- text-align: center;
- width:auto;
- }
- .stdtable tr > td:first-child
- {
- text-align: left;
- width: 50%;
- }
- .cmbox
- {
- float: left;
- margin: 1px;
- height: 1em;
- width: 1em;
- }
- #programs
- {
- column-count: 2;
- column-width: 49%;
- }
- h4
- {
- column-span: all;
- margin: 0px;
- }
- #gear
- {
- width: 99%;
- column-count: 3;
- column-gap: 1em;
- column-rule: 1px solid black;
- }
- #gear td:nth-child(1)
- {
- width: 55%;
- }
- #gear td:nth-child(2)
- {
- width: 20%;
- }
- #gear td:nth-child(3)
- {
- width: 25%;
- }
- #powers
- {
- column-count: 2;
- column-width: 49%;
- }
- .vehicle
- {
- width: 99%;
- border:1px solid black;
- display: inline-block;
- float: left;
- margin-left: 3px;
- }
- .vehiclestats
- {
- width: 35%;
- }
- .vehiclesensors
- {
- width: 24%;
- }
- .vehicleupgrades
- {
- width: 24%;
- }
- .vehiclecmblock
- {
- width: 15%;
- }
- </xsl:text>
- </style>
- </head>
- <body>
- <div class="pagebox">
- <h3>
- <xsl:value-of select="alias"/>
- </h3>
- <div class="floatleft">
- <xsl:call-template name="basicstats"/>
- <xsl:call-template name="identities"/>
- </div>
- <div id="skillbox">
- <xsl:call-template name="actskills"/>
- <xsl:call-template name="attribtests"/>
- <xsl:call-template name="qualities"/>
- </div>
- <xsl:call-template name="implants"/>
- <div class="floatleft">
- <xsl:call-template name="armour"/>
- <xsl:call-template name="monitors"/>
- </div>
- <xsl:call-template name="guns"/>
- <div class="floatleft">
- <xsl:call-template name="knives"/>
- <xsl:call-template name="ammo"/>
- </div>
- <xsl:call-template name="matrix"/>
- <xsl:call-template name="magic"/>
- <xsl:call-template name="gear"/>
- </div>
- <xsl:if test="count(vehicles/vehicle) > 0">
- <div class="pagebox">
- <xsl:call-template name="vehicles"/>
- </div>
- </xsl:if>
- </body>
- </html>
- </xsl:template>
- <xsl:template name="basicstats">
- <div id="basicstats">
- <div id="demographics">
- <xsl:if test="sex/text()">
- <xsl:value-of select="sex"/>
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:value-of select="metatype"/>
- </div>
- <div id="attribblock">
- <table>
- <tr>
- <td>Body</td>
- <td>
- <xsl:value-of select="attributes/attribute[name='BOD']/base"/>
- <xsl:if
- test="not(attributes/attribute[name='BOD']/base = attributes/attribute[name='BOD']/total)"
- > (<xsl:value-of select="attributes/attribute[name='BOD']/total"/>)
- </xsl:if>
- </td>
- <td>Charisma</td>
- <td>
- <xsl:value-of select="attributes/attribute[name='CHA']/base"/>
- <xsl:if
- test="not(attributes/attribute[name='CHA']/base = attributes/attribute[name='CHA']/total)"
- > (<xsl:value-of select="attributes/attribute[name='CHA']/total"/>)
- </xsl:if>
- </td>
- <td>Edge</td>
- <td>
- <xsl:call-template name="checkboxes">
- <xsl:with-param name="number"
- select="attributes/attribute[name='EDG']/total"/>
- </xsl:call-template>
- </td>
- </tr>
- <tr>
- <td>Agility</td>
- <td>
- <xsl:value-of select="attributes/attribute[name='AGI']/base"/>
- <xsl:if
- test="not(attributes/attribute[name='AGI']/base = attributes/attribute[name='AGI']/total)"
- > (<xsl:value-of select="attributes/attribute[name='AGI']/total"/>)
- </xsl:if>
- </td>
- <td>Intuition</td>
- <td>
- <xsl:value-of select="attributes/attribute[name='INT']/base"/>
- <xsl:if
- test="not(attributes/attribute[name='INT']/base = attributes/attribute[name='INT']/total)"
- > (<xsl:value-of select="attributes/attribute[name='INT']/total"/>)
- </xsl:if>
- </td>
- <td>Essence</td>
- <td>
- <xsl:value-of select="attributes/attribute[name='ESS']/base"/>
- </td>
- </tr>
- <tr>
- <td>Reaction</td>
- <td>
- <xsl:value-of select="attributes/attribute[name='REA']/base"/>
- <xsl:if
- test="not(attributes/attribute[name='REA']/base = attributes/attribute[name='REA']/total)"
- > (<xsl:value-of select="attributes/attribute[name='REA']/total"/>)
- </xsl:if>
- </td>
- <td>Logic</td>
- <td>
- <xsl:value-of select="attributes/attribute[name='LOG']/base"/>
- <xsl:if
- test="not(attributes/attribute[name='LOG']/base = attributes/attribute[name='LOG']/total)"
- > (<xsl:value-of select="attributes/attribute[name='LOG']/total"/>)
- </xsl:if>
- </td>
- <xsl:choose>
- <xsl:when test="/characters/character/magenabled = 'True'">
- <td>Magic</td>
- <td>
- <xsl:value-of select="attributes/attribute[name='MAG']/base"/>
- <xsl:if
- test="not(attributes/attribute[name='MAG']/base = attributes/attribute[name='MAG']/total)"
- > (<xsl:value-of
- select="attributes/attribute[name='STR']/total"/>)
- </xsl:if>
- </td>
- </xsl:when>
- <xsl:when test="/characters/character/resenabled = 'True'">
- <td>Resonance</td>
- <td>
- <xsl:value-of select="attributes/attribute[name='RES']/base"/>
- <xsl:if
- test="not(attributes/attribute[name='RES']/base = attributes/attribute[name='RES']/total)"
- > (<xsl:value-of
- select="attributes/attribute[name='RES']/total"/>)
- </xsl:if>
- </td>
- </xsl:when>
- <xsl:otherwise>
- <td>Initiative</td>
- <td>
- <xsl:value-of select="/characters/character/init/base"/>
- <xsl:if
- test="not(/characters/character/init/base = /characters/character/init/total)"
- > (<xsl:value-of select="/characters/character/init/total"
- />) </xsl:if> /<xsl:value-of
- select="/characters/character/ip/total"/> IP </td>
- </xsl:otherwise>
- </xsl:choose>
- </tr>
- <tr>
- <td>Strength</td>
- <td>
- <xsl:value-of select="attributes/attribute[name='STR']/base"/>
- <xsl:if
- test="not(attributes/attribute[name='STR']/base = attributes/attribute[name='STR']/total)"
- > (<xsl:value-of select="attributes/attribute[name='STR']/total"/>)
- </xsl:if>
- </td>
- <td>Willpower</td>
- <td>
- <xsl:value-of select="attributes/attribute[name='WIL']/base"/>
- <xsl:if
- test="not(attributes/attribute[name='WIL']/base = attributes/attribute[name='WIL']/total)"
- > (<xsl:value-of select="attributes/attribute[name='WIL']/total"/>)
- </xsl:if>
- </td>
- <xsl:if
- test="/characters/character/magenabled = 'True' or /characters/character/resenabled = 'True'">
- <td>Initiative</td>
- <td>
- <xsl:value-of select="/characters/character/init/base"/>
- <xsl:if
- test="not(/characters/character/init/base = /characters/character/init/total)"
- > (<xsl:value-of select="/characters/character/init/total"/>)
- </xsl:if> /<xsl:value-of select="/characters/character/ip/total"
- /> IP </td>
- </xsl:if>
- </tr>
- </table>
- </div>
- <xsl:choose>
- <xsl:when test="technomancer='True'">
- Technomancer (<xsl:value-of select="stream"/>, Fading <xsl:value-of select="drain"/>)
- </xsl:when>
- <xsl:when test="adept='True' and magician='False'">
- Adept. Mentor
- </xsl:when>
- <xsl:when test="adept='False' and magician='True'">
- Magician (<xsl:value-of select="tradition"/>, Drain <xsl:value-of select="drain"/>)
- </xsl:when>
- <xsl:when test="adept='True' and magician='True'">
- Mystic Adept (<xsl:value-of select="tradition"/>, Drain <xsl:value-of select="drain"/>)
- </xsl:when>
- </xsl:choose>
- </div>
- </xsl:template>
- <xsl:template name="identities">
- <div id="identities">
- <strong>Identities:</strong>
- <ul>
- <li>
- <xsl:if test="name/text()">
- <xsl:value-of select="name"/> (real) </xsl:if>
- <xsl:if test="not (name/text())">
- <b>REAL NAME UNKNOWN</b>
- </xsl:if>
- </li>
- <xsl:for-each select="gears/gear[name='Fake SIN']">
- <li>
- <xsl:value-of select="extra"/> (Rating <xsl:value-of select="rating"/>)
- <xsl:if test="children/gear[name='Fake License']"> Licenses:
- <xsl:for-each select="children/gear[name='Fake License']">
- <xsl:value-of select="extra"/> (Rating <xsl:value-of select="rating"
- />) </xsl:for-each>
- </xsl:if>
- </li>
- </xsl:for-each>
- </ul>
- </div>
- </xsl:template>
- <xsl:template name="actskills">
- <h4>Skills</h4>
- <xsl:for-each select="skills/skill[knowledge = 'False' and (rating + ratingmod) > 0]">
- <xsl:sort select="rating" order="descending"/>
- <table class="t80-20">
- <tr>
- <td>
- <xsl:value-of select="name"/>
- </td>
- <td>
- <xsl:value-of select="rating + ratingmod"/>
- </td>
- </tr>
- <xsl:if test="spec/text()">
- <xsl:variable name="temp1" select="rating + 2"/>
- <tr class="specialization">
- <td>
- <xsl:value-of select="spec"/>
- </td>
- <td>
- <xsl:value-of select="$temp1"/>
- </td>
- </tr>
- </xsl:if>
- </table>
- </xsl:for-each>
- <table>
- <tr>
- <td>
- <strong>Knowledge Skills</strong>
- </td>
- </tr>
- </table>
- <xsl:for-each select="skills/skill[skillcategory = 'Language']">
- <table class="t80-20">
- <tr>
- <td>
- <xsl:value-of select="name"/>
- </td>
- <xsl:choose>
- <xsl:when test="rating = 0">
- <td>N</td>
- </xsl:when>
- <xsl:otherwise>
- <td>
- <xsl:value-of select="rating + ratingmod"/>
- </td>
- </xsl:otherwise>
- </xsl:choose>
- </tr>
- <xsl:if test="spec/text()">
- <xsl:variable name="temp1" select="rating + 2"/>
- <tr class="specialization">
- <td>
- <xsl:value-of select="spec"/>
- </td>
- <td>
- <xsl:value-of select="$temp1"/>
- </td>
- </tr>
- </xsl:if>
- </table>
- </xsl:for-each>
- <xsl:for-each select="skills/skill[(knowledge = 'True') and (skillcategory != 'Language')]">
- <xsl:sort select="rating" order="descending"/>
- <table class="t80-20">
- <tr>
- <td>
- <xsl:value-of select="name"/>
- </td>
- <td>
- <xsl:value-of select="rating + ratingmod"/>
- </td>
- </tr>
- <xsl:if test="spec/text()">
- <xsl:variable name="temp1" select="rating + 2"/>
- <tr class="specialization">
- <td>
- <xsl:value-of select="spec"/>
- </td>
- <td>
- <xsl:value-of select="$temp1"/>
- </td>
- </tr>
- </xsl:if>
- </table>
- </xsl:for-each>
- </xsl:template>
- <xsl:template name="attribtests">
- <strong>Attribute Tests</strong>
- <table class="t80-20">
- <tr>
- <td>Composure</td>
- <td>
- <xsl:value-of select="composure"/>
- </td>
- </tr>
- </table>
- <table class="t80-20">
- <tr>
- <td>Judge Intentions</td>
- <td>
- <xsl:value-of select="judgeintentions"/>
- </td>
- </tr>
- </table>
- <table class="t80-20">
- <tr>
- <td>Lift/Carry</td>
- <td>
- <xsl:value-of select="liftandcarry"/>
- </td>
- </tr>
- </table>
- <table class="t80-20">
- <tr>
- <td>Lift/Carry Weight</td>
- <td>
- <xsl:value-of select="liftweight"/> kg </td>
- </tr>
- </table>
- <table class="t80-20">
- <tr>
- <td>Memory</td>
- <td>
- <xsl:value-of select="memory"/>
- </td>
- </tr>
- </table>
- </xsl:template>
- <xsl:template name="qualities">
- <div id="qualities" class="container">
- <strong>Qualities</strong>
- <table class="stdtable">
- <tr>
- <td>Name</td>
- <td>BP</td>
- <td>Book</td>
- </tr>
- <xsl:for-each select="qualities/quality[qualitytype = 'Positive']">
- <xsl:sort select="bp" data-type="number" order="descending"/>
- <tr>
- <td>
- <xsl:call-template name="printname"/>
- </td>
- <td>
- <xsl:value-of select="bp"/>
- </td>
- <td>
- <xsl:call-template name="printsource"/>
- </td>
- </tr>
- </xsl:for-each>
- <!-- </table>
- <table>-->
- <xsl:for-each select="qualities/quality[qualitytype = 'Negative']">
- <xsl:sort select="bp" data-type="number" order="ascending"/>
- <tr>
- <td>
- <xsl:value-of select="name"/>
- <xsl:if test="extra/text()">
- <xsl:text> – </xsl:text>
- <xsl:value-of select="extra"/>
- </xsl:if>
- </td>
- <td>
- <xsl:value-of select="bp"/>
- </td>
- <td>
- <xsl:call-template name="printsource"/>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </div>
- </xsl:template>
- <xsl:template name="implants">
- <div id="implants" class="container">
- <strong>Implants</strong>
- <table class="stdtable">
- <tr>
- <td>Name</td>
- <td>Rtg</td>
- <td>Grade</td>
- <td>Ess</td>
- <td>Book</td>
- </tr>
- <xsl:for-each select="cyberwares/cyberware">
- <tr>
- <td>
- <xsl:value-of select="location"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="name"/>
- <br/>
- <small>
- <xsl:for-each select="children/cyberware">
- <xsl:value-of select="name"/>
- <xsl:if test="rating > 0"> (R. <xsl:value-of select="rating"
- />) </xsl:if>
- <xsl:if test="following-sibling::cyberware">
- <xsl:text>, </xsl:text>
- </xsl:if>
- </xsl:for-each>
- </small>
- </td>
- <td>
- <xsl:choose>
- <xsl:when test="maxrating > 0">
- <xsl:value-of select="rating"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>—</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- <td>
- <xsl:value-of select="grade"/>
- </td>
- <td>
- <xsl:value-of select="ess"/>
- </td>
- <td>
- <xsl:call-template name="printsource"/>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </div>
- </xsl:template>
- <xsl:template name="armour">
- <div class="container" id="armour">
- <h4>Armor</h4>
- <strong>TOTAL: </strong><xsl:value-of select="armorb"/> / <xsl:value-of select="armori"/> <strong>Soak Bonus: </strong><xsl:call-template name="soakbonus"/>
- <table class="stdtable">
- <tr>
- <td>Name</td>
- <td>B/I</td>
- <td>Equipped</td>
- </tr>
- <xsl:for-each select="armors/armor">
- <tr>
- <td>
- <xsl:call-template name="printname"/>
- <br/>
- <small>
- <xsl:call-template name="printspecific">
- <xsl:with-param name="nodelist" select="armormods/armormod"/>
- </xsl:call-template>
- </small>
- </td>
- <td><xsl:value-of select="b"/>/<xsl:value-of select="i"/></td>
- <td>
- <xsl:if test="equipped = 'True'"> ☓ </xsl:if>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </div>
- </xsl:template>
- <xsl:template name="soakbonus">
- <xsl:choose>
- <xsl:when test="cyberwares/cyberware[name = 'Bone Lacing (Aluminium)']"> 2 </xsl:when>
- <xsl:when test="cyberwares/cyberware[name = 'Bone Lacing (Titanium)']"> 3 </xsl:when>
- <xsl:when test="cyberwares/cyberware[name = 'Bone Lacing (Plastic)']"> 1 </xsl:when>
- <xsl:when test="cyberwares/cyberware[name = 'Bone Lacing (Ceramic)']"> 2 </xsl:when>
- <xsl:when test="cyberwares/cyberware[name = 'Bone Lacing (Kevlar)']"> 1 </xsl:when>
- <xsl:when test="cyberwares/cyberware[name = 'Bone Density Agumentation']">
- <xsl:value-of select="rating"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>–</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="monitors">
- <div id="monitors" class="container">
- <div class="multifloatleft">
- <div class="cm">
- <strong>Physical</strong>
- <br/>
- <xsl:call-template name="printcm">
- <xsl:with-param name="number"
- select="physicalcm[name(..) = 'character']"/>
- </xsl:call-template>
- </div>
- <div class="cm">
- <strong>Overflow</strong>
- <br/>
- <xsl:call-template name="checkboxes">
- <xsl:with-param name="number"
- select="/characters/character/attributes/attribute[name = 'BOD']/total"
- />
- </xsl:call-template>
- </div>
- <div class="cm">
- <b>Stun</b>
- <br/>
- <xsl:call-template name="printcm">
- <xsl:with-param name="number" select="stuncm"/>
- </xsl:call-template>
- </div>
- <span> </span> <!-- Dirty CSS hack -->
- </div>
- </div>
- </xsl:template>
- <xsl:template name="knives">
- <div id="knives" class="container">
- <h4>Melee Weapons</h4>
- <table class="stdtable">
- <tr>
- <td>Weapon</td>
- <td>Dmg</td>
- <td>AP</td>
- <td>Reach</td>
- <td>Book</td>
- </tr>
- <xsl:for-each select="weapons/weapon[type='Melee']">
- <tr>
- <td>
- <xsl:call-template name="printname"/>
- </td>
- <td>
- <xsl:value-of select="damage"/>
- </td>
- <td>
- <xsl:value-of select="ap"/>
- </td>
- <td>
- <xsl:value-of select="reach"/>
- </td>
- <td>
- <xsl:call-template name="printsource"/>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </div>
- </xsl:template>
- <xsl:template name="ammo">
- <div id="ammo" class="container">
- <h4>Ammunition</h4>
- <table class="stdtable">
- <tr>
- <td>Name</td>
- <td>Qty</td>
- <td>Dmg</td>
- <td>AP</td>
- <td>Book</td>
- </tr>
- <xsl:for-each
- select="gears/gear[category='Ammunition'] | gears/gear[category='Explosives'] | gears/gear[category='Arrowheads']">
- <tr>
- <td>
- <xsl:call-template name="printname_noqty"/>
- </td>
- <td>
- <xsl:value-of select="qty"/>
- </td>
- <td>
- <xsl:value-of select="weaponbonusdamage"/>
- </td>
- <td>
- <xsl:value-of select="weaponbonusap"/>
- </td>
- <td>
- <xsl:call-template name="printsource"/>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </div>
- </xsl:template>
- <xsl:template name="guns">
- <div name="guns" class="container">
- <h4>Ranged Weapons</h4>
- <xsl:call-template name="printguns"/>
- </div>
- </xsl:template>
- <xsl:template name="printguns">
- <table class="stdtable">
- <tr>
- <td>Weapon</td>
- <td>Dmg</td>
- <td>AP</td>
- <td>Mode</td>
- <td>RC</td>
- <td>Ammo</td>
- <td>Book</td>
- </tr>
- <xsl:for-each
- select="weapons/weapon[type='Ranged' and not(starts-with(name,'Grenade:'))]">
- <tr>
- <td>
- <xsl:call-template name="printname"/>
- <br/>
- <small>
- <xsl:call-template name="printspecific">
- <xsl:with-param name="nodelist"
- select="mods/weaponmod | accessories/accessory | underbarrel/*"/>
- </xsl:call-template>
- </small>
- </td>
- <td>
- <xsl:value-of select="damage"/>
- </td>
- <td>
- <xsl:value-of select="ap"/>
- </td>
- <td>
- <xsl:value-of select="mode"/>
- </td>
- <td>
- <xsl:value-of select="rc"/>
- </td>
- <td>
- <xsl:value-of select="ammo"/>
- </td>
- <td>
- <xsl:call-template name="printsource"/>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </xsl:template>
- <xsl:template name="matrix">
- <div class="floatleft">
- <div id="matrixgear" class="container">
- <h4>Matrix Gear</h4>
- <table class="stdtable">
- <tr>
- <td>Name</td>
- <td>Resp.</td>
- <td>FW</td>
- <td>Sys.</td>
- <td>Sig.</td>
- </tr>
- <xsl:for-each select="gears/gear[category='Commlink']">
- <tr>
- <td>
- <xsl:call-template name="printname" />
- <br/>
- <small><xsl:call-template name="printchildren"/></small>
- </td>
- <td>
- <xsl:value-of select="response"/>
- </td>
- <td>
- <xsl:value-of select="firewall"/>
- </td>
- <td>
- <xsl:value-of select="system"/>
- </td>
- <td>
- <xsl:value-of select="signal"/>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </div>
- <div id="programs" class="container">
- <h4>Programs</h4>
- <table class="stdtable t80-20">
- <tr>
- <td>Program</td>
- <td>Rtg.</td>
- </tr>
- </table>
- <xsl:for-each
- select="gears/gear[category='Matrix Programs'] | techprograms/techprogram | gears/gear[category='Program Packages']/children/gear">
- <table class="t80-20">
- <tr>
- <td>
- <xsl:call-template name="printname" >
- <xsl:with-param name="rtg">False</xsl:with-param>
- <xsl:with-param name="qty">False</xsl:with-param>
- </xsl:call-template>
- <xsl:if test="name() = 'techprogram'"> (CF) </xsl:if>
- <br/>
- <small><xsl:call-template name="printchildren"/></small>
- </td>
- <td>
- <xsl:value-of select="rating"/>
- </td>
- </tr>
- </table>
- </xsl:for-each>
- </div>
- </div>
- </xsl:template>
- <xsl:template name="magic">
- <xsl:if test="magician='True' or adept='True'">
- <div id="magic" class="container">
- <xsl:if test="magician='True'">
- <h4>Spells</h4>
- <table class="stdtable">
- <tr>
- <td>Name</td>
- <td>Damage</td>
- <td>Type</td>
- <td>Range</td>
- <td>Drain</td>
- <td>Book</td>
- </tr>
- <xsl:for-each select="spells/spell">
- <tr>
- <td>
- <xsl:call-template name="printname" />
- </td>
- <td><xsl:value-of select="damage"/></td>
- <td><xsl:value-of select="type"/></td>
- <td><xsl:value-of select="range"/></td>
- <td><xsl:value-of select="dv"/></td>
- <td>
- <xsl:call-template name="printsource"/>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </xsl:if>
- <xsl:if test="adept='True'">
- <div id="powers">
- <h4>Adept Powers</h4>
- <table class="stdtable t80-20">
- <tr>
- <td>Name</td>
- <td>Book</td>
- </tr>
- </table>
- <xsl:for-each select="powers/power">
- <table class="t80-20">
- <tr>
- <td>
- <xsl:call-template name="printname" />
- </td>
- <td>
- <xsl:call-template name="printsource"/>
- </td>
- </tr>
- </table>
- </xsl:for-each>
- </div>
- </xsl:if>
- </div>
- </xsl:if>
- </xsl:template>
- <xsl:template name="gear">
- <div id="gear" class="container">
- <table class="stdtable">
- <tr>
- <td>Name</td>
- <td>Qty</td>
- <td>Book</td>
- </tr>
- </table>
- <xsl:for-each
- select="gears/gear[not(
- category='Ammunition' or
- category='Program Packages' or
- category='Arrowheads' or
- category='Commlink' or
- category='Matrix Programs' or
- name='Fake SIN' )] ">
- <table>
- <tr>
- <td>
- <xsl:call-template name="printname_noqty"/>
- <br/>
- <small><xsl:call-template name="printchildren" /></small>
- </td>
- <td>
- <xsl:value-of select="qty"/>
- </td>
- <td>
- <xsl:call-template name="printsource"/>
- </td>
- </tr>
- </table>
- </xsl:for-each>
- </div>
- </xsl:template>
- <xsl:template name="checkboxes">
- <xsl:param name="number"/>
- <svg:svg xmlns:svg="http://www.w3.org/2000/svg" version="1.1" class="cmbox" width="12"
- height="12">
- <svg:rect width="10" height="10" x="1" y="1" style="fill:none;stroke:black"/>
- </svg:svg>
- <xsl:variable name="next" select="$number - 1"/>
- <xsl:if test="$next > 0">
- <xsl:call-template name="checkboxes">
- <xsl:with-param name="number" select="$next"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template name="printcm">
- <xsl:param name="number"/>
- <div class="cmrow">
- <xsl:choose>
- <xsl:when test="$number >= 3">
- <xsl:call-template name="checkboxes">
- <xsl:with-param name="number">3</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="checkboxes">
- <xsl:with-param name="number" select="$number"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- <!-- Prepare next iteration -->
- <xsl:variable name="next" select="$number - 3"/>
- <xsl:if test="$next > 0">
- <xsl:call-template name="printcm">
- <xsl:with-param name="number" select="$next"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <!--
- <xsl:template name="cmrow">
- <xsl:param name="counter"/>
- ☐ 
- <xsl:variable name="next" select="$counter - 1"/>
- <xsl:if test="$next > 0">
- <xsl:call-template name="cmrow">
- <xsl:with-param name="counter" select="$next"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- -->
- <xsl:template name ="vehiclestats">
- <div class="vehiclestats container">
- <table>
- <tr>
- <td>Pilot</td>
- <td><xsl:value-of select="pilot"/></td>
- <td>Hand.</td>
- <td><xsl:value-of select="handling"/></td>
- <td>Acc.</td>
- <td><xsl:value-of select="accel"/></td>
- <td>Speed</td>
- <td><xsl:value-of select="speed"/></td>
- </tr>
- <tr>
- <td>Response</td>
- <td><xsl:value-of select="response"/></td>
- <td>System</td>
- <td><xsl:value-of select="system"/></td>
- <td>FW.</td>
- <td><xsl:value-of select="firewall"/></td>
- <td>Signal</td>
- <td><xsl:value-of select="signal"/></td>
- </tr>
- </table>
- <br/>
- <xsl:variable name="software" select="gears/gear[category='Autosofts'] | gears/gear[category='Matrix Programs']" />
- <xsl:if test="boolean($software)">
- <strong>Software: </strong>
- <xsl:call-template name="printspecific" >
- <xsl:with-param name="nodelist"
- select="$software"/>
- </xsl:call-template>
- <br/>
- </xsl:if>
- </div>
- </xsl:template>
- <xsl:template name="vehiclesensors">
- <div class="vehiclesensors container">
- <strong>
- <xsl:value-of select="gears/gear[category='Sensors']/name"/>
- </strong>
- <xsl:text> R. </xsl:text><xsl:value-of select="sensor"/>
- <xsl:text>, Signal </xsl:text><xsl:value-of select="sensorsignal"/>
- <xsl:text>(</xsl:text>
- <xsl:call-template name="printsignalrange"><xsl:with-param name="signal" select="sensorsignal"/></xsl:call-template>
- <xsl:text>)</xsl:text>
- <br/>
- <table class="stdtable t80-20">
- <tr>
- <td>Sensor</td>
- <td>Rating</td>
- </tr>
- <xsl:for-each select="gears/gear[category='Sensors']/children/gear">
- <tr>
- <td>
- <xsl:value-of select="name"/>
- <xsl:if test="count(children/gear) > 0">
- <br/>
- <small>
- <xsl:call-template name="printspecific">
- <xsl:with-param name="nodelist"
- select="children/gear"/>
- </xsl:call-template>
- </small>
- </xsl:if>
- </td>
- <td>
- <xsl:value-of select="rating"/>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </div>
- </xsl:template>
- <xsl:template name="vehicleguns">
- <xsl:if test="mods/mod[starts-with(name,'Weapon Mount')]">
- <div id="vehicleguns">
- <b>Weapon Mounts</b>
- <ul>
- <xsl:for-each
- select="mods/mod[starts-with(name,'Weapon Mount')]">
- <li>
- <xsl:value-of
- select="substring-before(substring-after(name,'('),')')"/>
- <br/>
- <xsl:call-template name="printguns"/>
- </li>
- </xsl:for-each>
- </ul>
- </div>
- </xsl:if>
- </xsl:template>
- <xsl:template name="vehicleupgrades">
- <div class="vehicleupgrades container">
- <strong>Mods</strong>
- <table class="stdtable t80-20">
- <tr>
- <td>Name</td>
- <td>Slots</td>
- </tr>
- <xsl:for-each select="mods/mod[not(starts-with(name,'Weapon Mount'))]">
- <tr>
- <td>
- <xsl:call-template name="printname_noqty"/>
- </td>
- <td>
- <xsl:choose>
- <xsl:when test="included = 'True'">
- <xsl:text>Std.</xsl:text>
- </xsl:when>
- <xsl:when test="included = 'False'">
- <xsl:value-of select="slots"/>
- </xsl:when>
- </xsl:choose>
- </td>
- </tr>
- </xsl:for-each>
- </table>
- </div>
- </xsl:template>
- <xsl:template name="vehicles">
- <div id="vehicles">
- <xsl:for-each select="vehicles/vehicle">
- <div class="container vehicle">
- <b><xsl:value-of select="name"/></b>
- <br/>
- <div class="multifloatleft">
- <xsl:call-template name="vehiclestats" />
- <div class="vehiclecmblock container">
- <table>
- <tr>
- <td>Body</td>
- <td><xsl:value-of select="body"/></td>
- <td>Armor</td>
- <td><xsl:value-of select="armor"/></td>
- </tr>
- </table>
- <div class="cm">
- <xsl:call-template name="printcm">
- <xsl:with-param name="number" select="physicalcm"/>
- </xsl:call-template>
- </div>
- </div>
- <xsl:call-template name="vehicleupgrades" />
- <xsl:call-template name="vehiclesensors" />
- </div>
- <xsl:call-template name="vehicleguns" />
- </div>
- </xsl:for-each>
- </div>
- </xsl:template>
- <xsl:template name="printsignalrange">
- <xsl:param name="signal"/>
- <xsl:choose>
- <xsl:when test="$signal=0">
- <xsl:text>3 m</xsl:text>
- </xsl:when>
- <xsl:when test="$signal=1">
- <xsl:text>40 m</xsl:text>
- </xsl:when>
- <xsl:when test="$signal=2">
- <xsl:text>100 m</xsl:text>
- </xsl:when>
- <xsl:when test="$signal=3">
- <xsl:text>400 m</xsl:text>
- </xsl:when>
- <xsl:when test="$signal=4">
- <xsl:text>1 km</xsl:text>
- </xsl:when>
- <xsl:when test="$signal=5">
- <xsl:text>4 km</xsl:text>
- </xsl:when>
- <xsl:when test="$signal=6">
- <xsl:text>10 km</xsl:text>
- </xsl:when>
- <xsl:when test="$signal=7">
- <xsl:text>40 km</xsl:text>
- </xsl:when>
- <xsl:when test="$signal=8">
- <xsl:text>100 km</xsl:text>
- </xsl:when>
- <xsl:when test="$signal=9">
- <xsl:text>400 km</xsl:text>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="printsource">
- <small><i><xsl:value-of select="source"/></i>, <xsl:value-of select="page"/></small>
- </xsl:template>
- <xsl:template name="printval">
- <xsl:param name="val"/>
- <xsl:choose>
- <xsl:when test="$val = '' or $val = '-'">–</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$val"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="printname">
- <xsl:param name="rtg"/>
- <xsl:param name="qty"/>
- <xsl:if test="qty > 1 and $qty != 'False'">
- <xsl:value-of select="qty"/> * </xsl:if>
- <xsl:choose>
- <!-- Clean name of prefixes like "Ammo:" -->
- <xsl:when test="starts-with(name,'Ammo: ')">
- <xsl:value-of select="substring-after(name, 'Ammo: ')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="name"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="extra/text()"> (<xsl:value-of select="extra"/>) </xsl:if>
- <xsl:if test="rating > 0 and $rtg != 'False'"> R. <xsl:value-of select="rating"/>
- </xsl:if>
- </xsl:template>
- <xsl:template name="printname_noqty">
- <xsl:call-template name="printname">
- <xsl:with-param name="qty">False</xsl:with-param>
- </xsl:call-template>
- </xsl:template>
- <xsl:template name="printchildren">
- <xsl:call-template name="printspecific">
- <xsl:with-param name="nodelist" select="children/*"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template name="printspecific">
- <xsl:param name="nodelist"/>
- <xsl:for-each select="$nodelist">
- <xsl:if test="qty > 1">
- <xsl:value-of select="qty"/>x </xsl:if>
- <xsl:value-of select="name"/>
- <xsl:if test="rating > 0">
- <xsl:text> </xsl:text>
- <xsl:value-of select="rating"/>
- </xsl:if>
- <xsl:if test="position() < count($nodelist)">
- <xsl:text>; </xsl:text>
- </xsl:if>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="text()|@*"/>
- </xsl:stylesheet>
Add Comment
Please, Sign In to add comment