Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--
- ====================================
- ====================================
- TEMPLATE - SKILLS TABLE
- ====================================
- ====================================-->
- <xsl:template match="skills">
- <xsl:param name="first_skill" select="0"/>
- <xsl:param name="last_skill" select="0"/>
- <xsl:param name="column_width" select="0.55 * $pagePrintableWidth"/>
- <!-- begin skills table -->
- <xsl:if test="count(skill) >= $first_skill">
- <xsl:variable name="columns">
- <fo:table-column column-width="4mm"/>
- <fo:table-column>
- <xsl:attribute name="column-width"><xsl:value-of select="$column_width - 42" />mm</xsl:attribute>
- </fo:table-column>
- <fo:table-column column-width="1mm"/>
- <fo:table-column column-width="1mm"/>
- <fo:table-column column-width="6mm"/>
- <fo:table-column column-width="1mm"/>
- <fo:table-column column-width="1mm"/>
- <fo:table-column column-width="6mm"/>
- <fo:table-column column-width="1mm"/>
- <fo:table-column column-width="1mm"/>
- <fo:table-column column-width="5mm"/>
- <fo:table-column column-width="1mm"/>
- <fo:table-column column-width="1mm"/>
- <fo:table-column column-width="5mm"/>
- <fo:table-column column-width="1mm"/>
- <fo:table-column column-width="1mm"/>
- <fo:table-column column-width="6mm"/>
- </xsl:variable>
- <fo:table table-layout="fixed" border-collapse="collapse" padding="0.5pt">
- <xsl:call-template name="attrib"><xsl:with-param name="attribute" select="'skills.border'"/></xsl:call-template>
- <xsl:copy-of select="$columns"/>
- <fo:table-body>
- <fo:table-row height="2pt">
- <fo:table-cell/>
- </fo:table-row>
- <fo:table-row>
- <xsl:call-template name="attrib"><xsl:with-param name="attribute" select="'skills.header'"/></xsl:call-template>
- <fo:table-cell></fo:table-cell>
- <fo:table-cell number-columns-spanned="2" border-top-width="1pt" border-left-width="0pt" border-right-width="0pt" border-bottom-width="0pt">
- <fo:block text-align="left" space-before.optimum="4pt" line-height="4pt" font-size="5pt">
- <xsl:text>TOTAL SKILLPOINTS: </xsl:text>
- <xsl:choose>
- <xsl:when test="skillpoints/eclipse_total > 0">
- <xsl:value-of select="skillpoints/eclipse_total"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="skillpoints/total"/>
- <xsl:if test="skillpoints/unused > 0">
- <xsl:text> (UNUSED: </xsl:text>
- <xsl:value-of select="skillpoints/unused"/>
- <xsl:text>)</xsl:text>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
- </fo:block>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="4">
- <fo:block text-align="end" line-height="10pt" font-weight="bold" font-size="10pt">SKILLS</fo:block>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="10">
- <fo:block text-align="end" space-before.optimum="4pt" line-height="4pt" font-size="5pt">
- <xsl:text>MAX RANKS: </xsl:text>
- <xsl:value-of select="max_class_skill_level"/>/<xsl:value-of select="max_cross_class_skill_level"/>
- </fo:block>
- </fo:table-cell>
- </fo:table-row>
- <fo:table-row>
- <xsl:call-template name="attrib"><xsl:with-param name="attribute" select="'skills.header'"/></xsl:call-template>
- <fo:table-cell></fo:table-cell>
- <fo:table-cell number-columns-spanned="2">
- <fo:block font-weight="bold" font-size="8pt">
- SKILL NAME
- </fo:block>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="3">
- <fo:block font-size="3pt">
- KEY ABILITY
- </fo:block>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="3">
- <fo:block text-align="center" font-size="3pt">
- SKILL MODIFIER
- </fo:block>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="3">
- <fo:block text-align="center" font-size="3pt">
- ABILITY MODIFIER
- </fo:block>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="3">
- <fo:block text-align="center" font-size="3pt">
- RANKS
- </fo:block>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="2">
- <fo:block text-align="center" font-size="3pt">
- MISC MODIFIER
- </fo:block>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-body>
- </fo:table>
- <fo:table table-layout="fixed" border-collapse="collapse" padding="0.5pt">
- <xsl:call-template name="attrib"><xsl:with-param name="attribute" select="'skills.border'"/></xsl:call-template>
- <xsl:copy-of select="$columns"/>
- <fo:table-body>
- <xsl:for-each select="skill">
- <xsl:if test="position() >= $first_skill and position() <= $last_skill">
- <xsl:variable name="shade">
- <xsl:choose>
- <xsl:when test="position() mod 2 = 0">darkline</xsl:when>
- <xsl:otherwise>lightline</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <fo:table-row>
- <xsl:call-template name="attrib"><xsl:with-param name="attribute" select="concat('skills.', $shade)"/></xsl:call-template>
- <fo:table-cell>
- <fo:block font-size="6pt" font-family="ZapfDingbats">
- <xsl:if test="translate( substring(untrained,1,1), 'Y', 'y')='y'">
- ✓
- </xsl:if>
- <xsl:if test="translate( substring(exclusive,1,1), 'Y', 'y')='y'">
- ✗
- </xsl:if>
- </fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <xsl:choose>
- <!--> <xsl:when test="string-length(name) < 40">-->
- <xsl:when test="not(contains(type, 'SkillUse')) and string-length(name) < 40">
- <fo:block space-before.optimum="1pt" font-size="7pt">
- <xsl:value-of select="name"/>
- </fo:block>
- </xsl:when>
- <xsl:when test="contains(type, 'SkillUse') and string-length(name) < 40">
- <fo:block space-before.optimum="1pt" font-size="7pt" font-style="italic">
- <xsl:value-of select="name"/>
- </fo:block>
- </xsl:when>
- <xsl:when test="not(contains(type, 'SkillUse')) and string-length(name) < 45">
- <fo:block space-before.optimum="1pt" font-size="6pt">
- <xsl:value-of select="name"/>
- </fo:block>
- </xsl:when>
- <xsl:when test="contains(type, 'SkillUse') and string-length(name) < 45">
- <fo:block space-before.optimum="1pt" font-size="6pt" font-style="italic">
- <xsl:value-of select="name"/>
- </fo:block>
- </xsl:when>
- <xsl:when test="contains(type, 'SkillUse') and string-length(name) > 44">
- <fo:block space-before.optimum="1pt" font-size="4pt" font-style="italic">
- <xsl:value-of select="name"/>
- </fo:block>
- </xsl:when>
- <xsl:otherwise>
- <fo:block space-before.optimum="1pt" font-size="4pt">
- <xsl:value-of select="name"/>
- </fo:block>
- </xsl:otherwise>
- </xsl:choose>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="2"/>
- <fo:table-cell>
- <fo:block space-before.optimum="1pt" font-size="8pt">
- <xsl:value-of select="ability"/>
- </fo:block>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="2"/>
- <fo:table-cell>
- <xsl:call-template name="attrib"><xsl:with-param name="attribute" select="concat('skills.', $shade, '.total')"/></xsl:call-template>
- <fo:block text-align="center" space-before.optimum="1pt" font-size="8pt">
- <xsl:choose>
- <xsl:when test="contains($skillmastery,name)">
- <xsl:value-of select="concat(skill_mod,'*')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="skill_mod"/>
- </xsl:otherwise>
- </xsl:choose>
- </fo:block>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="2">
- <fo:block text-align="center" space-before.optimum="3pt" line-height="6pt" font-size="6pt">=</fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block text-align="center" space-before.optimum="1pt" font-size="8pt">
- <xsl:value-of select="ability_mod"/>
- </fo:block>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="2">
- <fo:block text-align="center" space-before.optimum="3pt" line-height="6pt" font-size="6pt">
- <xsl:if test="ranks > 0">+</xsl:if>
- </fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block text-align="center" space-before.optimum="1pt" font-size="8pt">
- <xsl:if test="ranks > 0">
- <xsl:if test="contains(type, 'SkillUse')">[</xsl:if>
- <xsl:choose>
- <xsl:when test="round(ranks) = ranks">
- <xsl:value-of select="round(ranks)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="ranks"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="contains(type, 'SkillUse')">]</xsl:if>
- </xsl:if>
- <!--> <xsl:if test="ranks>0">
- <xsl:value-of select="ranks"/>
- </xsl:if>-->
- </fo:block>
- </fo:table-cell>
- <fo:table-cell number-columns-spanned="2">
- <fo:block text-align="center" space-before.optimum="3pt" line-height="6pt" font-size="6pt">
- <xsl:if test="misc_mod!=0">+</xsl:if>
- </fo:block>
- </fo:table-cell>
- <fo:table-cell>
- <fo:block text-align="center" space-before.optimum="1pt" font-size="8pt">
- <xsl:if test="misc_mod!=0">
- <xsl:value-of select="misc_mod"/>
- </xsl:if>
- </fo:block>
- </fo:table-cell>
- </fo:table-row>
- </xsl:if>
- </xsl:for-each>
- <xsl:call-template name="skills.empty"><xsl:with-param name="pos" select="count(skill)+1"/></xsl:call-template>
- <xsl:call-template name="skills.empty"><xsl:with-param name="pos" select="count(skill)+2"/></xsl:call-template>
- <fo:table-row>
- <fo:table-cell number-columns-spanned="17" padding-top="1pt">
- <fo:block text-align="center" font-size="6pt">
- <fo:inline font-family="ZapfDingbats">✓</fo:inline>: can be used untrained.
- <fo:inline font-family="ZapfDingbats">✗</fo:inline>: exclusive skills.
- *: Skill Mastery.
- </fo:block>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-body>
- <!-- This is going to be the new Skill Info Section-->
- <!--> <xsl:if test="count(conditional_modifiers/skillbonus) > 0">
- <fo:table-body border-collapse="collapse" padding="0.5pt">
- <xsl:call-template name="attrib"><xsl:with-param name="attribute" select="'skills.border'"/></xsl:call-template>
- <fo:table-row>
- <fo:table-cell number-columns-spanned="17" padding-top="1pt">
- <fo:block text-align="center" font-size="8pt" font-weight="bold">Conditional Modifiers:</fo:block>
- <xsl:for-each select="conditional_modifiers/skillbonus">
- <fo:block font-size="8pt" space-before.optimum="2pt"><xsl:value-of select="description"/></fo:block>
- </xsl:for-each>
- </fo:table-cell>
- </fo:table-row>
- </fo:table-body>
- </xsl:if>-->
- <!-- End New Skill Info Section-->
- </fo:table>
- </xsl:if>
- <!-- END Skills table-->
- </xsl:template>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement