<?xml version="1.0"?>
<!DOCTYPE xsl:transform [
- <!ENTITY % xhtml.characters SYSTEM "htmlchar.mod">
+ <!ENTITY % xhtml.characters SYSTEM "../../en/xml/htmlchar.mod">
%xhtml.characters;
]>
$Id$
$Log$
+Revision 1.9 2006/03/14 21:04:03 angantyr
+Changed the illustration handling with the introduction of 'illref's.
+Backwards compatible.
+
+Revision 1.8 2006/03/13 18:38:49 jonathan.blake
+Fixed minor Spanish translation issue
+
+Revision 1.7 2006/03/09 18:56:33 jonathan.blake
+Added a language parameter and coding to switch between languages when the output is hard-coded into the transformation.
+
+Revision 1.5 2006/03/02 00:33:32 jonathan.blake
+Removed the 'book-path' parameter to work with new gbtoxhtml.pl
+
+Revision 1.4 2005/12/27 01:51:29 angantyr
+Added templates for the "bookref" and "footref" elements.
+
+Revision 1.3 2005/12/05 21:29:04 jonathan.blake
+Added the facilities to properly handle character elements.
+
Revision 1.2 2005/04/09 19:51:50 angantyr
Added handling of open-ended quotes.
<!-- ====================== parameters ========================== -->
-<xsl:param name="book-path"><xsl:text>undefined-book</xsl:text></xsl:param>
<xsl:param name="use-illustrators" />
-
+<xsl:param name="language"><xsl:text>en</xsl:text></xsl:param>
+
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~ colors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<xsl:param name="link-color"><xsl:text>#ff0000</xsl:text></xsl:param>
<xsl:variable name="illustration-src" select="instance[@class='html']/@src" />
<xsl:if test="instance[@class='html'] and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
- <div class="illustration"><div align="center"><xsl:value-of select="$newline" />
- <table border="0" cellpadding="0" cellspacing="0"><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrtpl.gif" width="32" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrtp.gif" width="{$illustration-width}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrtpr.gif" width="32" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrl.gif" width="32" height="{$illustration-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="{$illustration-src}" width="{$illustration-width}" height="{$illustration-height}" border="0" align="middle" alt="[illustration]" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrr.gif" width="32" height="{$illustration-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrbtl.gif" width="32" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrbt.gif" width="{$illustration-width}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrbtr.gif" width="32" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- </table><br /><xsl:value-of select="$newline" />
+ <div class="illustration">
+ <div align="center"><xsl:value-of select="$newline" />
+ <xsl:call-template name="illustration-framed">
+ <xsl:with-param name="illustration-width"><xsl:value-of select="$illustration-width" /></xsl:with-param>
+ <xsl:with-param name="illustration-height"><xsl:value-of select="$illustration-height" /></xsl:with-param>
+ <xsl:with-param name="illustration-src"><xsl:value-of select="$illustration-src" /></xsl:with-param>
+ </xsl:call-template>
+ <br /><xsl:value-of select="$newline" />
</div></div><xsl:value-of select="$newline" />
</xsl:if>
</xsl:when>
<xsl:text>: </xsl:text>
<xsl:choose>
<xsl:when test="enemy-attribute[@class='combatskill']">
- <span class="smallcaps">COMBAT<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>SKILL</span>
- <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
+ <span class="smallcaps">
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text>DESTREZA EN EL COMBATE</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>COMBAT SKILL</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+ <xsl:text> </xsl:text>
<xsl:value-of select="enemy-attribute[@class='combatskill']" />
</xsl:when>
<xsl:when test="enemy-attribute[@class='closecombatskill']">
- <span class="smallcaps">CLOSE<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>COMBAT<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>SKILL</span>
- <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
+ <span class="smallcaps">
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text>CLOSE COMBAT SKILL</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>CLOSE COMBAT SKILL</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+ <xsl:text> </xsl:text>
<xsl:value-of select="enemy-attribute[@class='closecombatskill']" />
</xsl:when>
</xsl:choose>
- <xsl:text disable-output-escaping="yes"> &nbsp;&nbsp;</xsl:text>
- <span class="smallcaps">ENDURANCE</span>
+ <xsl:text> </xsl:text>
+ <span class="smallcaps">
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text>RESISTENCIA</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>ENDURANCE</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
<xsl:choose>
<xsl:when test="enemy-attribute[@class='target']">
- <xsl:text> (</xsl:text><span class="smallcaps">TARGET</span><xsl:text> points)</xsl:text>
- <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text> (o </xsl:text><span class="smallcaps">BLANCOS</span><xsl:text>)</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> (</xsl:text><span class="smallcaps">TARGET</span><xsl:text> points)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text> </xsl:text>
<xsl:value-of select="enemy-attribute[@class='target']" />
</xsl:when>
<xsl:when test="enemy-attribute[@class='resistance']">
- <xsl:text> (</xsl:text><span class="smallcaps">RESISTANCE</span><xsl:text> points)</xsl:text>
- <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'"></xsl:when>
+ <xsl:otherwise>
+ <xsl:text> (</xsl:text><span class="smallcaps">RESISTANCE</span><xsl:text> points)</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text> </xsl:text>
<xsl:value-of select="enemy-attribute[@class='resistance']" />
</xsl:when>
<xsl:otherwise>
- <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
+ <xsl:text> </xsl:text>
<xsl:value-of select="enemy-attribute[@class='endurance']" />
</xsl:otherwise>
</xsl:choose>
</blockquote><xsl:value-of select="$newline" />
</xsl:template>
+<xsl:template match="illref[@class='html']">
+ <xsl:for-each select="id( @idref )">
+ <!-- This creates unneccessary regeneration of float illustration pages, but it is easiest to keep things this way as long as we have to be backwards compatible... -->
+ <!-- When backwards compatibility can be dropped, most of (all?) the <illustration> processing can happen here -->
+ <xsl:apply-templates select="." />
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:template match="illustrations">
+ <ul class="unbulleted">
+ <xsl:for-each select="illustration[contains( $use-illustrators, concat( ':', meta/creator, ':' ) )] | illgroup">
+ <xsl:choose>
+ <xsl:when test="self::illustration and @class='float'">
+ <!-- List item with illustration name as link -->
+ <li>
+ <a>
+ <xsl:attribute name="href"><xsl:text>ill</xsl:text><xsl:number count="illustration[@class='float' and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )]" from="/" level="any" format="1" /><xsl:text>.htm</xsl:text></xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text>Ilustración </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Illustration </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:number count="illustration[@class='float' and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )]" from="/" level="any" format="I" />
+ </a>
+ <!-- List the sections that the illustration appears in -->
+ <xsl:text> (</xsl:text>
+ <xsl:for-each select="//illref[@class='html' and @idref=current()/@id]">
+ <!-- will the list always contain the closest ancestor first??? -->
+ <a>
+ <xsl:attribute name="href"><xsl:value-of select="ancestor::section[position()=1]/@id" /><xsl:text>.htm</xsl:text></xsl:attribute>
+ <xsl:value-of select="ancestor::section[position()=1]/meta/title[1]" />
+ </a>
+ <xsl:if test="position()!=last()">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text>)</xsl:text><xsl:value-of select="$newline" />
+ </li>
+ <!-- Call the backwards compatible template for generating the illustration page -->
+ <xsl:call-template name="xhtml-wrapper">
+ <xsl:with-param name="document-type">illustration</xsl:with-param>
+ <xsl:with-param name="filename"><xsl:text>ill</xsl:text><xsl:number count="illustration[@class='float' and contains( $use-illustrators, concat( ':', meta/creator, ':' ) ) ]" from="/" level="any" format="1" /></xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="self::illustration"> <!-- inline and map -->
+ <!-- List the sections that the illustration appears in -->
+ <li>
+ <xsl:for-each select="//illref[@class='html' and @idref=current()/@id]">
+ <!-- will the list always contain the closest ancestor first? -->
+ <a>
+ <!-- TODO: fix this so that sections that do not represent separate XHTML files are not linked to -->
+ <xsl:attribute name="href"><xsl:value-of select="ancestor::section[position()=1]/@id" /><xsl:text>.htm</xsl:text></xsl:attribute>
+ <xsl:value-of select="ancestor::section[position()=1]/meta/title[1]" />
+ </a>
+ <xsl:if test="position()!=last()">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </li>
+ </xsl:when>
+
+ <xsl:when test="self::illgroup and @class!='hidden'">
+ <!-- Check if the group contains any illustrations being used, before creating the list item -->
+ <xsl:if test="count( illustration[contains( $use-illustrators, concat( ':', meta/creator, ':' ) )] ) != 0">
+ <li>
+ <a>
+ <xsl:attribute name="href"><xsl:value-of select="@idref" /><xsl:text>.htm</xsl:text></xsl:attribute>
+ <xsl:value-of select="id(@idref)/meta/title[1]" />
+ </a>
+ </li>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </ul><xsl:value-of select="$newline" />
+</xsl:template>
+
<xsl:template match="illustration">
<xsl:variable name="illustration-width" select="instance[@class='html']/@width" />
<xsl:variable name="illustration-height" select="instance[@class='html']/@height" />
<xsl:if test="instance[@class='html'] and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
<xsl:choose>
<xsl:when test="@class='float'">
- <div class="illustration"><div align="center"><xsl:value-of select="$newline" />
- <table border="0" cellpadding="0" cellspacing="0"><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrtpl.gif" width="32" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrtp.gif" width="{$illustration-width-adjusted}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrtpr.gif" width="32" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrl.gif" width="32" height="{$illustration-height-adjusted}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td>
- <a>
- <xsl:attribute name="href"><xsl:text>ill</xsl:text><xsl:number count="illustration[@class='float' and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )]" from="/" level="any" format="1" /><xsl:text>.htm</xsl:text></xsl:attribute>
- <img src="{$illustration-src}" width="{$illustration-width-adjusted}" height="{$illustration-height-adjusted}" border="0" align="middle" alt="[illustration]" />
- </a>
- </td><xsl:value-of select="$newline" />
- <td><img src="brdrr.gif" width="32" height="{$illustration-height-adjusted}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrbtl.gif" width="32" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrbt.gif" width="{$illustration-width-adjusted}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrbtr.gif" width="32" height="32" align="middle" alt=""/></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- </table><br /><xsl:value-of select="$newline" />
+ <div class="illustration">
+ <div align="center"><xsl:value-of select="$newline" />
+ <xsl:call-template name="illustration-framed">
+ <xsl:with-param name="illustration-width"><xsl:value-of select="$illustration-width-adjusted" /></xsl:with-param>
+ <xsl:with-param name="illustration-height"><xsl:value-of select="$illustration-height-adjusted" /></xsl:with-param>
+ <xsl:with-param name="illustration-src"><xsl:value-of select="$illustration-src" /></xsl:with-param>
+ <xsl:with-param name="illustration-href">
+ <xsl:text>ill</xsl:text><xsl:number count="illustration[@class='float' and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )]" from="/" level="any" format="1" /><xsl:text>.htm</xsl:text>
+ </xsl:with-param>
+ </xsl:call-template>
+ <br /><xsl:value-of select="$newline" />
</div></div><xsl:value-of select="$newline" />
<xsl:call-template name="xhtml-wrapper">
<xsl:when test="@class='accent'" />
<xsl:otherwise>
- <div class="illustration"><div align="center"><xsl:value-of select="$newline" />
- <table border="0" cellpadding="0" cellspacing="0"><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrtpl.gif" width="32" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrtp.gif" width="{$illustration-width}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrtpr.gif" width="32" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrl.gif" width="32" height="{$illustration-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="{$illustration-src}" width="{$illustration-width}" height="{$illustration-height}" border="0" align="middle" alt="[illustration]" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrr.gif" width="32" height="{$illustration-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrbtl.gif" width="32" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrbt.gif" width="{$illustration-width}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrbtr.gif" width="32" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- </table><br /><xsl:value-of select="$newline" />
+ <div class="illustration">
+ <div align="center"><xsl:value-of select="$newline" />
+ <xsl:call-template name="illustration-framed">
+ <xsl:with-param name="illustration-width"><xsl:value-of select="$illustration-width" /></xsl:with-param>
+ <xsl:with-param name="illustration-height"><xsl:value-of select="$illustration-height" /></xsl:with-param>
+ <xsl:with-param name="illustration-src"><xsl:value-of select="$illustration-src" /></xsl:with-param>
+ </xsl:call-template>
+ <br /><xsl:value-of select="$newline" />
</div></div><xsl:value-of select="$newline" />
</xsl:otherwise>
</xsl:choose>
-
</xsl:if>
</xsl:template>
</xsl:choose>
</xsl:template>
+<!-- This template is obsolete, the "footref" element should be used instead -->
<xsl:template match="a[@class='footnote']">
<xsl:apply-templates />
<sup>
</sup>
</xsl:template>
+<!-- TODO: can this be made more uniform with illrefs? -->
<xsl:template match="a[@class='accent-illustration']">
<xsl:for-each select="id( @idref )">
<xsl:variable name="illustration-src" select="instance[@class='html']/@src" />
</xsl:for-each>
</xsl:template>
+<xsl:template match="bookref">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:variable name="my-section">
+ <xsl:choose>
+ <xsl:when test="@section">
+ <xsl:value-of select="@section" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>title</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="my-series">
+ <!-- If series is specified, go one directory back and then to series. Otherwise, add nothing. -->
+ <xsl:choose>
+ <xsl:when test="@series">
+ <xsl:text>/../</xsl:text><xsl:value-of select="@series" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text></xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:text>..</xsl:text><xsl:value-of select="$my-series" /><xsl:text>/</xsl:text><xsl:value-of select="@book" /><xsl:text>/</xsl:text><xsl:value-of select="$my-section" /><xsl:text>.htm</xsl:text>
+ </xsl:attribute>
+ <xsl:if test="@id"><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
+ <xsl:apply-templates />
+ </a>
+</xsl:template>
+
+<xsl:template match="footref">
+ <xsl:apply-templates />
+ <sup>
+ <a>
+ <xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="@idref" /></xsl:attribute>
+ <xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute>
+ <xsl:number count="footref" from="/" level="any" format="1" />
+ </a>
+ </sup>
+</xsl:template>
+
<xsl:template match="em">
<em><xsl:apply-templates /></em>
</xsl:template>
<span class="smallcaps"><xsl:apply-templates /></span>
</xsl:template>
+<!-- ==================== character elements ==================== -->
+<!--
+
+These templates define the mapping between the character elements used in
+the Project Aon instances of Gamebook XML and the ISO-8859-1
+characters.
+
+Portions Copyright International Organization for Standardization 1986
+Permission to copy in any form is granted for use with conforming SGML
+systems and applications as defined in ISO 8879, provided this notice
+is included in all copies.
+
+-->
+
+<xsl:template match="ch.apos"><xsl:text>'</xsl:text></xsl:template><!-- apostrophe = single quotation mark -->
+<xsl:template match="ch.nbsp"><xsl:text> </xsl:text></xsl:template><!-- no-break space = non-breaking space, U+00A0 ISOnum -->
+<xsl:template match="ch.iexcl"><xsl:text>¡</xsl:text></xsl:template><!-- inverted exclamation mark, U+00A1 ISOnum -->
+<xsl:template match="ch.cent"><xsl:text>¢</xsl:text></xsl:template><!-- cent sign, U+00A2 ISOnum -->
+<xsl:template match="ch.pound"><xsl:text>£</xsl:text></xsl:template><!-- pound sign, U+00A3 ISOnum -->
+<xsl:template match="ch.curren"><xsl:text>¤</xsl:text></xsl:template><!-- currency sign, U+00A4 ISOnum -->
+<xsl:template match="ch.yen"><xsl:text>¥</xsl:text></xsl:template><!-- yen sign = yuan sign, U+00A5 ISOnum -->
+<xsl:template match="ch.brvbar"><xsl:text>¦</xsl:text></xsl:template><!-- broken bar = broken vertical bar, U+00A6 ISOnum -->
+<xsl:template match="ch.sect"><xsl:text>§</xsl:text></xsl:template><!-- section sign, U+00A7 ISOnum -->
+<xsl:template match="ch.uml"><xsl:text>¨</xsl:text></xsl:template><!-- diaeresis = spacing diaeresis, U+00A8 ISOdia -->
+<xsl:template match="ch.copy"><xsl:text>©</xsl:text></xsl:template><!-- copyright sign, U+00A9 ISOnum -->
+<xsl:template match="ch.ordf"><xsl:text>ª</xsl:text></xsl:template><!-- feminine ordinal indicator, U+00AA ISOnum -->
+<xsl:template match="ch.laquo"><xsl:text>«</xsl:text></xsl:template><!-- left-pointing double angle quotation mark = left pointing guillemet, U+00AB ISOnum -->
+<xsl:template match="ch.not"><xsl:text>¬</xsl:text></xsl:template><!-- not sign, U+00AC ISOnum -->
+<xsl:template match="ch.shy"><xsl:text>­</xsl:text></xsl:template><!-- soft hyphen = discretionary hyphen, U+00AD ISOnum -->
+<xsl:template match="ch.reg"><xsl:text>®</xsl:text></xsl:template><!-- registered sign = registered trade mark sign, U+00AE ISOnum -->
+<xsl:template match="ch.macr"><xsl:text>¯</xsl:text></xsl:template><!-- macron = spacing macron = overline = APL overbar, U+00AF ISOdia -->
+<xsl:template match="ch.deg"><xsl:text>°</xsl:text></xsl:template><!-- degree sign, U+00B0 ISOnum -->
+<xsl:template match="ch.plusmn"><xsl:text>±</xsl:text></xsl:template><!-- plus-minus sign = plus-or-minus sign, U+00B1 ISOnum -->
+<xsl:template match="ch.sup2"><xsl:text>²</xsl:text></xsl:template><!-- superscript two = superscript digit two = squared, U+00B2 ISOnum -->
+<xsl:template match="ch.sup3"><xsl:text>³</xsl:text></xsl:template><!-- superscript three = superscript digit three = cubed, U+00B3 ISOnum -->
+<xsl:template match="ch.acute"><xsl:text>´</xsl:text></xsl:template><!-- acute accent = spacing acute, U+00B4 ISOdia -->
+<xsl:template match="ch.micro"><xsl:text>µ</xsl:text></xsl:template><!-- micro sign, U+00B5 ISOnum -->
+<xsl:template match="ch.para"><xsl:text>¶</xsl:text></xsl:template><!-- pilcrow sign = paragraph sign, U+00B6 ISOnum -->
+<xsl:template match="ch.middot"><xsl:text>·</xsl:text></xsl:template><!-- middle dot = Georgian comma = Greek middle dot, U+00B7 ISOnum -->
+<xsl:template match="ch.cedil"><xsl:text>¸</xsl:text></xsl:template><!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
+<xsl:template match="ch.sup1"><xsl:text>¹</xsl:text></xsl:template><!-- superscript one = superscript digit one, U+00B9 ISOnum -->
+<xsl:template match="ch.ordm"><xsl:text>º</xsl:text></xsl:template><!-- masculine ordinal indicator, U+00BA ISOnum -->
+<xsl:template match="ch.raquo"><xsl:text>»</xsl:text></xsl:template><!-- right-pointing double angle quotation mark = right pointing guillemet, U+00BB ISOnum -->
+<xsl:template match="ch.frac14"><xsl:text>¼</xsl:text></xsl:template><!-- vulgar fraction one quarter = fraction one quarter, U+00BC ISOnum -->
+<xsl:template match="ch.frac12"><xsl:text>½</xsl:text></xsl:template><!-- vulgar fraction one half = fraction one half, U+00BD ISOnum -->
+<xsl:template match="ch.frac34"><xsl:text>¾</xsl:text></xsl:template><!-- vulgar fraction three quarters = fraction three quarters, U+00BE ISOnum -->
+<xsl:template match="ch.iquest"><xsl:text>¿</xsl:text></xsl:template><!-- inverted question mark = turned question mark, U+00BF ISOnum -->
+<xsl:template match="ch.Agrave"><xsl:text>À</xsl:text></xsl:template><!-- latin capital letter A with grave = latin capital letter A grave, U+00C0 ISOlat1 -->
+<xsl:template match="ch.Aacute"><xsl:text>Á</xsl:text></xsl:template><!-- latin capital letter A with acute, U+00C1 ISOlat1 -->
+<xsl:template match="ch.Acirc"><xsl:text>Â</xsl:text></xsl:template><!-- latin capital letter A with circumflex, U+00C2 ISOlat1 -->
+<xsl:template match="ch.Atilde"><xsl:text>Ã</xsl:text></xsl:template><!-- latin capital letter A with tilde, U+00C3 ISOlat1 -->
+<xsl:template match="ch.Auml"><xsl:text>Ä</xsl:text></xsl:template><!-- latin capital letter A with diaeresis, U+00C4 ISOlat1 -->
+<xsl:template match="ch.Aring"><xsl:text>Å</xsl:text></xsl:template><!-- latin capital letter A with ring above = latin capital letter A ring, U+00C5 ISOlat1 -->
+<xsl:template match="ch.AElig"><xsl:text>Æ</xsl:text></xsl:template><!-- latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1 -->
+<xsl:template match="ch.Ccedil"><xsl:text>Ç</xsl:text></xsl:template><!-- latin capital letter C with cedilla, U+00C7 ISOlat1 -->
+<xsl:template match="ch.Egrave"><xsl:text>È</xsl:text></xsl:template><!-- latin capital letter E with grave, U+00C8 ISOlat1 -->
+<xsl:template match="ch.Eacute"><xsl:text>É</xsl:text></xsl:template><!-- latin capital letter E with acute, U+00C9 ISOlat1 -->
+<xsl:template match="ch.Ecirc"><xsl:text>Ê</xsl:text></xsl:template><!-- latin capital letter E with circumflex, U+00CA ISOlat1 -->
+<xsl:template match="ch.Euml"><xsl:text>Ë</xsl:text></xsl:template><!-- latin capital letter E with diaeresis, U+00CB ISOlat1 -->
+<xsl:template match="ch.Igrave"><xsl:text>Ì</xsl:text></xsl:template><!-- latin capital letter I with grave, U+00CC ISOlat1 -->
+<xsl:template match="ch.Iacute"><xsl:text>Í</xsl:text></xsl:template><!-- latin capital letter I with acute, U+00CD ISOlat1 -->
+<xsl:template match="ch.Icirc"><xsl:text>Î</xsl:text></xsl:template><!-- latin capital letter I with circumflex, U+00CE ISOlat1 -->
+<xsl:template match="ch.Iuml"><xsl:text>Ï</xsl:text></xsl:template><!-- latin capital letter I with diaeresis, U+00CF ISOlat1 -->
+<xsl:template match="ch.ETH"><xsl:text>Ð</xsl:text></xsl:template><!-- latin capital letter ETH, U+00D0 ISOlat1 -->
+<xsl:template match="ch.Ntilde"><xsl:text>Ñ</xsl:text></xsl:template><!-- latin capital letter N with tilde, U+00D1 ISOlat1 -->
+<xsl:template match="ch.Ograve"><xsl:text>Ò</xsl:text></xsl:template><!-- latin capital letter O with grave, U+00D2 ISOlat1 -->
+<xsl:template match="ch.Oacute"><xsl:text>Ó</xsl:text></xsl:template><!-- latin capital letter O with acute, U+00D3 ISOlat1 -->
+<xsl:template match="ch.Ocirc"><xsl:text>Ô</xsl:text></xsl:template><!-- latin capital letter O with circumflex, U+00D4 ISOlat1 -->
+<xsl:template match="ch.Otilde"><xsl:text>Õ</xsl:text></xsl:template><!-- latin capital letter O with tilde, U+00D5 ISOlat1 -->
+<xsl:template match="ch.Ouml"><xsl:text>Ö</xsl:text></xsl:template><!-- latin capital letter O with diaeresis, U+00D6 ISOlat1 -->
+<xsl:template match="ch.times"><xsl:text>×</xsl:text></xsl:template><!-- multiplication sign, U+00D7 ISOnum -->
+<xsl:template match="ch.Oslash"><xsl:text>Ø</xsl:text></xsl:template><!-- latin capital letter O with stroke = latin capital letter O slash, U+00D8 ISOlat1 -->
+<xsl:template match="ch.Ugrave"><xsl:text>Ù</xsl:text></xsl:template><!-- latin capital letter U with grave, U+00D9 ISOlat1 -->
+<xsl:template match="ch.Uacute"><xsl:text>Ú</xsl:text></xsl:template><!-- latin capital letter U with acute, U+00DA ISOlat1 -->
+<xsl:template match="ch.Ucirc"><xsl:text>Û</xsl:text></xsl:template><!-- latin capital letter U with circumflex, U+00DB ISOlat1 -->
+<xsl:template match="ch.Uuml"><xsl:text>Ü</xsl:text></xsl:template><!-- latin capital letter U with diaeresis, U+00DC ISOlat1 -->
+<xsl:template match="ch.Yacute"><xsl:text>Ý</xsl:text></xsl:template><!-- latin capital letter Y with acute, U+00DD ISOlat1 -->
+<xsl:template match="ch.THORN"><xsl:text>Þ</xsl:text></xsl:template><!-- latin capital letter THORN, U+00DE ISOlat1 -->
+<xsl:template match="ch.szlig"><xsl:text>ß</xsl:text></xsl:template><!-- latin small letter sharp s = ess-zed, U+00DF ISOlat1 -->
+<xsl:template match="ch.agrave"><xsl:text>à</xsl:text></xsl:template><!-- latin small letter a with grave = latin small letter a grave, U+00E0 ISOlat1 -->
+<xsl:template match="ch.aacute"><xsl:text>á</xsl:text></xsl:template><!-- latin small letter a with acute, U+00E1 ISOlat1 -->
+<xsl:template match="ch.acirc"><xsl:text>â</xsl:text></xsl:template><!-- latin small letter a with circumflex, U+00E2 ISOlat1 -->
+<xsl:template match="ch.atilde"><xsl:text>ã</xsl:text></xsl:template><!-- latin small letter a with tilde, U+00E3 ISOlat1 -->
+<xsl:template match="ch.auml"><xsl:text>ä</xsl:text></xsl:template><!-- latin small letter a with diaeresis, U+00E4 ISOlat1 -->
+<xsl:template match="ch.aring"><xsl:text>å</xsl:text></xsl:template><!-- latin small letter a with ring above = latin small letter a ring, U+00E5 ISOlat1 -->
+<xsl:template match="ch.aelig"><xsl:text>æ</xsl:text></xsl:template><!-- latin small letter ae = latin small ligature ae, U+00E6 ISOlat1 -->
+<xsl:template match="ch.ccedil"><xsl:text>ç</xsl:text></xsl:template><!-- latin small letter c with cedilla, U+00E7 ISOlat1 -->
+<xsl:template match="ch.egrave"><xsl:text>è</xsl:text></xsl:template><!-- latin small letter e with grave, U+00E8 ISOlat1 -->
+<xsl:template match="ch.eacute"><xsl:text>é</xsl:text></xsl:template><!-- latin small letter e with acute, U+00E9 ISOlat1 -->
+<xsl:template match="ch.ecirc"><xsl:text>ê</xsl:text></xsl:template><!-- latin small letter e with circumflex, U+00EA ISOlat1 -->
+<xsl:template match="ch.euml"><xsl:text>ë</xsl:text></xsl:template><!-- latin small letter e with diaeresis, U+00EB ISOlat1 -->
+<xsl:template match="ch.igrave"><xsl:text>ì</xsl:text></xsl:template><!-- latin small letter i with grave, U+00EC ISOlat1 -->
+<xsl:template match="ch.iacute"><xsl:text>í</xsl:text></xsl:template><!-- latin small letter i with acute, U+00ED ISOlat1 -->
+<xsl:template match="ch.icirc"><xsl:text>î</xsl:text></xsl:template><!-- latin small letter i with circumflex, U+00EE ISOlat1 -->
+<xsl:template match="ch.iuml"><xsl:text>ï</xsl:text></xsl:template><!-- latin small letter i with diaeresis, U+00EF ISOlat1 -->
+<xsl:template match="ch.eth"><xsl:text>ð</xsl:text></xsl:template><!-- latin small letter eth, U+00F0 ISOlat1 -->
+<xsl:template match="ch.ntilde"><xsl:text>ñ</xsl:text></xsl:template><!-- latin small letter n with tilde, U+00F1 ISOlat1 -->
+<xsl:template match="ch.ograve"><xsl:text>ò</xsl:text></xsl:template><!-- latin small letter o with grave, U+00F2 ISOlat1 -->
+<xsl:template match="ch.oacute"><xsl:text>ó</xsl:text></xsl:template><!-- latin small letter o with acute, U+00F3 ISOlat1 -->
+<xsl:template match="ch.ocirc"><xsl:text>ô</xsl:text></xsl:template><!-- latin small letter o with circumflex, U+00F4 ISOlat1 -->
+<xsl:template match="ch.otilde"><xsl:text>õ</xsl:text></xsl:template><!-- latin small letter o with tilde, U+00F5 ISOlat1 -->
+<xsl:template match="ch.ouml"><xsl:text>ö</xsl:text></xsl:template><!-- latin small letter o with diaeresis, U+00F6 ISOlat1 -->
+<xsl:template match="ch.divide"><xsl:text>÷</xsl:text></xsl:template><!-- division sign, U+00F7 ISOnum -->
+<xsl:template match="ch.oslash"><xsl:text>ø</xsl:text></xsl:template><!-- latin small letter o with stroke, = latin small letter o slash, U+00F8 ISOlat1 -->
+<xsl:template match="ch.ugrave"><xsl:text>ù</xsl:text></xsl:template><!-- latin small letter u with grave, U+00F9 ISOlat1 -->
+<xsl:template match="ch.uacute"><xsl:text>ú</xsl:text></xsl:template><!-- latin small letter u with acute, U+00FA ISOlat1 -->
+<xsl:template match="ch.ucirc"><xsl:text>û</xsl:text></xsl:template><!-- latin small letter u with circumflex, U+00FB ISOlat1 -->
+<xsl:template match="ch.uuml"><xsl:text>ü</xsl:text></xsl:template><!-- latin small letter u with diaeresis, U+00FC ISOlat1 -->
+<xsl:template match="ch.yacute"><xsl:text>ý</xsl:text></xsl:template><!-- latin small letter y with acute, U+00FD ISOlat1 -->
+<xsl:template match="ch.thorn"><xsl:text>þ</xsl:text></xsl:template><!-- latin small letter thorn, U+00FE ISOlat1 -->
+<xsl:template match="ch.yuml"><xsl:text>ÿ</xsl:text></xsl:template><!-- latin small letter y with diaeresis, U+00FF ISOlat1 -->
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~ Special Characters ~~~~~~~~~~~~~~~~~~~~ -->
+
+<xsl:template match="ch.ampersand">&</xsl:template><!-- ampersand -->
+<xsl:template match="ch.lsquot">'</xsl:template><!-- opening left quotation mark -->
+<xsl:template match="ch.rsquot">'</xsl:template><!-- closing right quotation mark -->
+<xsl:template match="ch.ldquot">"</xsl:template><!-- opening left double quotation mark -->
+<xsl:template match="ch.rdquot">"</xsl:template><!-- closing right double quotation mark -->
+<xsl:template match="ch.minus">-</xsl:template><!-- mathematical minus -->
+<xsl:template match="ch.endash">-</xsl:template><!-- endash -->
+<xsl:template match="ch.emdash">--</xsl:template><!-- emdash -->
+<xsl:template match="ch.ellips"> . . .</xsl:template><!-- ellipsis -->
+<xsl:template match="ch.lellips">. . . </xsl:template><!-- left ellipsis, used at the beginning of edited material -->
+<xsl:template match="ch.blankline">_______</xsl:template><!-- blank line to be filled in -->
+<xsl:template match="ch.percent"><xsl:text>%</xsl:text></xsl:template><!-- percent sign -->
+<xsl:template match="ch.thinspace"><xsl:text></xsl:text></xsl:template><!-- small horizontal space for use between adjacent quotation marks - added mainly for LaTeX's sake -->
+<xsl:template match="ch.frac116"><xsl:text>1/16</xsl:text></xsl:template><!-- vulgar fraction one sixteenth = fraction on sixteenth -->
+<xsl:template match="ch.plus"><xsl:text>+</xsl:text></xsl:template><!-- mathematical plus -->
+
<!-- ==================== named templates ======================= -->
<xsl:template name="xhtml-wrapper">
<xsl:param name="filename">undefined</xsl:param>
<xsl:param name="glossary-id-prefix"></xsl:param>
-<!-- <redirect:write file="{$book-path}/{$filename}.htm">-->
+<!-- <redirect:write file="{$filename}.htm">-->
<redirect:write file="{$filename}.htm">
<xsl:fallback>
<xsl:text>xhtml-wrapper: Cannot write to filename: "</xsl:text>
<xsl:text>: </xsl:text>
<xsl:choose>
<xsl:when test="$document-type='illustration'">
- <xsl:text>Illustration </xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text>Ilustración </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Illustration </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:number count="illustration[@class='float' and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )]" from="/" level="any" format="I" />
</xsl:when>
<xsl:otherwise><xsl:value-of select="meta/title[1]" /></xsl:otherwise>
<xsl:comment>
<xsl:text> </xsl:text>
<xsl:apply-templates select="/gamebook/meta/rights[@class='copyrights']" />
- <xsl:text> Published by </xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text> Publicado por </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text> Published by </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:apply-templates select="/gamebook/meta/publisher[1]" />
<xsl:text>. </xsl:text>
</xsl:comment>
<xsl:apply-templates select="/gamebook/meta/description[@class='publication']" />
<p>
- <xsl:text>Publication Date: </xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text>Fecha de Publicación: </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Publication Date: </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:value-of select="/gamebook/meta/date[@class='publication']/day" />
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="/gamebook/meta/date[@class='publication']/month = 1">
- <xsl:text>January</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'"><xsl:text>de enero de</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>January</xsl:text></xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:when test="/gamebook/meta/date[@class='publication']/month = 2">
- <xsl:text>February</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'"><xsl:text>de febrero de</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>February</xsl:text></xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:when test="/gamebook/meta/date[@class='publication']/month = 3">
- <xsl:text>March</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'"><xsl:text>de marzo de</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>March</xsl:text></xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:when test="/gamebook/meta/date[@class='publication']/month = 4">
- <xsl:text>April</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'"><xsl:text>de abril de</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>April</xsl:text></xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:when test="/gamebook/meta/date[@class='publication']/month = 5">
- <xsl:text>May</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'"><xsl:text>de mayo de</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>May</xsl:text></xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:when test="/gamebook/meta/date[@class='publication']/month = 6">
- <xsl:text>June</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'"><xsl:text>de junio de</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>June</xsl:text></xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:when test="/gamebook/meta/date[@class='publication']/month = 7">
- <xsl:text>July</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'"><xsl:text>de julio de</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>July</xsl:text></xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:when test="/gamebook/meta/date[@class='publication']/month = 8">
- <xsl:text>August</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'"><xsl:text>de agosto de</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>August</xsl:text></xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:when test="/gamebook/meta/date[@class='publication']/month = 9">
- <xsl:text>September</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'"><xsl:text>de septiembre de</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>September</xsl:text></xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:when test="/gamebook/meta/date[@class='publication']/month = 10">
- <xsl:text>October</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'"><xsl:text>de octubre de</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>October</xsl:text></xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:when test="/gamebook/meta/date[@class='publication']/month = 11">
- <xsl:text>November</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'"><xsl:text>de noviembre de</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>November</xsl:text></xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:when test="/gamebook/meta/date[@class='publication']/month = 12">
- <xsl:text>December</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'"><xsl:text>de diciembre de</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>December</xsl:text></xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:text>Invalid Month</xsl:text>
<xsl:when test="$document-type='toc'">
<div class="frontmatter"><xsl:value-of select="$newline" />
- <h2>Table of Contents</h2><xsl:value-of select="$newline" />
+ <h2>
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text>Índice de Contenidos</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Table of Contents</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </h2><xsl:value-of select="$newline" />
<xsl:value-of select="$newline" />
<xsl:value-of select="$newline" />
<ul><xsl:value-of select="$newline" />
- <li><a href="title.htm">Title Page</a></li><xsl:value-of select="$newline" />
+ <xsl:variable name="title-page">
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text>Página Principal</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Title Page</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <li><a href="title.htm"><xsl:value-of select="$title-page"/></a></li><xsl:value-of select="$newline" />
<xsl:for-each select="/gamebook/section/data/section">
<li>
<a><xsl:attribute name="href"><xsl:value-of select="@id" /><xsl:text>.htm</xsl:text></xsl:attribute>
<xsl:value-of select="$newline" />
<xsl:for-each select="data/* | data/text()">
+ <xsl:variable name="map-illustration-alt-text">
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text>mapa</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>map</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- duplicated stuff here, no good way to avoid this while retaining backwards compatibility -->
<xsl:choose>
<xsl:when test="self::illustration and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
<xsl:variable name="illustration-width" select="instance[@class='html']/@width" />
<xsl:variable name="illustration-height-adjusted"><xsl:number value="$illustration-height * $illustration-width-adjusted div $illustration-width" /></xsl:variable>
<div class="illustration"><div align="center"><xsl:value-of select="$newline" />
- <table border="0" cellpadding="0" cellspacing="0"><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrtpl.gif" width="31" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrtp.gif" width="{$illustration-width-adjusted}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrtpr.gif" width="33" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrl.gif" width="31" height="{$illustration-height-adjusted}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><a href="maplarge.htm"><img src="{$illustration-src}" width="{$illustration-width-adjusted}" height="{$illustration-height-adjusted}" align="middle" border="0" alt="[map]" /></a></td><xsl:value-of select="$newline" />
- <td><img src="brdrr.gif" width="33" height="{$illustration-height-adjusted}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrbtl.gif" width="31" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrbt.gif" width="{$illustration-width-adjusted}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrbtr.gif" width="33" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- </table><xsl:value-of select="$newline" />
+ <xsl:call-template name="illustration-framed">
+ <xsl:with-param name="illustration-width"><xsl:value-of select="$illustration-width-adjusted" /></xsl:with-param>
+ <xsl:with-param name="illustration-height"><xsl:value-of select="$illustration-height-adjusted" /></xsl:with-param>
+ <xsl:with-param name="illustration-src"><xsl:value-of select="$illustration-src" /></xsl:with-param>
+ <xsl:with-param name="illustration-href">maplarge.htm</xsl:with-param>
+ <xsl:with-param name="brdrl-width">31</xsl:with-param>
+ <xsl:with-param name="brdrr-width">33</xsl:with-param>
+ <xsl:with-param name="illustration-alt-text">[{$map-illustration-alt-text}]</xsl:with-param>
+ </xsl:call-template>
<br /><br />
</div></div><xsl:value-of select="$newline" />
</xsl:when>
+
+ <xsl:when test="self::illref and @class='html'">
+ <xsl:for-each select="id( @idref )">
+ <xsl:if test="contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
+ <xsl:variable name="illustration-width" select="instance[@class='html']/@width" />
+ <xsl:variable name="illustration-height" select="instance[@class='html']/@height" />
+ <xsl:variable name="illustration-src" select="instance[@class='html']/@src" />
+
+ <xsl:variable name="illustration-width-adjusted"><xsl:number value="386" /></xsl:variable>
+ <xsl:variable name="illustration-height-adjusted"><xsl:number value="$illustration-height * $illustration-width-adjusted div $illustration-width" /></xsl:variable>
+
+ <div class="illustration">
+ <div align="center"><xsl:value-of select="$newline" />
+ <xsl:call-template name="illustration-framed">
+ <xsl:with-param name="illustration-width"><xsl:value-of select="$illustration-width-adjusted" /></xsl:with-param>
+ <xsl:with-param name="illustration-height"><xsl:value-of select="$illustration-height-adjusted" /></xsl:with-param>
+ <xsl:with-param name="illustration-src"><xsl:value-of select="$illustration-src" /></xsl:with-param>
+ <xsl:with-param name="illustration-href">maplarge.htm</xsl:with-param>
+ <xsl:with-param name="brdrl-width">31</xsl:with-param>
+ <xsl:with-param name="brdrr-width">33</xsl:with-param>
+ <xsl:with-param name="illustration-alt-text">[{$map-illustration-alt-text}]</xsl:with-param>
+ </xsl:call-template>
+ <br /><br />
+ </div></div><xsl:value-of select="$newline" />
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="." />
</xsl:otherwise>
<xsl:value-of select="$newline" />
<xsl:for-each select="data/* | data/text()">
+ <xsl:variable name="map-illustration-alt-text">
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text>mapa</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>map</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- duplicated stuff here, no good way to avoid this while retaining backwards compatibility -->
<xsl:choose>
<xsl:when test="self::illustration and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
<xsl:variable name="illustration-width" select="instance[@class='html']/@width" />
<xsl:variable name="illustration-src" select="instance[@class='html']/@src" />
<div class="illustration"><div align="center"><xsl:value-of select="$newline" />
- <table border="0" cellpadding="0" cellspacing="0"><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrtpl.gif" width="31" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrtp.gif" width="{$illustration-width}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrtpr.gif" width="33" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrl.gif" width="31" height="{$illustration-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><a href="map.htm"><img src="{$illustration-src}" width="{$illustration-width}" height="{$illustration-height}" align="middle" border="0" alt="[map]" /></a></td><xsl:value-of select="$newline" />
- <td><img src="brdrr.gif" width="33" height="{$illustration-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrbtl.gif" width="31" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrbt.gif" width="{$illustration-width}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrbtr.gif" width="33" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- </table><br /><xsl:value-of select="$newline" />
+ <xsl:call-template name="illustration-framed">
+ <xsl:with-param name="illustration-width"><xsl:value-of select="$illustration-width" /></xsl:with-param>
+ <xsl:with-param name="illustration-height"><xsl:value-of select="$illustration-height" /></xsl:with-param>
+ <xsl:with-param name="illustration-src"><xsl:value-of select="$illustration-src" /></xsl:with-param>
+ <xsl:with-param name="illustration-href">map.htm</xsl:with-param>
+ <xsl:with-param name="brdrl-width">31</xsl:with-param>
+ <xsl:with-param name="brdrr-width">33</xsl:with-param>
+ <xsl:with-param name="illustration-alt-text">[{$map-illustration-alt-text}]</xsl:with-param>
+ </xsl:call-template>
+ <br /><xsl:value-of select="$newline" />
</div></div><xsl:value-of select="$newline" />
</xsl:when>
+
+ <xsl:when test="self::illref and @class='html'">
+ <xsl:for-each select="id( @idref )">
+ <xsl:if test="contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
+ <xsl:variable name="illustration-width" select="instance[@class='html']/@width" />
+ <xsl:variable name="illustration-height" select="instance[@class='html']/@height" />
+ <xsl:variable name="illustration-src" select="instance[@class='html']/@src" />
+
+ <div class="illustration">
+ <div align="center"><xsl:value-of select="$newline" />
+ <xsl:call-template name="illustration-framed">
+ <xsl:with-param name="illustration-width"><xsl:value-of select="$illustration-width" /></xsl:with-param>
+ <xsl:with-param name="illustration-height"><xsl:value-of select="$illustration-height" /></xsl:with-param>
+ <xsl:with-param name="illustration-src"><xsl:value-of select="$illustration-src" /></xsl:with-param>
+ <xsl:with-param name="illustration-href">map.htm</xsl:with-param>
+ <xsl:with-param name="brdrl-width">31</xsl:with-param>
+ <xsl:with-param name="brdrr-width">33</xsl:with-param>
+ <xsl:with-param name="illustration-alt-text">[{$map-illustration-alt-text}]</xsl:with-param>
+ </xsl:call-template>
+ <br /><xsl:value-of select="$newline" />
+ </div></div><xsl:value-of select="$newline" />
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="." />
</xsl:otherwise>
<xsl:variable name="illustration-src" select="instance[@class='html']/@src" />
<h3>
- <xsl:text>Illustration </xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text>Ilustración </xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Illustration </xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:number count="illustration[@class='float' and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )]" from="/" level="any" format="I" />
</h3><xsl:value-of select="$newline" />
<div class="illustration"><div align="center"><xsl:value-of select="$newline" />
- <table border="0" cellpadding="0" cellspacing="0"><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrtpl.gif" width="31" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrtp.gif" width="{$illustration-width}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrtpr.gif" width="33" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrl.gif" width="31" height="{$illustration-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="{$illustration-src}" width="{$illustration-width}" height="{$illustration-height}" align="middle" border="0" alt="[illustration]" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrr.gif" width="33" height="{$illustration-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- <tr><xsl:value-of select="$newline" />
- <td><img src="brdrbtl.gif" width="31" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrbt.gif" width="{$illustration-width}" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- <td><img src="brdrbtr.gif" width="33" height="32" align="middle" alt="" /></td><xsl:value-of select="$newline" />
- </tr><xsl:value-of select="$newline" />
- </table><br /><xsl:value-of select="$newline" />
+ <xsl:call-template name="illustration-framed">
+ <xsl:with-param name="illustration-width"><xsl:value-of select="$illustration-width" /></xsl:with-param>
+ <xsl:with-param name="illustration-height"><xsl:value-of select="$illustration-height" /></xsl:with-param>
+ <xsl:with-param name="illustration-src"><xsl:value-of select="$illustration-src" /></xsl:with-param>
+ <xsl:with-param name="brdrl-width">31</xsl:with-param>
+ <xsl:with-param name="brdrr-width">33</xsl:with-param>
+ </xsl:call-template>
+ <br /><xsl:value-of select="$newline" />
</div></div><xsl:value-of select="$newline" />
<p class="caption"><strong><xsl:apply-templates select="meta/description" /></strong></p><xsl:value-of select="$newline" />
</xsl:when>
</xsl:template>
<xsl:template name="navigation-bar">
+ <xsl:variable name="table-of-contents">
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text>Índice de Contenidos</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Table of Contents</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<div class="navigation">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
</xsl:otherwise>
</xsl:choose>
</td>
- <td><a href="toc.htm"><img src="toc.gif" width="150" height="30" border="0" alt="Table of Contents" /></a></td>
+ <td><a href="toc.htm"><img src="toc.gif" width="150" height="30" border="0" alt="{$table-of-contents}" /></a></td>
<td>
<xsl:choose>
<xsl:when test="meta/link[@class='next']">
<xsl:attribute name="alt">
<xsl:choose>
<xsl:when test="meta/link[@class='next']/@idref = 'sect1'">
- <xsl:text>Section 1</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text>Sección 1</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Section 1</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="id( meta/link[@class='next']/@idref )/meta/title" />
</xsl:template>
+<xsl:template name="illustration-framed">
+ <xsl:param name="brdrl-width">32</xsl:param>
+ <xsl:param name="brdr-height">32</xsl:param>
+ <xsl:param name="brdrr-width">32</xsl:param>
+ <xsl:param name="illustration-alt-text">
+ <xsl:choose>
+ <xsl:when test="$language='es'">
+ <xsl:text>ilustración</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>illustration</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+
+ <xsl:param name="illustration-width"></xsl:param>
+ <xsl:param name="illustration-height"></xsl:param>
+ <xsl:param name="illustration-src"></xsl:param>
+ <xsl:param name="illustration-href"></xsl:param>
+
+ <table border="0" cellpadding="0" cellspacing="0">
+ <xsl:value-of select="$newline" />
+ <tr>
+ <xsl:value-of select="$newline" />
+ <td><img src="brdrtpl.gif" width="{$brdrl-width}" height="{$brdr-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
+ <td><img src="brdrtp.gif" width="{$illustration-width}" height="{$brdr-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
+ <td><img src="brdrtpr.gif" width="{$brdrr-width}" height="{$brdr-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
+ </tr><xsl:value-of select="$newline" />
+ <tr>
+ <xsl:value-of select="$newline" />
+ <td><img src="brdrl.gif" width="{$brdrl-width}" height="{$illustration-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
+ <td>
+ <xsl:choose>
+ <xsl:when test="$illustration-href">
+ <a href="{$illustration-href}">
+ <img src="{$illustration-src}" width="{$illustration-width}" height="{$illustration-height}" align="middle" border="0" alt="{$illustration-alt-text}" />
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <img src="{$illustration-src}" width="{$illustration-width}" height="{$illustration-height}" align="middle" border="0" alt="[{$illustration-alt-text}]" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </td><xsl:value-of select="$newline" />
+ <td><img src="brdrr.gif" width="{$brdrr-width}" height="{$illustration-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
+ </tr><xsl:value-of select="$newline" />
+ <tr>
+ <xsl:value-of select="$newline" />
+ <td><img src="brdrbtl.gif" width="{$brdrl-width}" height="{$brdr-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
+ <td><img src="brdrbt.gif" width="{$illustration-width}" height="{$brdr-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
+ <td><img src="brdrbtr.gif" width="{$brdrr-width}" height="{$brdr-height}" align="middle" alt="" /></td><xsl:value-of select="$newline" />
+ </tr><xsl:value-of select="$newline" />
+ </table><xsl:value-of select="$newline" />
+</xsl:template>
+
</xsl:transform>