+++ /dev/null
-<?xml version="1.0"?>
-<!DOCTYPE xsl:transform [
- <!ENTITY % latex.characters SYSTEM "ltexchar.mod">
- %latex.characters;
-]>
-
-<xsl:transform version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:output method="text" encoding="ISO-8859-1" />
-
-<xsl:strip-space elements="gamebook meta section data ol ul dl li dd footnotes footnote illustration instance" />
-<xsl:preserve-space elements="p choice" />
-
-<!--
-
-$Log$
-Revision 1.3 2006/04/04 22:02:14 cvsuser
-Fix two bugs (one } too much and a missing line break)
-
-Revision 1.2 2005/04/09 19:51:50 angantyr
-Added handling of open-ended quotes.
-
-Revision 1.1 2005/01/30 01:32:52 jonathan.blake
-Initial freepository revision of XML support documents.
-
-Revision 1.3 2002/10/30 06:33:22 jblake
-Added capability to filter which illustrators' work is included in the output.
-
-Revision 1.2 2002/10/20 06:29:58 jblake
-Added support for CLOSE COMBAT SKILL from the Freeway Warrior books.
-
-Revision 1.1 2002/10/15 23:30:23 jblake
-Initial revision
-
--->
-
-<!--
-
-To Implement:
-
-The implementation of tables is incomplete and kludgy.
-
--->
-
-<!-- ====================== parameters ========================== -->
-
-<xsl:param name="title-color"><xsl:text>0.0,0.0,0.0</xsl:text></xsl:param>
-<xsl:param name="use-illustrators" />
-<xsl:param name="language"><xsl:text>en</xsl:text></xsl:param>
-
-<!-- ======================= variables ========================== -->
-
-<xsl:variable name="newline">
-<xsl:text>
-</xsl:text>
-</xsl:variable>
-
-<xsl:variable name="newparagraph">
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-</xsl:variable>
-
-<!-- ======================== Templates ========================= -->
-
-<!-- ================= hierarchical sections ==================== -->
-
-<xsl:template match="meta" />
-
-<!-- ::::::::::::::::::: top-level section :::::::::::::::::::::: -->
-
-<xsl:template match="/gamebook/section[@id='title']">
-
-<xsl:choose>
-<xsl:when test="$language='es'">
- <xsl:text>
-%% Two-sided %%
-%\documentclass[letterpaper,12pt,twoside]{book}
-% For european books:
-\documentclass[a4paper,12pt,twoside]{book}
- </xsl:text>
-</xsl:when>
-<xsl:otherwise>
-<xsl:text>
-%% Two-sided %%
-\documentclass[letterpaper,12pt,twoside]{book}
-% For european books:
-%\documentclass[a4paper,12pt,twoside]{book}
-</xsl:text>
-</xsl:otherwise>
-</xsl:choose>
-
-<xsl:text>
-%% One-sided %%
-%\documentclass[letterpaper,12pt,oneside]{book}
-%\documentclass[a4paper,12pt,oneside]{book}
-
- \usepackage[pdftex]{graphicx}
- \usepackage{ifthen}
-</xsl:text>
-<xsl:choose>
-<xsl:when test="$language='es'">
- <xsl:text>
-% Use this if you are compiling spanish PDFs:
-\usepackage[spanish]{babel}
- </xsl:text>
-</xsl:when>
-</xsl:choose>
-<xsl:text>
- %% color info %%
- \usepackage{color}
- \definecolor{titlecolor}{rgb}{</xsl:text><xsl:value-of select="$title-color" /><xsl:text>}
- \definecolor{lightgray}{gray}{0.75}
-
- %% headers and footers %%
- \usepackage{fancyhdr}
-
- \renewcommand{\chaptermark}[1]{}
- \renewcommand{\sectionmark}[1]{}
- \fancyhf{}
-
- \ifthenelse{\boolean{@twoside}}%
- {%% Two-sided %%
- \fancyhead[CO]{\iffloatpage{}{</xsl:text><xsl:value-of select="/gamebook/meta/creator[@class='short']" /><xsl:text>}}
- \fancyhead[CE]{\iffloatpage{}{\bfseries </xsl:text><xsl:value-of select="/gamebook/meta/title[1]" /><xsl:text>}}
- \fancyhead[LO,RE]{\iffloatpage{}{\thepage}}}
- {%% One-sided %%
- \fancyhead[C]{\iffloatpage{}{\bfseries{</xsl:text><xsl:value-of select="/gamebook/meta/title[1]" /><xsl:text>:} \normalfont{</xsl:text><xsl:value-of select="/gamebook/meta/creator[@class='short']" /><xsl:text>}}}
- \fancyhead[R]{\iffloatpage{}{\thepage}}}
- \renewcommand{\headrulewidth}{\iffloatpage{0pt}{0.4pt}}
-
- \fancypagestyle{plain}{
- \fancyhf{}
- \renewcommand{\headrulewidth}{0pt}
- }
-
- \fancypagestyle{empty}{
- \fancyhf{}
- \renewcommand{\headrulewidth}{0pt}
- }
-
- %% hyper-references %%
- \usepackage[pdftex,colorlinks=true,linkcolor=black,bookmarks=false]{hyperref}
-
- %% custom style info %%
- \setlength{\parindent}{0pt}
- \setlength{\parskip}{1em}
- \setlength{\headheight}{18pt}
- \addtolength{\headwidth}{\marginparwidth}
- \addtolength{\headwidth}{\marginparsep}
- \setlength{\textheight}{44\baselineskip}
- \ifthenelse{\lengthtest{\paperwidth = 210mm}}%
- {%% if A4 (210.0 mm x 297.0 mm)
- \addtolength{\topmargin}{-1\baselineskip}}%
- {%% else if letter (8.5" x 11" == 215.9 mm x 279.4 mm)
- \addtolength{\topmargin}{-2.5\baselineskip}}
-
- %% TrueType font %%
- \usepackage[T1]{fontenc}
- % NOTE: This font might not ve available. Uncomment if you have it configured
- % for your LaTeX fonts:
- %\usepackage{souvenir}
- %\renewcommand{\rmdefault}{souvnrttf}
-
- \raggedbottom
-
- %% new environments %%
- \newenvironment{aonchoice}{\begin{list}{}{\setlength{\topsep}{0pt}} \item}{\end{list}}
- \newenvironment{aoncombat}{\begin{list}{}{\setlength{\topsep}{0pt}} \item}{\end{list}}
- \newenvironment{aonitemize}{\begin{list}{}{\setlength{\topsep}{0pt} \setlength{\parsep}{0pt} \setlength{\itemsep}{0pt}}}{\end{list}}
- \newenvironment{aonordereditemize}{\begin{list}{\arabic{aoncounter}.}{\usecounter{aoncounter} \setlength{\topsep}{0pt} \setlength{\parsep}{0pt} \setlength{\itemsep}{0pt}}}{\end{list}}
- \newcounter{aoncounter}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\begin{document}
-
-\begin{titlepage}
-
- \vspace*{\stretch{0.7}}
- \begin{center}
- \Huge{\textcolor{titlecolor}{\textbf{</xsl:text><xsl:value-of select="/gamebook/meta/title[1]" /><xsl:text>}}} \vspace{-0.8em}\\
-
- \vspace*{\stretch{1}}
- \normalsize{</xsl:text><xsl:apply-templates select="/gamebook/meta/creator[@class='medium']" /><xsl:text>}
- \end{center}
- \vspace*{\stretch{1.3}}
-
- \pagestyle{empty}
-
- \newpage
-
- \vspace*{\stretch{1}}
-
- </xsl:text>
- <xsl:apply-templates select="/gamebook/meta/rights[@class='license-notification']" />
-
- <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: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: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: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: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: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: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: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: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: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: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: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: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:otherwise>
- </xsl:choose>
- <xsl:text> </xsl:text>
- <xsl:value-of select="/gamebook/meta/date[@class='publication']/year" />
- <xsl:text>
-
- </xsl:text>
- <xsl:apply-templates select="/gamebook/meta/description[@class='publication']" />
- <xsl:text>
-
- \vspace*{\stretch{3}}
-
- \pagestyle{empty}
-
-\end{titlepage}
-
-\clearpage{\pagestyle{empty}\cleardoublepage}
-
- \vspace*{\stretch{1}}
-
- \thispagestyle{empty}
- </xsl:text>
- <xsl:apply-templates select="/gamebook/meta/description[@class='blurb']" />
- <xsl:apply-templates select="/gamebook/meta/creator[@class='long']" />
- <xsl:text>
-
- \vspace*{\stretch{3}}
-
-\clearpage{\pagestyle{empty}\cleardoublepage}
-
- \pagestyle{fancy}
-
-\begin{frontmatter}
-</xsl:text>
-
- <xsl:apply-templates select="data/section[@class='frontmatter']" />
-
-<xsl:text>
-\end{frontmatter}
-
-</xsl:text>
-<xsl:if test="data/section[@class='mainmatter']">
- <xsl:text>\begin{mainmatter}
-
- </xsl:text>
-
- <xsl:apply-templates select="data/section[@class='mainmatter']" />
-
- <xsl:text>
- \end{mainmatter}
- </xsl:text>
-</xsl:if>
-
-<xsl:if test="data/section[@class='numbered']">
- <xsl:apply-templates select="data/section[@class='numbered']" />
-</xsl:if>
-
- <xsl:text>
-\begin{backmatter}
-\ifthenelse{\boolean{@twoside}}%
- {%% Two-sided %%
- \fancyhead[RO,LE]{}}
- {%% One-sided %%
- \fancyhead[R]{}}
-
- \setcounter{topnumber}{6}
- \renewcommand{\topfraction}{1}
- \renewcommand{\textfraction}{0}
- \setlength{\floatsep}{10pt}
-
- </xsl:text>
- <xsl:apply-templates select="data/section[@class='backmatter']" />
- <xsl:text>
-
-\end{backmatter}
-
-\end{document}
-</xsl:text>
-
-</xsl:template>
-
-<xsl:template match="/gamebook/section[@id='toc']" />
-
-<xsl:template match="section" />
-
-<!-- ::::::::::: second-level frontmatter sections :::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='frontmatter']">
-
- <xsl:text>\clearpage{\pagestyle{empty}\cleardoublepage}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:text>{\huge \hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\addcontentsline{toc}{section}{\protect\numberline{}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-
-</xsl:template>
-
-<!-- :::::::::::: third-level front matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='frontmatter']">
-
- <xsl:text>{\LARGE \hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='frontmatter-separate']">
-
- <xsl:text>\newpage</xsl:text><xsl:value-of select="$newline" />
- <xsl:text>{\LARGE \hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\addcontentsline{toc}{subsection}{\protect\numberline{}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- :::::::::::: fourth-level front matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='frontmatter']">
- <xsl:text>{\Large \hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::::: fifth-level front matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section/data/section[@class='frontmatter']">
- <xsl:text>{\large \hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::: second-level main matter sections :::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='mainmatter']">
- <xsl:text>\clearpage{\pagestyle{empty}\cleardoublepage}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:text>{\huge \hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\addcontentsline{toc}{section}{\protect\numberline{}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-
-</xsl:template>
-
-<!-- :::::::::::: third-level main matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='mainmatter'] | /gamebook/section/data/section/data/section[@class='mainmatter-separate']">
-
- <xsl:text>\newpage</xsl:text><xsl:value-of select="$newline" />
- <xsl:text>{\LARGE \hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\addcontentsline{toc}{subsection}{\protect\numberline{}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- :::::::::::: fourth-level main matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='mainmatter'] | /gamebook/section/data/section/data/section/data/section[@class='mainmatter-separate']">
- <xsl:text>{\Large \hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::::: fifth-level main matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section/data/section[@class='mainmatter']">
- <xsl:text>{\large \hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- :::::::::::: third-level glossary sections ::::::::::::: -->
-<!-- Glossary sections should be contained in a second level section. -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='glossary'] | /gamebook/section/data/section/data/section[@class='glossary-separate']">
-
- <xsl:text>\newpage</xsl:text><xsl:value-of select="$newline" />
- <xsl:text>{\LARGE \hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- :::::::::::::::::: numbered sections ::::::::::::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='numbered']">
- <xsl:text>\clearpage{\pagestyle{empty}\cleardoublepage}</xsl:text> <xsl:value-of select="$newparagraph" />
-
- <xsl:if test="position() = 1">
- <xsl:text>\newcommand{\aonmarks}{
- \ifthenelse{\equal{\leftmark}{\rightmark}}
- {\rightmark}
- {\rightmark{} - \leftmark}
- \ifthenelse{\boolean{@twoside}}%
- {%% Two-sided %%
- \fancyhead[RO,LE]{\iffloatpage{}{\large{\bfseries \aonmarks}}}
- \fancyhead[LO,RE]{\iffloatpage{}{\thepage}}}
- {%% One-sided %%
- \fancyhead[R]{\iffloatpage{}{\large{\bfseries \aonmarks}}}
- \fancyhead[L]{\iffloatpage{}{\thepage}}%
- }
- }</xsl:text> <xsl:value-of select="$newparagraph" />
- </xsl:if>
-
- <xsl:if test="not( self::node()[@id='numbered'] )">
- <xsl:text>{\huge \hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newline" />
- </xsl:if>
- <xsl:text>\addcontentsline{toc}{section}{\protect\numberline{}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-
- <xsl:value-of select="$newparagraph" />
- <xsl:text>\clearpage{\pagestyle{empty}\cleardoublepage}</xsl:text>
-</xsl:template>
-
-<xsl:template match="/gamebook/section/data/section[@class='numbered']/data/section[@class='numbered']">
- <xsl:variable name="section-title" select="meta/title[1]" />
-
-<xsl:value-of select="$newline" />
-<xsl:text>\vspace{\parskip} \hypertarget{</xsl:text>
-<xsl:value-of select="@id" />
-<xsl:text>}{} \hspace*{\fill} \markboth{</xsl:text>
-<xsl:value-of select="$section-title" />
-<xsl:text>}{</xsl:text>
-<xsl:value-of select="$section-title" />
-<xsl:text>} {\Large \bfseries </xsl:text>
-<xsl:value-of select="$section-title" />
-<xsl:text>} \hspace*{\fill}\\*[\parskip]</xsl:text>
-<xsl:value-of select="$newline" />
-
-<xsl:for-each select="data/illustration[@class='float' and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )]">
- <xsl:text>\hspace*{\fill} \mbox{\itshape \hyperlink{ill</xsl:text>
- <xsl:number count="illustration[@class='float' and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )]" from="/" level="any" format="1" />
- <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:text>}}\hspace*{\fill}\\*[\parskip]</xsl:text>
-</xsl:for-each>
-
- <xsl:apply-templates />
-
-</xsl:template>
-
-<!-- :::::::::::: second-level backmatter sections :::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='backmatter']">
-
- <xsl:text>\clearpage{}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:text>{\huge \hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\addcontentsline{toc}{section}{\protect\numberline{}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::::: third-level back matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='backmatter']">
- <xsl:text>{\LARGE \hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::::: fourth-level back matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='backmatter']">
- <xsl:text>{\Large \hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- :::::::::::::::::: dedication template ::::::::::::::::::::: -->
-
-<xsl:template match="id( 'dedicate' )">
-
- <xsl:text>\vspace*{\stretch{1}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
- <xsl:text>\begin{center}</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\thispagestyle{empty}</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\itshape </xsl:text>
- <xsl:apply-templates select="data/p" />
- <xsl:value-of select="$newline" />
- <xsl:text>\end{center}</xsl:text>
- <xsl:value-of select="$newparagraph" />
- <xsl:text>\vspace*{\stretch{3}}</xsl:text>
- <xsl:value-of select="$newline" />
-
- <xsl:text>\clearpage{\pagestyle{empty}\cleardoublepage}</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\tableofcontents</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\clearpage{\pagestyle{empty}\cleardoublepage}</xsl:text>
- <xsl:value-of select="$newline" />
-
- <xsl:text>\setcounter{page}{1}</xsl:text><xsl:value-of select="$newline" />
- <xsl:text>\pagenumbering{arabic}</xsl:text><xsl:value-of select="$newline" />
-
-</xsl:template>
-
-<!-- ::::::::::::::::::::: map template ::::::::::::::::::::::::: -->
-
-<xsl:template match="id( 'map' )">
- <xsl:variable name="map-title" select="meta/title" />
-
- <xsl:text>\clearpage{\pagestyle{empty}\cleardoublepage}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:for-each select="data/illustration[contains( $use-illustrators, concat( ':', meta/creator, ':' ) ) ]">
- <xsl:variable name="illustration-src" select="instance[@class='pdf']/@src" />
-
- <xsl:text>\hypertarget{map}{map}</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\addcontentsline{toc}{section}{\protect\numberline{}{</xsl:text>
- <xsl:value-of select="$map-title" />
- <xsl:text>}}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
-<!-- <xsl:value-of select="$newline" />
- <xsl:text>\begin{figure}[!h]</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\centering</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\thispagestyle{empty}</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\rotatebox{90}{\includegraphics[width=550pt,keepaspectratio]{</xsl:text><xsl:value-of select="$illustration-src" /><xsl:text>}}%</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\end{figure}</xsl:text> -->
-
- <xsl:text>\thispagestyle{empty}</xsl:text><xsl:value-of select="$newline" />
- <xsl:text>\newlength{\saveunitlength}</xsl:text><xsl:value-of select="$newline" />
- <xsl:text>\setlength{\saveunitlength}{\unitlength}</xsl:text><xsl:value-of select="$newline" />
- <xsl:text>\setlength{\unitlength}{1mm}</xsl:text><xsl:value-of select="$newline" />
- <xsl:text>\ifthenelse{\boolean{@twoside}}%</xsl:text><xsl:value-of select="$newline" />
- <xsl:text> {%% Two-sided %%</xsl:text><xsl:value-of select="$newline" />
- <xsl:text> \begin{picture}(10,10)</xsl:text><xsl:value-of select="$newline" />
- <xsl:text> \put(-23,-188){\includegraphics[angle=90,origin=c,width=20cm,height=28cm,keepaspectratio]{map.pdf}}</xsl:text><xsl:value-of select="$newline" />
- <xsl:text> \end{picture}}%</xsl:text><xsl:value-of select="$newline" />
- <xsl:text> {%% One-sided %%</xsl:text><xsl:value-of select="$newline" />
- <xsl:text> \begin{picture}(10,10)</xsl:text><xsl:value-of select="$newline" />
- <xsl:text> \put(-29,-188){\includegraphics[angle=90,origin=c,width=20cm,height=28cm,keepaspectratio]{map.pdf}}</xsl:text><xsl:value-of select="$newline" />
- <xsl:text> \end{picture}}</xsl:text><xsl:value-of select="$newline" />
- <xsl:text>\setlength{\unitlength}{\saveunitlength}</xsl:text><xsl:value-of select="$newline" />
-
- </xsl:for-each>
-</xsl:template>
-
-<!-- ==================== block elements ======================== -->
-
-<xsl:template match="p">
- <xsl:apply-templates />
- <xsl:value-of select="$newparagraph" />
-</xsl:template>
-
-<xsl:template match="ul">
- <xsl:text>\begin{aonitemize}</xsl:text><xsl:value-of select="$newline" />
- <xsl:apply-templates />
- <xsl:text>\end{aonitemize}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-</xsl:template>
-
-<xsl:template match="ul[@class='unbulleted']">
- <xsl:text>\begin{aonitemize}</xsl:text><xsl:value-of select="$newline" />
- <xsl:apply-templates />
- <xsl:text>\end{aonitemize}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-</xsl:template>
-
-<xsl:template match="ol">
- <xsl:text>\begin{enumerate}</xsl:text><xsl:value-of select="$newline" />
- <xsl:apply-templates />
- <xsl:text>\end{enumerate}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-</xsl:template>
-
-<xsl:template match="dl">
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="table">
- <xsl:text>\begin{tabular}{*{</xsl:text>
- <xsl:for-each select="tr[1]">
- <xsl:for-each select="th[1]">
- <xsl:number count="th" />
- </xsl:for-each>
- </xsl:for-each>
- <xsl:text>}{l}}</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:apply-templates />
- <xsl:text>\end{tabular}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-</xsl:template>
-
-<xsl:template match="tr">
- <xsl:apply-templates />
- <xsl:text> \\</xsl:text>
-</xsl:template>
-
-<xsl:template match="th">
- <xsl:text>\multicolumn{1}{</xsl:text>
- <xsl:choose>
- <xsl:when test="@align='left'"><xsl:text>l}{\bfseries </xsl:text></xsl:when>
- <xsl:when test="@align='right'"><xsl:text>r}{\bfseries </xsl:text></xsl:when>
- <xsl:when test="@align='center'"><xsl:text>c}{\bfseries </xsl:text></xsl:when>
- <xsl:otherwise><xsl:text>l}{\bfseries </xsl:text></xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates />
- <xsl:text>} </xsl:text>
- <xsl:if test="position != last()"><xsl:text>&</xsl:text></xsl:if>
-</xsl:template>
-
-<xsl:template match="td">
- <xsl:text>\multicolumn{1}{</xsl:text>
- <xsl:choose>
- <xsl:when test="@align='left'"><xsl:text>l}{</xsl:text></xsl:when>
- <xsl:when test="@align='right'"><xsl:text>r}{</xsl:text></xsl:when>
- <xsl:when test="@align='center'"><xsl:text>c}{</xsl:text></xsl:when>
- <xsl:otherwise><xsl:text>l}{</xsl:text></xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates />
- <xsl:text>} </xsl:text>
- <xsl:if test="position != last()"><xsl:text>&</xsl:text></xsl:if>
-</xsl:template>
-
-<xsl:template match="combat">
- <xsl:text>\begin{aoncombat}</xsl:text>
- <xsl:apply-templates select="enemy" />
- <xsl:choose>
- <xsl:when test="enemy-attribute[@class='combatskill']">
- <xsl:choose>
- <xsl:when test="$language='es'">
- <xsl:text>: {\small DESTREZA~EN~EL~COMBATE}~</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>: {\small COMBAT~SKILL}~</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="enemy-attribute[@class='combatskill']" />
- </xsl:when>
- <xsl:when test="enemy-attribute[@class='closecombatskill']">
- <xsl:choose>
- <xsl:when test="$language='es'">
- <xsl:text>: {\small DESTREZA~EN~EL~COMBATE~DE~PROXIMIDAD}~</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>: {\small CLOSE~COMBAT~SKILL}~</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="enemy-attribute[@class='closecombatskill']" />
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="$language='es'">
- <xsl:text> ~~{\small RESISTENCIA}~</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text> ~~{\small ENDURANCE}~</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="enemy-attribute[@class='target']">
- <xsl:choose>
- <xsl:when test="$language='es'">
- <xsl:text>~(puntos~de~{\small OBJETIVO})~</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>~({\small TARGET}~points)~</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="enemy-attribute[@class='target']" />
- </xsl:when>
- <xsl:when test="enemy-attribute[@class='resistance']">
- <xsl:choose>
- <xsl:when test="$language='es'">
- <xsl:text>~(puntos~de~{\small RESISTENCIA})~</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>~({\small RESISTANCE}~points)~</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:value-of select="enemy-attribute[@class='resistance']" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="enemy-attribute[@class='endurance']" />
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>\end{aoncombat}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-</xsl:template>
-
-<xsl:template match="choice">
- <xsl:variable name="link">
- <xsl:value-of select="@idref" />
- </xsl:variable>
-
- <xsl:text>\begin{aonchoice}</xsl:text>
- <xsl:for-each select="* | text()">
- <xsl:choose>
- <xsl:when test="self::link-text">
- <xsl:text>\hyperlink{</xsl:text>
- <xsl:value-of select="$link" />
- <xsl:text>}{\bfseries </xsl:text>
- <xsl:apply-templates />
- <xsl:text>}</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <xsl:text>\end{aonchoice}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-</xsl:template>
-
-<xsl:template match="signpost">
- <xsl:text>\begin{center}</xsl:text><xsl:apply-templates /><xsl:text>\end{center}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-</xsl:template>
-
-<xsl:template match="blockquote">
- <xsl:text>\begin{quote}</xsl:text><xsl:apply-templates /><xsl:text>\end{quote}</xsl:text>
- <xsl:value-of select="$newparagraph" />
-</xsl:template>
-
-<xsl:template match="illustration">
- <xsl:choose>
- <xsl:when test="instance[@class='pdf'] and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
- <xsl:text>\begin{figure}[</xsl:text>
- <xsl:choose>
- <xsl:when test="@class='inline'">!ht</xsl:when>
- <xsl:when test="@class='float'">p</xsl:when>
- <xsl:when test="@class='accent'">bt</xsl:when>
- <xsl:otherwise><xsl:text>invalid class</xsl:text></xsl:otherwise>
- </xsl:choose>
- <xsl:text>]</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\centering</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\includegraphics</xsl:text>
- <xsl:if test="@class='float'">
- <!--<xsl:text>[width=\textwidth,keepaspectratio]</xsl:text>-->
- <xsl:text>[width=\textwidth,height=570pt,keepaspectratio]</xsl:text>
- </xsl:if>
- <xsl:text>{</xsl:text>
- <xsl:value-of select="instance[@class='pdf']/@src" />
- <xsl:text>} %</xsl:text>
- <xsl:if test="@class='float'">
- <xsl:value-of select="$newline" />
- <xsl:text>\vspace*{\fill}</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\\ \mbox{ \hypertarget{ill</xsl:text>
- <xsl:number count="illustration[@class='float' and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )]" from="/" level="any" format="1" />
- <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:text>}}\\[1em]{\itshape </xsl:text>
- <xsl:apply-templates select="meta/description" />
- <xsl:text>}</xsl:text>
- </xsl:if>
- <xsl:value-of select="$newline" />
- <xsl:text>\end{figure}</xsl:text>
- <xsl:value-of select="$newline" />
- </xsl:when>
-
- <xsl:when test="instance[@class='tex'] and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
- <xsl:value-of select="$newline" />
- <xsl:text>\begin{figure}[!h]</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\centering</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\input{</xsl:text><xsl:value-of select="instance[@class='tex']/@src" /><xsl:text>}</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\end{figure}</xsl:text>
- <xsl:value-of select="$newline" />
-
- <xsl:text>\clearpage{}</xsl:text>
- <xsl:value-of select="$newparagraph" />
- </xsl:when>
-
- <xsl:otherwise />
-
- </xsl:choose>
-</xsl:template>
-
-<xsl:template match="instance" />
-
-<xsl:template match="footnotes" />
-
-<xsl:template match="footnote">
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="hr">
- <xsl:text>\rule{\textwidth}{0.4pt}</xsl:text>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="dt">
- <xsl:text>{\bfseries </xsl:text><xsl:apply-templates /><xsl:text>}\\*\\*</xsl:text>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="dd">
- <xsl:apply-templates />
- <xsl:value-of select="$newparagraph" />
-</xsl:template>
-
-<xsl:template match="li">
- <xsl:text>\item </xsl:text><xsl:apply-templates />
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<!-- ==================== inline elements ======================= -->
-
-<xsl:template match="a">
- <xsl:if test="@idref">
- <xsl:text>\hyperlink{</xsl:text>
- <xsl:value-of select="@idref" />
- <xsl:text>}{</xsl:text>
- </xsl:if>
- <xsl:if test="@id">
- <xsl:text>\hypertarget{</xsl:text>
- <xsl:value-of select="@id" />
- <xsl:text>}{</xsl:text>
- </xsl:if>
-
- <xsl:apply-templates />
-
- <xsl:if test="@idref">
- <xsl:text>}</xsl:text>
- </xsl:if>
- <xsl:if test="@id">
- <xsl:text>}</xsl:text>
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="a[@class='footnote']">
- <xsl:apply-templates />
- <xsl:text>\footnote{</xsl:text>
- <xsl:for-each select="id( @idref )">
- <xsl:apply-templates />
- </xsl:for-each>
- <xsl:text>}</xsl:text>
-</xsl:template>
-
-<xsl:template match="em">
- <xsl:text>\emph{</xsl:text><xsl:apply-templates /><xsl:text>}</xsl:text>
-</xsl:template>
-
-<xsl:template match="strong">
- <xsl:text>{\bfseries </xsl:text><xsl:apply-templates /><xsl:text>}</xsl:text>
-</xsl:template>
-
-<xsl:template match="cite">
- <xsl:text>{\itshape </xsl:text><xsl:apply-templates /><xsl:text>}</xsl:text>
-</xsl:template>
-
-<xsl:template match="thought">
- <xsl:text>{\itshape </xsl:text><xsl:apply-templates /><xsl:text>}</xsl:text>
-</xsl:template>
-
-<xsl:template match="onomatopoeia">
- <xsl:text>{\itshape </xsl:text><xsl:apply-templates /><xsl:text>}</xsl:text>
-</xsl:template>
-
-<xsl:template match="spell">
- <xsl:text>{\itshape </xsl:text><xsl:apply-templates /><xsl:text>}</xsl:text>
-</xsl:template>
-
-<xsl:template match="item">
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="foreign">
- <xsl:text>{\itshape </xsl:text><xsl:apply-templates /><xsl:text>}</xsl:text>
-</xsl:template>
-
-<xsl:template match="quote">
- <xsl:text>&lsquot;</xsl:text>
- <xsl:apply-templates />
- <xsl:if test="not(self::*[@class='open-ended'])"><xsl:text>&rsquot;</xsl:text></xsl:if>
-</xsl:template>
-
-<xsl:template match="quote//quote">
- <xsl:text>&ldquot;</xsl:text>
- <xsl:apply-templates />
- <xsl:if test="not(self::*[@class='open-ended'])"><xsl:text>&rdquot;</xsl:text></xsl:if>
-</xsl:template>
-
-<xsl:template match="code">
- <xsl:text>{\ttfamily </xsl:text><xsl:apply-templates /><xsl:text>}</xsl:text>
-</xsl:template>
-
-<xsl:template match="br">
- <xsl:text>\\</xsl:text>
-</xsl:template>
-
-<xsl:template match="typ[@class='attribute']">
- <xsl:text>{\small </xsl:text><xsl:apply-templates /><xsl:text>}</xsl:text>
-</xsl:template>
-
-<xsl:template match="footnote//typ[@class='attribute']">
- <xsl:text>{\scriptsize </xsl:text><xsl:apply-templates /><xsl:text>}</xsl:text>
-</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.
-
--->
-
-<!-- JFS: TODO - probably the \definitions need to be in {} to prevent
- issues if followed by text -->
-
-<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>{\textexclamdown}</xsl:text></xsl:template><!-- inverted exclamation mark, U+00A1 ISOnum -->
-<xsl:template match="ch.cent"><xsl:text>\textcent</xsl:text></xsl:template><!-- cent sign, U+00A2 ISOnum -->
-<xsl:template match="ch.pound"><xsl:text>\pounds</xsl:text></xsl:template><!-- pound sign, U+00A3 ISOnum -->
-<xsl:template match="ch.curren"><xsl:text>\textcurrency</xsl:text></xsl:template><!-- currency sign, U+00A4 ISOnum -->
-<xsl:template match="ch.yen"><xsl:text>\textyen</xsl:text></xsl:template><!-- yen sign = yuan sign, U+00A5 ISOnum -->
-<xsl:template match="ch.brvbar"><xsl:text>\textbar</xsl:text></xsl:template><!-- broken bar = broken vertical bar, U+00A6 ISOnum -->
-<xsl:template match="ch.sect"><xsl:text>\textsection</xsl:text></xsl:template><!-- section sign, U+00A7 ISOnum -->
-<xsl:template match="ch.uml"><xsl:text>\ddot{}</xsl:text></xsl:template><!-- diaeresis = spacing diaeresis, U+00A8 ISOdia -->
-<xsl:template match="ch.copy"><xsl:text>\copyright</xsl:text></xsl:template><!-- copyright sign, U+00A9 ISOnum -->
-<xsl:template match="ch.ordf"><xsl:text>\textordfeminine</xsl:text></xsl:template><!-- feminine ordinal indicator, U+00AA ISOnum -->
-<xsl:template match="ch.laquo"><xsl:text>{\guillemotleft}</xsl:text></xsl:template><!-- left-pointing double angle quotation mark = left pointing guillemet, U+00AB ISOnum -->
-<xsl:template match="ch.not"><xsl:text>\textlnot</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>{\texttrademark}</xsl:text></xsl:template><!-- registered sign = registered trade mark sign, U+00AE ISOnum -->
-<xsl:template match="ch.macr"><xsl:text>\textasciimacron</xsl:text></xsl:template><!-- macron = spacing macron = overline = APL overbar, U+00AF ISOdia -->
-<xsl:template match="ch.deg"><xsl:text>\textdegree</xsl:text></xsl:template><!-- degree sign, U+00B0 ISOnum -->
-<xsl:template match="ch.plusmn"><xsl:text>\textpm</xsl:text></xsl:template><!-- plus-minus sign = plus-or-minus sign, U+00B1 ISOnum -->
-<xsl:template match="ch.sup2"><xsl:text>^2</xsl:text></xsl:template><!-- superscript two = superscript digit two = squared, U+00B2 ISOnum -->
-<xsl:template match="ch.sup3"><xsl:text>^3</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>\textmu</xsl:text></xsl:template><!-- micro sign, U+00B5 ISOnum -->
-<xsl:template match="ch.para"><xsl:text>\textparagraph</xsl:text></xsl:template><!-- pilcrow sign = paragraph sign, U+00B6 ISOnum -->
-<xsl:template match="ch.middot"><xsl:text>\textperiodcentered</xsl:text></xsl:template><!-- middle dot = Georgian comma = Greek middle dot, U+00B7 ISOnum -->
-<xsl:template match="ch.cedil"><xsl:text>\c{c}</xsl:text></xsl:template><!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
-<xsl:template match="ch.sup1"><xsl:text>^1</xsl:text></xsl:template><!-- superscript one = superscript digit one, U+00B9 ISOnum -->
-<xsl:template match="ch.ordm"><xsl:text>\textordmasculine</xsl:text></xsl:template><!-- masculine ordinal indicator, U+00BA ISOnum -->
-<xsl:template match="ch.raquo"><xsl:text>{\guillemotright}</xsl:text></xsl:template><!-- right-pointing double angle quotation mark = right pointing guillemet, U+00BB ISOnum -->
-<xsl:template match="ch.frac14"><xsl:text>\frac{1}{4}</xsl:text></xsl:template><!-- vulgar fraction one quarter = fraction one quarter, U+00BC ISOnum -->
-<xsl:template match="ch.frac12"><xsl:text>\frac{1}{2}</xsl:text></xsl:template><!-- vulgar fraction one half = fraction one half, U+00BD ISOnum -->
-<xsl:template match="ch.frac34"><xsl:text>\frac{3}{4}</xsl:text></xsl:template><!-- vulgar fraction three quarters = fraction three quarters, U+00BE ISOnum -->
-<xsl:template match="ch.iquest"><xsl:text>{\textquestiondown}</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">\textquoteleft</xsl:template><!-- opening left quotation mark -->
-<xsl:template match="ch.rsquot">\textquoteright</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.emdash">\-</xsl:template><!-- emdash -->
-<xsl:template match="ch.ellips"> \ldots </xsl:template><!-- ellipsis -->
-<xsl:template match="ch.lellips">\ldots </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 ======================= -->
-
-<!--
- A "subroutine" to generate a link to the current section, with the section title (expanded with "Section " in case of a numbered section) as link text.
--->
-<xsl:template name="section-title-link">
- <!-- will the list always contain the closest ancestor first? -->
- <xsl:variable name="section-title">
- <!-- numbered or not? -->
- <xsl:if test="ancestor::section[position()=1]/@class='numbered'">
- <xsl:choose>
- <xsl:when test="$language='es'">
- <xsl:text>Sección </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>Section </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <xsl:apply-templates select="ancestor::section[position()=1]/meta/title[1]" />
- </xsl:variable>
-
- <a>
- <xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="ancestor::section[position()=1]/@id" /></xsl:attribute>
- <xsl:value-of select="$section-title" />
- </a>
-</xsl:template>
-
-</xsl:transform>
+++ /dev/null
-<?xml version="1.0"?>
-<!DOCTYPE xsl:transform [
- <!ENTITY % pml.characters SYSTEM "pmlchar.mod">
- %pml.characters;
-]>
-
-<!--
-
-$Id$
-
-$Log$
-Revision 1.2 2005/04/09 19:51:50 angantyr
-Added handling of open-ended quotes.
-
-Revision 1.1 2005/01/30 01:32:52 jonathan.blake
-Initial freepository revision of XML support documents.
-
-Revision 1.2 2003/01/07 16:55:28 jblake
-Restarted work from base xhtml.xsl.
-
-
--->
-
-<xsl:transform version="1.0"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:lxslt="http://xml.apache.org/xslt">
-
-<xsl:output method="text" encoding="ISO-8859-1" />
-
-<xsl:strip-space elements="gamebook section meta data ol ul dl li dd footnotes footnote illustration instance" />
-<xsl:preserve-space elements="p choice" />
-
-<!-- ====================== parameters ========================== -->
-
-<xsl:param name="use-illustrators" />
-
-<!-- ======================= variables ========================== -->
-
-<xsl:variable name="newline">
-<xsl:text>
-</xsl:text>
-</xsl:variable>
-
-<xsl:variable name="newparagraph">
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-</xsl:variable>
-
-<xsl:variable name="newpage">
- <xsl:value-of select="$newline" />
- <xsl:text>\p</xsl:text>
-</xsl:variable>
-
-<!-- ======================== Templates ========================= -->
-
-<!-- ================= hierarchical sections ==================== -->
-
-<xsl:template match="meta" />
-
-<!-- ::::::::::::::::::: top-level section :::::::::::::::::::::: -->
-
-<xsl:template match="/gamebook/section[@id='title']">
- <xsl:text>\vTITLE="</xsl:text><xsl:value-of select="/gamebook/meta/title" /><xsl:text>"\v</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:text>\X0\l\B</xsl:text>
- <xsl:text>\c</xsl:text>
- <xsl:value-of select="/gamebook/meta/title" />
- <xsl:value-of select="$newline" />
- <xsl:text>\c</xsl:text>
- <xsl:text>\B\l\X0</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:text>\c</xsl:text>
- <xsl:apply-templates select="/gamebook/meta/creator[@class='medium']" />
- <xsl:value-of select="$newline" />
- <xsl:text>\c</xsl:text>
-
- <xsl:value-of select="$newpage" />
-
- <xsl:apply-templates select="/gamebook/meta/rights[@class='license-notification']" />
-
- <xsl:value-of select="$newparagraph" />
- <xsl:text>Publication Date: </xsl:text>
- <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:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 2">
- <xsl:text>February</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 3">
- <xsl:text>March</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 4">
- <xsl:text>April</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 5">
- <xsl:text>May</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 6">
- <xsl:text>June</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 7">
- <xsl:text>July</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 8">
- <xsl:text>August</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 9">
- <xsl:text>September</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 10">
- <xsl:text>October</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 11">
- <xsl:text>November</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 12">
- <xsl:text>December</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>Invalid Month</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text> </xsl:text>
-
- <xsl:value-of select="/gamebook/meta/date[@class='publication']/year" />
-
- <xsl:value-of select="$newparagraph" />
- <xsl:apply-templates select="/gamebook/meta/description[@class='publication']" />
-
- <xsl:if test="data/section[@class='frontmatter']">
- <xsl:apply-templates select="data/section[@class='frontmatter']" />
- </xsl:if>
-
- <xsl:if test="data/section[@class='mainmatter']">
- <xsl:apply-templates select="data/section[@class='mainmatter']" />
- </xsl:if>
-
- <xsl:if test="data/section[@class='numbered']">
- <xsl:apply-templates select="data/section[@class='numbered']" />
- </xsl:if>
-
- <xsl:if test="data/section[@class='backmatter']">
- <xsl:apply-templates select="data/section[@class='backmatter']" />
- </xsl:if>
-
- <xsl:for-each select="//footnote">
- <xsl:value-of select="$newparagraph" />
- <xsl:text><footnote id="</xsl:text><xsl:value-of select="@id" /><xsl:text>"></xsl:text>
- <xsl:text>[</xsl:text><xsl:number count="footnote" from="/" level="any" format="1" /><xsl:text>]</xsl:text>
- <xsl:apply-templates />
- <xsl:text></footnote></xsl:text>
- </xsl:for-each>
-
-</xsl:template>
-
-<xsl:template match="/gamebook/section[@id='toc']" />
-
-<xsl:template match="section" />
-
-<!-- ::::::::::: second-level frontmatter sections :::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='frontmatter']">
- <xsl:value-of select="$newpage" />
-
- <xsl:text>\X1\l\B\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\B\l\X1</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- :::::::::::: third-level front matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='frontmatter-separate']">
- <xsl:value-of select="$newpage" />
- <xsl:text>\X2\l\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\l\X2</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='frontmatter']">
- <xsl:text>\l\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\l</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<!-- :::::::::::: fourth-level front matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='frontmatter']">
- <xsl:text>\B\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\B</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<!-- ::::::::::::: fifth-level front matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section/data/section[@class='frontmatter']">
- <xsl:text>\Q{</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<!-- ::::::::::: second-level main matter sections :::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='mainmatter']">
- <xsl:value-of select="$newpage" />
- <xsl:text>\X1\l\B\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\B\l\X1</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- :::::::::::: third-level main matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='mainmatter-separate']">
- <xsl:value-of select="$newpage" />
- <xsl:text>\X2\l\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\l\X2</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='mainmatter']">
- <xsl:text>\l\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\l</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<!-- :::::::::::: fourth-level main matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='mainmatter-separate']">
- <xsl:text>\B\Q="</xsl:text><xsl:value-of select="@id" />><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\B</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='mainmatter']">
- <xsl:text>\B\Q="</xsl:text><xsl:value-of select="@id" />><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\B</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<!-- ::::::::::::: fifth-level main matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section/data/section[@class='mainmatter']">
- <xsl:text>\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<!-- :::::::::::: third-level glossary sections ::::::::::::: -->
-<!-- Glossary sections should be contained in a second level section. -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='glossary-separate']">
- <xsl:value-of select="$newpage" />
- <xsl:text>\X2\l\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\l\X2</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='glossary']">
- <xsl:text>\l\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\l</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<!-- :::::::::::::::::: numbered sections ::::::::::::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='numbered']">
- <xsl:value-of select="$newpage" />
- <xsl:text>\X1\l\B\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\B\l\X1</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="/gamebook/section/data/section[@class='numbered']/data/section[@class='numbered']">
- <xsl:value-of select="$newpage" />
- <xsl:text>\c\l\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\l</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\c</xsl:text><xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
- <xsl:value-of select="$newparagraph" />
- <xsl:text>\w="50%"</xsl:text>
-</xsl:template>
-
-<!-- :::::::::::: second-level backmatter sections :::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='backmatter']">
- <xsl:value-of select="$newpage" />
- <xsl:text>\X1\l\B\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\B\l\X1</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::::: third-level back matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='backmatter']">
- <xsl:text>\l\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\l</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<!-- ::::::::::::: fourth-level back matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='backmatter']">
- <xsl:text>\B\Q="</xsl:text><xsl:value-of select="@id" />><xsl:text>"</xsl:text>
- <xsl:value-of select="meta/title" />
- <xsl:text>\B</xsl:text>
- <xsl:value-of select="$newparagraph" />
-
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<!-- :::::::::::::::::: dedication template ::::::::::::::::::::: -->
-
-<xsl:template match="id( 'dedicate' )">
- <!-- PML doesn't allow blank lines at the top of a page without a space -->
- <xsl:value-of select="$newpage" />
- <xsl:text> </xsl:text><xsl:value-of select="$newparagraph" />
- <xsl:text> </xsl:text><xsl:value-of select="$newparagraph" />
- <xsl:text>\c\i</xsl:text>
- <xsl:apply-templates select="data/p" />
- <xsl:text>\i</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\c</xsl:text>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<!-- ==================== block elements ======================== -->
-
-<xsl:template match="p">
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="dd/p | li/p">
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:choose>
- <xsl:when test="following-sibling::illustration">
- <xsl:if test="following-sibling::illustration/instance[@class='text']">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$newparagraph" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="ul | ol | dl">
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="li/ul | li/ol | li/dl | dd/ul | dd/ol | dd/dl">
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="table">
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="tr">
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newline" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="th">
- <xsl:variable name="indent-level" select="count( th | td )" />
- <xsl:choose>
- <xsl:when test="$indent-level = 2"><xsl:text>\T="33%"</xsl:text></xsl:when>
- <xsl:when test="$indent-level = 3"><xsl:text>\T="66%"</xsl:text></xsl:when>
- </xsl:choose>
- <xsl:text>\B</xsl:text><xsl:apply-templates /><xsl:text>\B</xsl:text>
-</xsl:template>
-
-<xsl:template match="td">
- <xsl:variable name="indent-level" select="count( th | td )" />
- <xsl:choose>
- <xsl:when test="$indent-level = 2"><xsl:text>\T="33%"</xsl:text></xsl:when>
- <xsl:when test="$indent-level = 3"><xsl:text>\T="66%"</xsl:text></xsl:when>
- </xsl:choose>
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="combat">
- <xsl:text>\t</xsl:text>
- <xsl:apply-templates select="enemy" />
- <xsl:text>:</xsl:text>
- <xsl:text>\t</xsl:text>
-
- <xsl:value-of select="$newline" />
- <xsl:text>\t </xsl:text>
- <xsl:choose>
- <xsl:when test="enemy-attribute[@class='combatskill']">
- <xsl:text>COMBAT SKILL </xsl:text>
- <xsl:value-of select="enemy-attribute[@class='combatskill']" />
- </xsl:when>
- <xsl:when test="enemy-attribute[@class='closecombatskill']">
- <xsl:text>CLOSE COMBAT SKILL </xsl:text>
- <xsl:value-of select="enemy-attribute[@class='closecombatskill']" />
- </xsl:when>
- </xsl:choose>
- <xsl:text>\t</xsl:text>
-
- <xsl:value-of select="$newline" />
- <xsl:text>\t </xsl:text>
- <xsl:text>ENDURANCE </xsl:text>
- <xsl:choose>
- <xsl:when test="enemy-attribute[@class='target']">
- <xsl:text>(TARGET points) </xsl:text>
- <xsl:value-of select="enemy-attribute[@class='target']" />
- </xsl:when>
- <xsl:when test="enemy-attribute[@class='resistance']">
- <xsl:text>(RESISTANCE points) </xsl:text>
- <xsl:value-of select="enemy-attribute[@class='resistance']" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="enemy-attribute[@class='endurance']" />
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text>\t</xsl:text>
-
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="choice">
- <xsl:variable name="link">
- <xsl:value-of select="@idref" />
- </xsl:variable>
-
- <xsl:text>\t</xsl:text>
- <xsl:for-each select="* | text()">
- <xsl:choose>
- <xsl:when test="self::link-text">
- <xsl:text>\q="#</xsl:text><xsl:value-of select="$link" /><xsl:text>"</xsl:text>
- <xsl:apply-templates />
- <xsl:text>\q</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- <xsl:text>\t</xsl:text>
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="signpost">
- <xsl:text>\c</xsl:text>
- <xsl:apply-templates />
- <xsl:value-of select="$newline" />
- <xsl:text>\c</xsl:text>
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="blockquote">
- <xsl:text>\t</xsl:text>
- <xsl:apply-templates />
- <xsl:text>\t</xsl:text>
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="illustration">
- <xsl:choose>
- <xsl:when test="instance[@class='pml'] and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
- <xsl:text>\c\m="</xsl:text><xsl:value-of select="instance[@class='pml']/@src" /><xsl:text>"</xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:text>\c</xsl:text>
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
- </xsl:when>
- <xsl:when test="instance[@class='text'] and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
- <xsl:apply-templates select="instance[@class='text']/*" />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newparagraph" />
- </xsl:if>
- </xsl:when>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template match="instance" />
-
-<xsl:template match="footnotes" />
-
-<xsl:template match="footnote">
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="hr">
- <xsl:text>\w="80%"</xsl:text>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="dt">
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newline" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="dd">
- <xsl:text>\t</xsl:text>
- <xsl:apply-templates />
- <xsl:text>\t</xsl:text>
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newline" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="ol/li">
- <xsl:number count="li" /><xsl:text>. </xsl:text>
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newline" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="ul/li">
- <xsl:text>• </xsl:text>
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newline" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="ul[@class='unbulleted']/li">
- <xsl:apply-templates />
- <xsl:if test="following-sibling::node( )">
- <xsl:value-of select="$newline" />
- </xsl:if>
-</xsl:template>
-
-<!-- ==================== inline elements ======================= -->
-
-<xsl:template match="a">
- <xsl:if test="@id">
- <xsl:text>\Q="</xsl:text><xsl:value-of select="@id" /><xsl:text>"</xsl:text>
- </xsl:if>
- <xsl:if test="@idref">
- <xsl:text>\q="#</xsl:text><xsl:value-of select="@idref" /><xsl:text>"</xsl:text>
- </xsl:if>
-
- <xsl:apply-templates />
-
- <xsl:if test="@idref">
- <xsl:text>\q</xsl:text>
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="footnote//a">
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="a[@class='footnote']">
- <xsl:apply-templates />
- <xsl:text>\Sp\Fn="</xsl:text><xsl:value-of select="@idref" /><xsl:text>"</xsl:text>
- <xsl:number count="a[@class='footnote']" from="/" level="any" format="1" />
- <xsl:text>\Fn\Sp</xsl:text>
-</xsl:template>
-
-<xsl:template match="em">
- <xsl:text>\i{</xsl:text><xsl:apply-templates /><xsl:text>i</xsl:text>
-</xsl:template>
-
-<xsl:template match="strong">
- <xsl:text>\B</xsl:text><xsl:apply-templates /><xsl:text>\B</xsl:text>
-</xsl:template>
-
-<xsl:template match="cite">
- <xsl:text>\i</xsl:text><xsl:apply-templates /><xsl:text>\i</xsl:text>
-</xsl:template>
-
-<xsl:template match="thought">
- <xsl:text>\i</xsl:text><xsl:apply-templates /><xsl:text>\i</xsl:text>
-</xsl:template>
-
-<xsl:template match="onomatopoeia">
- <xsl:text>\i</xsl:text><xsl:apply-templates /><xsl:text>\i</xsl:text>
-</xsl:template>
-
-<xsl:template match="spell">
- <xsl:text>\i</xsl:text><xsl:apply-templates /><xsl:text>\i</xsl:text>
-</xsl:template>
-
-<xsl:template match="item">
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="foreign">
- <xsl:text>\i</xsl:text><xsl:apply-templates /><xsl:text>\i</xsl:text>
-</xsl:template>
-
-<xsl:template match="quote">
- <xsl:text>&lsquot;</xsl:text>
- <xsl:apply-templates />
- <xsl:if test="not(self::*[@class='open-ended'])"><xsl:text>&rsquot;</xsl:text></xsl:if>
-</xsl:template>
-
-<xsl:template match="quote//quote">
- <xsl:text>&ldquot;</xsl:text>
- <xsl:apply-templates />
- <xsl:if test="not(self::*[@class='open-ended'])"><xsl:text>&rdquot;</xsl:text></xsl:if>
-</xsl:template>
-
-<xsl:template match="code">
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="br">
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-</xsl:transform>
-
+++ /dev/null
-<?xml version="1.0"?>
-<!DOCTYPE xsl:transform [
- <!ENTITY % xhtml.characters SYSTEM "../../en/xml/htmlchar.mod">
- %xhtml.characters;
-]>
-
-<!--
-
-$Id$
-
-$Log$
-Revision 1.5 2007/02/02 20:04:28 jonathan.blake
-Correction to handling line elements
-
-Revision 1.4 2006/12/20 00:15:04 jonathan.blake
-Updated to handle the new capabilities in version 0.12.1 of the Gamebook DTD.
-
-Revision 1.3 2006/12/07 01:42:28 jonathan.blake
-Text illustrations need inclusion
-
-Revision 1.2 2006/11/25 18:57:16 jonathan.blake
-Fixed links to footnotes
-
-Revision 1.1 2006/11/25 04:48:52 jonathan.blake
-Modified to generate a single unstyled, UTF-8, HTML file which lacks any illustrations
-
-
-///// xhtml.xsl used as source for xhtml-mongoose.xsl
-
-Revision 1.12 2006/06/05 23:46:46 jonathan.blake
-Fixing the handling of titles when <ch.*/> elements are used.
-
-Revision 1.11 2006/04/04 18:48:52 angantyr
-Fixed paragraphed list and illref template bug.
-
-Revision 1.10 2006/04/02 19:14:37 angantyr
-Introduced automatic footnotes list generation and changed the illustrations
-list generation so that links to numbered sections are titled "Section ...".
-Backwards compatible with old XML files.
-
-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.
-
-Revision 1.1 2005/01/30 01:32:52 jonathan.blake
-Initial freepository revision of XML support documents.
-
-Revision 1.12 2003/10/07 06:05:14 Jon
-Added capability for "accent" illustrations.
-
-Revision 1.11 2002/12/06 22:12:04 jblake
-Added default namespace declaration to transformation element
-and removed all the extraneous declarations in the template
-elements.
-
-Revision 1.10 2002/11/17 22:37:25 jblake
-Removed the "medium" creator entry from the templates.
-Will they be of any use?
-
-Revision 1.9 2002/11/17 05:06:56 jblake
-Rearranged the title page.
-
-Revision 1.8 2002/11/15 19:35:25 jblake
-Fixed "Content-type" of XHTML output.
-
-Revision 1.7 2002/11/15 00:15:39 jblake
-Fixed a problem with the client-side image map and fixed
-the numbered section list generation so that it will work
-for Shadow on the Sand.
-
-Revision 1.6 2002/10/30 05:59:45 jblake
-Added a value for the alt attribute of the ToC image on the navigation bar.
-
-Revision 1.5 2002/10/24 15:53:41 jblake
-Fixed a conflict with whitespace and paragraphed lists.
-
-Revision 1.4 2002/10/24 15:06:51 jblake
-Added xmlns attributes to all elements that are top level in
-their templates. This was an adjustment required by Xalan-J 2.4.
-
-Also reinstated the comment in each document since the new
-version of Xalan redirects it properly.
-
-Revision 1.3 2002/10/23 05:18:29 jblake
-Added the capability to filter which illustrators' work is used.
-This is accomplished by the "use-illustrators" parameter.
-
-Revision 1.2 2002/10/20 06:25:35 jblake
-Added support for CLOSE COMBAT SKILL for Freeway Warrior books.
-
-Revision 1.1 2002/10/15 23:29:51 jblake
-Initial revision
-
-
-20020327 - repurposed to be used with Xalan Java 2
-
-Todo:
-
-* Add blank whitespace handling to the paragraphed list template
-
--->
-
-<xsl:transform version="1.0"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:redirect="org.apache.xalan.lib.Redirect"
- extension-element-prefixes="redirect">
-
-<xsl:output method="xml"
- encoding="UTF-8"
- omit-xml-declaration="yes"
- doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
- doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
-
-<xsl:strip-space elements="section data ol ul dl li dd footnotes footnote" />
-<xsl:preserve-space elements="p choice" />
-
-<!-- ====================== parameters ========================== -->
-
-<xsl:param name="use-illustrators" />
-<xsl:param name="language"><xsl:text>en</xsl:text></xsl:param>
-
-<!-- ======================= variables ========================== -->
-
-<xsl:variable name="newline">
-<xsl:text>
-</xsl:text>
-</xsl:variable>
-
-<!-- ======================== Templates ========================= -->
-
-<!-- ================= hierarchical sections ==================== -->
-
-<xsl:template match="meta" />
-<xsl:template match="section" />
-
-<xsl:template match="/gamebook">
- <html xml:lang="en-UK" lang="en-UK">
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <head><xsl:value-of select="$newline" />
- <title>
- <xsl:apply-templates select="/gamebook/meta/title[1]" />
- </title><xsl:value-of select="$newline" />
- <meta http-equiv="Content-type" content="text/html; charset=utf-8" /><xsl:value-of select="$newline" />
- <meta name="robots" content="noindex,nofollow" /><xsl:value-of select="$newline" />
- </head>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <body>
- <xsl:comment>
- <xsl:text> </xsl:text>
- <xsl:apply-templates select="/gamebook/meta/rights[@class='copyrights']" />
- <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:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <h1>
- <a name="title">
- <xsl:apply-templates select="/gamebook/meta/title[1]" />
- </a>
- </h1><xsl:value-of select="$newline" />
-
- <xsl:apply-templates/>
-
- </body>
- </html>
-</xsl:template>
-
-<!-- ::::::::::::::::::: top-level section :::::::::::::::::::::: -->
-
-<xsl:template match="/gamebook/section[@id='title']">
- <div class="frontmatter"><xsl:value-of select="$newline" />
-
- <xsl:apply-templates select="/gamebook/meta/description[@class='blurb']" />
- <xsl:apply-templates select="/gamebook/meta/creator[@class='long']" />
-
- <hr />
-
- <xsl:apply-templates select="/gamebook/meta/description[@class='publication']" />
-
- <p>
- <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: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: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: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: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: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: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: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: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: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: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: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: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:otherwise>
- </xsl:choose>
- <xsl:text> </xsl:text>
- <xsl:value-of select="/gamebook/meta/date[@class='publication']/year" />
- </p>
-
- <xsl:apply-templates select="/gamebook/meta/rights[@class='license-notification']" />
-
- <xsl:value-of select="$newline" />
-
- <xsl:value-of select="$newline" />
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="/gamebook/section[@id='toc']">
- <div class="frontmatter"><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" />
- <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>
-
- <xsl:for-each select="/gamebook/section/data/section">
- <li>
- <a><xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="@id" /></xsl:attribute>
- <xsl:apply-templates select="meta/title[1]" />
- </a>
- <xsl:if test="data/section[@class='frontmatter-separate' or @class='mainmatter-separate']">
- <xsl:value-of select="$newline" />
- <ul><xsl:value-of select="$newline" />
- <xsl:for-each select="data/section[@class='frontmatter-separate' or @class='mainmatter-separate']">
- <li>
- <a><xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="@id" /></xsl:attribute>
- <xsl:value-of select ="meta/title[1]" />
- </a>
- </li><xsl:value-of select="$newline" />
- </xsl:for-each>
- </ul><xsl:value-of select="$newline" />
- </xsl:if>
- </li><xsl:value-of select="$newline" />
- </xsl:for-each>
- </ul><xsl:value-of select="$newline" />
-
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
-</xsl:template>
-
-<!-- ::::::::::: second-level frontmatter sections :::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='frontmatter']">
- <div class="frontmatter"><xsl:value-of select="$newline" />
- <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h2>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
- </div>
-</xsl:template>
-
-<!-- :::::::::::: third-level front matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='frontmatter']">
- <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h3>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='frontmatter-separate']">
- <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h3>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- :::::::::::: fourth-level front matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='frontmatter']">
- <h4><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h4>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::::: fifth-level front matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section/data/section[@class='frontmatter']">
- <h5><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h5>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::: second-level main matter sections :::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='mainmatter']">
- <div class="mainmatter"><xsl:value-of select="$newline" />
- <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h2>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
- </div>
-</xsl:template>
-
-<!-- :::::::::::: third-level main matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='mainmatter']">
- <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h3>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='mainmatter-separate']">
- <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h3>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- :::::::::::: fourth-level main matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='mainmatter']">
- <h4><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h4>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::::: fifth-level main matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section/data/section[@class='mainmatter']">
- <h5><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h5>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- :::::::::::::::::: numbered sections ::::::::::::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='numbered']">
- <div class="numbered"><xsl:value-of select="$newline" />
- <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h2><xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates/>
-
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='numbered']">
- <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h3><xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<!-- :::::::::::: second-level backmatter sections :::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='backmatter']">
- <div class="frontmatter"><xsl:value-of select="$newline" />
- <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h2><xsl:value-of select="$newline" />
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-
- <xsl:value-of select="$newline" />
-
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
-</xsl:template>
-
-<!-- ::::::::::::: third-level back matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='backmatter']">
- <h3><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h3>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::::: fourth-level back matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='backmatter']">
- <h4><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h4>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::::::::::::: footnotes template ::::::::::::::::::::::::: -->
-
-<xsl:template match="id( 'footnotz' )">
- <div class="backmatter">
- <xsl:value-of select="$newline" />
- <!-- No particular reason to code title here -->
- <h2><a><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute><xsl:apply-templates select="meta/title[1]" /></a></h2><xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <!-- Generate list of footnotes -->
- <div class="footnote">
- <xsl:for-each select="//footnotes/footnote">
- <!-- will the list always contain the closest ancestor first? -->
- <xsl:variable name="footnote-section"><xsl:value-of select="ancestor::section[position()=1]/@id" /></xsl:variable>
- <xsl:variable name="footnote-marker"><xsl:number count="footnotes/footnote" from="/" level="any" format="1" /></xsl:variable>
- <xsl:variable name="footnote-id"><xsl:value-of select="@id" /></xsl:variable>
- <xsl:variable name="footnote-idref"><xsl:text>#</xsl:text><xsl:value-of select="@idref" /></xsl:variable>
-
- <xsl:for-each select="*[1]">
- <p>
- <xsl:text>[</xsl:text>
- <a>
- <xsl:attribute name="name"><xsl:value-of select="$footnote-id" /></xsl:attribute>
- <xsl:attribute name="href"><xsl:value-of select="$footnote-idref" /></xsl:attribute>
- <xsl:value-of select="$footnote-marker" />
- </a>
- <xsl:text>] </xsl:text>
-
- <xsl:text> (</xsl:text>
- <xsl:call-template name="section-title-link" />
- <xsl:text>) </xsl:text>
-
- <xsl:apply-templates select="child::* | child::text()" />
- </p>
- </xsl:for-each>
-
- <xsl:for-each select="*[position() != 1]">
- <xsl:apply-templates select="." />
- </xsl:for-each>
-
- </xsl:for-each>
- </div>
-
- <!-- Backwards compatibility... needed? Probably not. -->
- <xsl:apply-templates />
-
- <xsl:value-of select="$newline" />
-
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
-</xsl:template>
-
-<!-- ==================== block elements ======================== -->
-
-<xsl:template match="p">
- <p><xsl:apply-templates /></p>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="p[@class='dedication']">
- <p class="dedication"><xsl:apply-templates /></p>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="dl[@class='paragraphed']/dd/node() | ol[@class='paragraphed']/li/node() | ul[@class='paragraphed']/li/node()">
- <xsl:choose>
- <xsl:when test="self::p">
- <xsl:apply-templates /><br /><br /><xsl:value-of select="$newline" />
- </xsl:when>
- <xsl:when test="self::dl">
- <dl><xsl:value-of select="$newline" />
- <xsl:apply-templates />
- </dl><br /><br /><xsl:value-of select="$newline" />
- </xsl:when>
- <xsl:when test="self::ol">
- <ol><xsl:value-of select="$newline" />
- <xsl:apply-templates />
- </ol><br /><br /><xsl:value-of select="$newline" />
- </xsl:when>
- <xsl:when test="self::ul">
- <ul>
- <xsl:if test="self::*[@class='unbulleted']"><xsl:attribute name="class"><xsl:text>unbulleted</xsl:text></xsl:attribute></xsl:if>
- <xsl:value-of select="$newline" />
- <xsl:apply-templates />
- </ul><br /><br /><xsl:value-of select="$newline" />
- </xsl:when>
- <xsl:when test="self::blockquote">
- <blockquote><xsl:value-of select="$newline" />
- <xsl:apply-templates />
- </blockquote><xsl:value-of select="$newline" />
- </xsl:when>
- <xsl:when test="self::illustration"></xsl:when>
- <xsl:when test="self::illref"></xsl:when>
- <xsl:otherwise>
- <xsl:text>[error: paragraphed list template]</xsl:text>
- <xsl:message><xsl:text>error: paragraphed list template</xsl:text></xsl:message>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template match="ol">
- <ol><xsl:value-of select="$newline" />
- <xsl:apply-templates />
- </ol><xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="ul">
- <ul>
- <xsl:if test="self::*[@class='unbulleted']"><xsl:attribute name="class"><xsl:text>unbulleted</xsl:text></xsl:attribute></xsl:if>
- <xsl:value-of select="$newline" />
- <xsl:apply-templates />
- </ul><xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="dl">
- <dl><xsl:value-of select="$newline" />
- <xsl:apply-templates />
- </dl><xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="dt">
- <dt><xsl:apply-templates /></dt>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="dd">
- <dd><xsl:apply-templates /></dd>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="li">
- <li><xsl:apply-templates /></li>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="table">
- <table border="1" cellspacing="0" cellpadding="2">
- <xsl:if test="@summary"><xsl:attribute name="summary"><xsl:value-of select="@summary" /></xsl:attribute></xsl:if>
- <xsl:apply-templates />
- </table>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="caption">
- <caption>
- <xsl:apply-templates />
- </caption>
-</xsl:template>
-
-<xsl:template match="colgroup[@scope]">
- <colgroup>
- <xsl:attribute name="scope"><xsl:value-of select="@scope" /></xsl:attribute>
- </colgroup>
-</xsl:template>
-
-<xsl:template match="thead">
- <thead>
- <xsl:apply-templates />
- </thead>
-</xsl:template>
-
-<xsl:template match="tfoot">
- <tfoot>
- <xsl:apply-templates />
- </tfoot>
-</xsl:template>
-
-<xsl:template match="tbody">
- <tbody>
- <xsl:apply-templates />
- </tbody>
-</xsl:template>
-
-<xsl:template match="tr">
- <tr>
- <xsl:apply-templates />
- </tr>
-</xsl:template>
-
-<xsl:template match="th">
- <th>
- <xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align" /></xsl:attribute></xsl:if>
- <xsl:if test="@valign"><xsl:attribute name="valign"><xsl:value-of select="@valign" /></xsl:attribute></xsl:if>
- <xsl:if test="@char"><xsl:attribute name="char"><xsl:value-of select="@char" /></xsl:attribute></xsl:if>
- <xsl:if test="@rowspan"><xsl:attribute name="rowspan"><xsl:value-of select="@rowspan" /></xsl:attribute></xsl:if>
- <xsl:if test="@colspan"><xsl:attribute name="colspan"><xsl:value-of select="@colspan" /></xsl:attribute></xsl:if>
- <xsl:if test="@axis"><xsl:attribute name="axis"><xsl:value-of select="@axis" /></xsl:attribute></xsl:if>
- <xsl:if test="@scope"><xsl:attribute name="scope"><xsl:value-of select="@scope" /></xsl:attribute></xsl:if>
- <xsl:apply-templates />
- </th>
-</xsl:template>
-
-<xsl:template match="td">
- <td>
- <xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align" /></xsl:attribute></xsl:if>
- <xsl:if test="@valign"><xsl:attribute name="valign"><xsl:value-of select="@valign" /></xsl:attribute></xsl:if>
- <xsl:if test="@char"><xsl:attribute name="char"><xsl:value-of select="@char" /></xsl:attribute></xsl:if>
- <xsl:if test="@rowspan"><xsl:attribute name="rowspan"><xsl:value-of select="@rowspan" /></xsl:attribute></xsl:if>
- <xsl:if test="@colspan"><xsl:attribute name="colspan"><xsl:value-of select="@colspan" /></xsl:attribute></xsl:if>
- <xsl:if test="@axis"><xsl:attribute name="axis"><xsl:value-of select="@axis" /></xsl:attribute></xsl:if>
- <xsl:if test="@scope"><xsl:attribute name="scope"><xsl:value-of select="@scope" /></xsl:attribute></xsl:if>
- <xsl:apply-templates />
- </td>
-</xsl:template>
-
-<xsl:template match="combat">
- <p class="combat">
- <xsl:apply-templates select="enemy" />
- <xsl:text>: </xsl:text>
- <xsl:choose>
- <xsl:when test="enemy-attribute[@class='combatskill']">
- <small>
- <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>
- </small>
- <xsl:text> </xsl:text>
- <xsl:value-of select="enemy-attribute[@class='combatskill']" />
- </xsl:when>
- <xsl:when test="enemy-attribute[@class='closecombatskill']">
- <small>
- <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>
- </small>
- <xsl:text> </xsl:text>
- <xsl:value-of select="enemy-attribute[@class='closecombatskill']" />
- </xsl:when>
- </xsl:choose>
- <xsl:text> </xsl:text>
- <small>
- <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>
- </small>
- <xsl:choose>
- <xsl:when test="enemy-attribute[@class='target']">
- <xsl:choose>
- <xsl:when test="$language='es'">
- <xsl:text> (o </xsl:text><small>BLANCOS</small><xsl:text>)</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text> (</xsl:text><small>TARGET</small><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:choose>
- <xsl:when test="$language='es'"></xsl:when>
- <xsl:otherwise>
- <xsl:text> (</xsl:text><small>RESISTANCE</small><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> </xsl:text>
- <xsl:value-of select="enemy-attribute[@class='endurance']" />
- </xsl:otherwise>
- </xsl:choose>
- </p>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="choice">
- <xsl:variable name="link">
- <xsl:value-of select="@idref" />
- </xsl:variable>
-
- <p class="choice">
- <xsl:for-each select="* | text()">
- <xsl:choose>
- <xsl:when test="self::link-text">
- <a href="#{$link}">
- <xsl:apply-templates />
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </p>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="signpost">
- <div class="signpost">
- <xsl:apply-templates />
- </div>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="blockquote">
- <blockquote><xsl:value-of select="$newline" />
- <xsl:apply-templates /><xsl:value-of select="$newline" />
- </blockquote><xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="illref">
- <!-- It is important that the class is not checked right in the template - that would make this template match with higher priority, which will turn a few things upside down -->
- <xsl:if test="@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:if>
-</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]">
- <xsl:call-template name="section-title-link" />
- <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:when>
- </xsl:choose>
- </xsl:for-each>
- </ul><xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="illustration">
- <xsl:choose>
- <xsl:when test="instance[@class='text'] and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
- <xsl:apply-templates select="instance[@class='text']/*"/>
- </xsl:when>
- <xsl:when test="instance[@class='html'] and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )">
- <xsl:choose>
- <xsl:when test="@class='float'">
- <div class="illustration">
- <xsl:text>[[Illustration </xsl:text>
- <xsl:number count="illustration[@class='float' and contains( $use-illustrators, concat( ':', meta/creator, ':' ) )]" from="/" level="any" format="I" />
- <xsl:text>]]</xsl:text>
- </div><xsl:value-of select="$newline" />
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise></xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template match="instance" />
-
-<xsl:template match="footnotes" />
-
-<xsl:template match="footnote" />
-
-<xsl:template match="hr">
- <hr />
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<!-- ==================== inline elements ======================= -->
-
-<xsl:template match="a">
- <xsl:choose>
- <xsl:when test="@href">
- <a>
- <xsl:attribute name="href"><xsl:value-of select="@href" /></xsl:attribute>
- <xsl:if test="@id"><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
- <xsl:apply-templates />
- </a>
- </xsl:when>
- <xsl:otherwise>
- <a>
- <xsl:if test="@idref">
- <xsl:attribute name="href">
- <xsl:text>#</xsl:text><xsl:value-of select="@idref" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@id"><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
- <xsl:apply-templates />
- </a>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- This template is obsolete, the "footref" element should be used instead -->
-<xsl:template match="a[@class='footnote']">
- <!-- <xsl:message><xsl:text>WARNING: Obsolete <a idref='...' class='footnote' /> usage</xsl:text></xsl:message> -->
- <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="a[@class='footnote']" from="/" level="any" format="1" />
- </a>
- </sup>
-</xsl:template>
-
-<!-- TODO: can this be made more uniform with illrefs? -->
-<xsl:template match="a[@class='accent-illustration']"></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>.htm#</xsl:text><xsl:value-of select="$my-section" />
- </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>
-
-<xsl:template match="strong">
- <strong><xsl:apply-templates /></strong>
-</xsl:template>
-
-<xsl:template match="thought">
- <i><xsl:apply-templates /></i>
-</xsl:template>
-
-<xsl:template match="onomatopoeia">
- <i><xsl:apply-templates /></i>
-</xsl:template>
-
-<xsl:template match="spell">
- <i><xsl:apply-templates /></i>
-</xsl:template>
-
-<xsl:template match="item">
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="foreign">
- <i><xsl:apply-templates /></i>
-</xsl:template>
-
-<xsl:template match="quote">
- <xsl:text>‘</xsl:text>
- <xsl:apply-templates />
- <xsl:if test="not(self::*[@class='open-ended'])"><xsl:text>’</xsl:text></xsl:if>
-</xsl:template>
-
-<xsl:template match="quote//quote">
- <xsl:text>“</xsl:text>
- <xsl:apply-templates />
- <xsl:if test="not(self::*[@class='open-ended'])"><xsl:text>”</xsl:text></xsl:if>
-</xsl:template>
-
-<xsl:template match="cite">
- <cite><xsl:apply-templates /></cite>
-</xsl:template>
-
-<xsl:template match="code">
- <tt><xsl:apply-templates /></tt>
-</xsl:template>
-
-<xsl:template match="line">
- <xsl:apply-templates />
- <xsl:if test="position( ) != last( )"><br /></xsl:if>
-</xsl:template>
-
-<xsl:template match="br">
- <br />
-</xsl:template>
-
-<xsl:template match="typ[@class='attribute']">
- <small><xsl:apply-templates /></small>
-</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 ======================= -->
-
-<!--
- A "subroutine" to generate a link to the current section, with the section title (expanded with "Section " in case of a numbered section) as link text.
--->
-<xsl:template name="section-title-link">
- <!-- will the list always contain the closest ancestor first? -->
- <xsl:variable name="section-title">
- <!-- numbered or not? -->
- <xsl:if test="ancestor::section[position()=1]/@class='numbered'">
- <xsl:choose>
- <xsl:when test="$language='es'">
- <xsl:text>Sección </xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>Section </xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- <xsl:apply-templates select="ancestor::section[position()=1]/meta/title[1]" />
- </xsl:variable>
-
- <a>
- <xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="ancestor::section[position()=1]/@id" /></xsl:attribute>
- <xsl:value-of select="$section-title" />
- </a>
-</xsl:template>
-
-</xsl:transform>
+++ /dev/null
-<?xml version="1.0"?>
-<!DOCTYPE xhtml-transform [
- <!ENTITY nbsp " ">
-]>
-
-<!--
-
-$Id$
-
-$Log$
-Revision 1.2 2005/04/09 19:51:50 angantyr
-Added handling of open-ended quotes.
-
-Revision 1.1 2005/01/30 01:32:52 jonathan.blake
-Initial freepository revision of XML support documents.
-
-Revision 1.1 2003/01/15 17:22:44 jblake
-Initial revision
-
-
-Revision 1.1 2002/10/22 16:35:26 jblake
-Initial revision
-
-
-Revision 1.2 2002/10/20 06:25:35 jblake
-Added support for CLOSE COMBAT SKILL for Freeway Warrior books.
-
-Revision 1.1 2002/10/15 23:29:51 jblake
-Initial revision
-
-
-20020327 - repurposed to be used with Xalan Java 2
--->
-
-<xsl:transform version="1.0"
- xmlns:xml="http://www.w3.org/XML/1998/namespace"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:lxslt="http://xml.apache.org/xslt"
- xmlns:redirect="org.apache.xalan.lib.Redirect"
- extension-element-prefixes="redirect">
-
-<xsl:output method="xml"
- encoding="ISO-8859-1"
- omit-xml-declaration="yes"
- doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
- doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
-
-<xsl:strip-space elements="section data ol ul dl li dd footnotes footnote" />
-<xsl:preserve-space elements="p" />
-
-<!-- ====================== parameters ========================== -->
-
-<xsl:param name="book-path"><xsl:text>undefined-book</xsl:text></xsl:param>
-
-<!-- ~~~~~~~~~~~~~~~~~~~~~~~~ colors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
-<xsl:param name="link-color"><xsl:text>#ff0000</xsl:text></xsl:param>
-<xsl:param name="alink-color"><xsl:value-of select="$link-color" /></xsl:param>
-<xsl:param name="vlink-color"><xsl:value-of select="$link-color" /></xsl:param>
-
-<xsl:param name="text-color"><xsl:text>#000000</xsl:text></xsl:param>
-<xsl:param name="background-color"><xsl:text>ffffe4</xsl:text></xsl:param>
-
-<!-- ======================= variables ========================== -->
-
-<xsl:variable name="newline">
-<xsl:text>
-</xsl:text>
-</xsl:variable>
-
-<!-- ======================== Templates ========================= -->
-
-<!-- ================= hierarchical sections ==================== -->
-
-<xsl:template match="meta" />
-<xsl:template match="section" />
-
-<!-- ::::::::::::::::::: top-level section :::::::::::::::::::::: -->
-
-<xsl:template match="/gamebook/section">
- <xsl:call-template name="xhtml-wrapper">
- <xsl:with-param name="document-type">top-level</xsl:with-param>
- <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
- </xsl:call-template>
-
- <xsl:call-template name="xhtml-wrapper">
- <xsl:with-param name="document-type">toc</xsl:with-param>
- <xsl:with-param name="filename">toc</xsl:with-param>
- </xsl:call-template>
-
- <xsl:apply-templates />
-
-</xsl:template>
-
-<!-- ::::::::::: second-level frontmatter sections :::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='frontmatter']">
- <xsl:call-template name="xhtml-wrapper">
- <xsl:with-param name="document-type">second-level-frontmatter</xsl:with-param>
- <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- :::::::::::: third-level front matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='frontmatter']">
- <h3><xsl:value-of select="meta/title[1]" /></h3>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='frontmatter-separate']">
- <xsl:call-template name="xhtml-wrapper">
- <xsl:with-param name="document-type">third-level-frontmatter-separate</xsl:with-param>
- <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- :::::::::::: fourth-level front matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='frontmatter']">
- <h4><xsl:value-of select="meta/title[1]" /></h4>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::::: fifth-level front matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section/data/section[@class='frontmatter']">
- <h5><xsl:value-of select="meta/title[1]" /></h5>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::: second-level main matter sections :::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='mainmatter']">
- <xsl:call-template name="xhtml-wrapper">
- <xsl:with-param name="document-type">second-level-mainmatter</xsl:with-param>
- <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- :::::::::::: third-level main matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='mainmatter']">
- <h3><xsl:value-of select="meta/title[1]" /></h3>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='mainmatter-separate']">
- <xsl:call-template name="xhtml-wrapper">
- <xsl:with-param name="document-type">third-level-mainmatter-separate</xsl:with-param>
- <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- :::::::::::: fourth-level main matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='mainmatter']">
- <h4><xsl:value-of select="meta/title[1]" /></h4>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::::: fifth-level main matter sections :::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section/data/section[@class='mainmatter']">
- <h5><xsl:value-of select="meta/title[1]" /></h5>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- :::::::::::: second-level glossary sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='glossary']">
- <xsl:call-template name="xhtml-wrapper">
- <xsl:with-param name="document-type">second-level-glossary</xsl:with-param>
- <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
- <xsl:with-param name="glossary-id-prefix">topics</xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- :::::::::::: third-level glossary sections ::::::::::::: -->
-<!-- glossary sections should be enclosed in a second level glossary section -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='glossary']">
- <h3><xsl:value-of select="meta/title[1]" /></h3>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='glossary-separate']">
- <xsl:call-template name="xhtml-wrapper">
- <xsl:with-param name="document-type">third-level-glossary-separate</xsl:with-param>
- <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
- <xsl:with-param name="glossary-id-prefix">topics</xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- :::::::::::::::::: numbered sections ::::::::::::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='numbered']">
- <xsl:call-template name="xhtml-wrapper">
- <xsl:with-param name="document-type">second-level-numbered</xsl:with-param>
- <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
- </xsl:call-template>
-
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='numbered']">
- <xsl:call-template name="xhtml-wrapper">
- <xsl:with-param name="document-type">third-level-numbered</xsl:with-param>
- <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- :::::::::::: second-level backmatter sections :::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section[@class='backmatter']">
- <xsl:call-template name="xhtml-wrapper">
- <xsl:with-param name="document-type">second-level-backmatter</xsl:with-param>
- <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- ::::::::::::: third-level back matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section[@class='backmatter']">
- <h3><xsl:value-of select="meta/title[1]" /></h3>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::::: fourth-level back matter sections ::::::::::::: -->
-
-<xsl:template match="/gamebook/section/data/section/data/section/data/section[@class='backmatter']">
- <h4><xsl:value-of select="meta/title[1]" /></h4>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-</xsl:template>
-
-<!-- ::::::::::::::::::::: map template ::::::::::::::::::::::::: -->
-
-<xsl:template match="id( 'map' )">
- <xsl:call-template name="xhtml-wrapper">
- <xsl:with-param name="document-type">map-adjusted</xsl:with-param>
- <xsl:with-param name="filename"><xsl:value-of select="@id" /></xsl:with-param>
- </xsl:call-template>
-
- <xsl:call-template name="xhtml-wrapper">
- <xsl:with-param name="document-type">map</xsl:with-param>
- <xsl:with-param name="filename"><xsl:value-of select="@id" /><xsl:text>large</xsl:text></xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<!-- ==================== block elements ======================== -->
-
-<xsl:template match="p">
- <p><xsl:apply-templates /></p>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="p[@class='dedication']">
- <p class="dedication"><xsl:apply-templates /></p>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="dl[@class='paragraphed']/dd/node() | ol[@class='paragraphed']/li/node() | ul[@class='paragraphed']/li/node()">
- <xsl:choose>
- <xsl:when test="self::p">
- <xsl:apply-templates /><br /><br /><xsl:value-of select="$newline" />
- </xsl:when>
- <xsl:when test="self::dl">
- <dl><xsl:value-of select="$newline" />
- <xsl:apply-templates />
- </dl><br /><br /><xsl:value-of select="$newline" />
- </xsl:when>
- <xsl:when test="self::ol">
- <ol><xsl:value-of select="$newline" />
- <xsl:apply-templates />
- </ol><br /><br /><xsl:value-of select="$newline" />
- </xsl:when>
- <xsl:when test="self::ul">
- <ul>
- <xsl:if test="self::*[@class='unbulleted']"><xsl:attribute name="class"><xsl:text>unbulleted</xsl:text></xsl:attribute></xsl:if>
- <xsl:value-of select="$newline" />
- <xsl:apply-templates />
- </ul><br /><br /><xsl:value-of select="$newline" />
- </xsl:when>
- <xsl:when test="self::blockquote">
- <blockquote><xsl:value-of select="$newline" />
- <xsl:apply-templates />
- </blockquote><xsl:value-of select="$newline" />
- </xsl:when>
- <xsl:when test="self::illustration">
- <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:if test="instance[@class='pdaxhtml']">
- <div class="illustration"><div align="center"><xsl:value-of select="$newline" />
- <p><img src="{$illustration-src}" width="{$illustration-width}" height="{$illustration-height}" border="0" align="middle" alt="[illustration]" /></p><xsl:value-of select="$newline" />
- </div></div><xsl:value-of select="$newline" />
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>[error: paragraphed list template]</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template match="ol">
- <ol><xsl:value-of select="$newline" />
- <xsl:apply-templates />
- </ol><xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="ul">
- <ul>
- <xsl:if test="self::*[@class='unbulleted']"><xsl:attribute name="class"><xsl:text>unbulleted</xsl:text></xsl:attribute></xsl:if>
- <xsl:value-of select="$newline" />
- <xsl:apply-templates />
- </ul><xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="dl">
- <dl><xsl:value-of select="$newline" />
- <xsl:apply-templates />
- </dl><xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="dt">
- <dt><xsl:apply-templates /></dt>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="dd">
- <dd><xsl:apply-templates /></dd>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="li">
- <li><xsl:apply-templates /></li>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="table">
- <table border="1" cellspacing="0" cellpadding="2">
- <xsl:apply-templates />
- </table>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="tr">
- <tr>
- <xsl:apply-templates />
- </tr>
-</xsl:template>
-
-<xsl:template match="th">
- <th>
- <xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align" /></xsl:attribute></xsl:if>
- <xsl:if test="@valign"><xsl:attribute name="valign"><xsl:value-of select="@valign" /></xsl:attribute></xsl:if>
- <xsl:if test="@char"><xsl:attribute name="char"><xsl:value-of select="@char" /></xsl:attribute></xsl:if>
- <xsl:apply-templates />
- </th>
-</xsl:template>
-
-<xsl:template match="td">
- <td>
- <xsl:if test="@align"><xsl:attribute name="align"><xsl:value-of select="@align" /></xsl:attribute></xsl:if>
- <xsl:if test="@valign"><xsl:attribute name="valign"><xsl:value-of select="@valign" /></xsl:attribute></xsl:if>
- <xsl:if test="@char"><xsl:attribute name="char"><xsl:value-of select="@char" /></xsl:attribute></xsl:if>
- <xsl:apply-templates />
- </td>
-</xsl:template>
-
-<xsl:template match="combat">
- <p class="combat">
- <xsl:apply-templates select="enemy" />
- <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>
- <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>
- <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: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: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:value-of select="enemy-attribute[@class='resistance']" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
- <xsl:value-of select="enemy-attribute[@class='endurance']" />
- </xsl:otherwise>
- </xsl:choose>
- </p>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="choice">
- <xsl:variable name="link">
- <xsl:value-of select="@idref" />
- </xsl:variable>
-
- <p class="choice">
- <xsl:for-each select="* | text()">
- <xsl:choose>
- <xsl:when test="self::link-text">
- <a href="{$link}.htm">
- <xsl:apply-templates />
- </a>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </p>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="signpost">
- <div class="signpost">
- <xsl:apply-templates />
- </div>
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<xsl:template match="blockquote">
- <blockquote><xsl:value-of select="$newline" />
- <xsl:apply-templates /><xsl:value-of select="$newline" />
- </blockquote><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:variable name="illustration-src" select="instance[@class='html']/@src" />
-
- <xsl:variable name="illustration-width-adjusted"><xsl:number value="$illustration-width div 2" /></xsl:variable>
- <xsl:variable name="illustration-height-adjusted"><xsl:number value="$illustration-height div 2" /></xsl:variable>
-
- <xsl:if test="instance[@class='pdaxhtml']">
- <xsl:choose>
- <xsl:when test="@class='float'">
- <div class="illustration"><div align="center"><xsl:value-of select="$newline" />
- <p>
- <a>
- <xsl:attribute name="href"><xsl:text>ill</xsl:text><xsl:number count="illustration[@class='float']" 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>
- </p><xsl:value-of select="$newline" />
- </div></div><xsl:value-of select="$newline" />
-
- <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']" from="/" level="any" format="1" /></xsl:with-param>
- </xsl:call-template>
- </xsl:when>
-
- <xsl:otherwise>
- <div class="illustration"><div align="center"><xsl:value-of select="$newline" />
- <p><img src="{$illustration-src}" width="{$illustration-width}" height="{$illustration-height}" border="0" align="middle" alt="[illustration]" /></p><xsl:value-of select="$newline" />
- </div></div><xsl:value-of select="$newline" />
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="instance" />
-
-<xsl:template match="footnotes" />
-
-<xsl:template match="footnote" />
-
-<xsl:template match="hr">
- <hr />
- <xsl:value-of select="$newline" />
-</xsl:template>
-
-<!-- ==================== inline elements ======================= -->
-
-<xsl:template match="a">
- <xsl:choose>
- <xsl:when test="@href">
- <a>
- <xsl:attribute name="href"><xsl:value-of select="@href" /></xsl:attribute>
- <xsl:if test="@id"><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
- <xsl:apply-templates />
- </a>
- </xsl:when>
- <xsl:otherwise>
- <a>
- <xsl:if test="@idref">
- <xsl:variable name="my-idref" select="@idref" />
- <xsl:attribute name="href">
- <xsl:choose>
- <!-- The order of these tests is deliberate. They are ordered roughly from most to least specific. -->
- <xsl:when test="/gamebook/section[@id=$my-idref] | /gamebook/section/data/section[@id=$my-idref]">
- <xsl:value-of select="$my-idref" /><xsl:text>.htm</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/section/data/section/data/section[@class='frontmatter-separate' and @id=$my-idref]">
- <xsl:value-of select="$my-idref" /><xsl:text>.htm</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/section/data/section/data/section[@class='mainmatter-separate' and @id=$my-idref]">
- <xsl:value-of select="$my-idref" /><xsl:text>.htm</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/section/data/section/data/section[@class='numbered' and @id=$my-idref]">
- <xsl:value-of select="$my-idref" /><xsl:text>.htm</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/section/data/section/data/section[@class='glossary-separate' and @id=$my-idref]">
- <xsl:value-of select="$my-idref" /><xsl:text>.htm</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/section/data/section/data/section[@class='frontmatter-separate' and descendant::*[@id=$my-idref]]">
- <xsl:value-of select="/gamebook/section/data/section/data/section[@class='frontmatter-separate' and descendant::*[@id=$my-idref]]/@id" /><xsl:text>.htm#</xsl:text><xsl:value-of select="$my-idref" />
- </xsl:when>
- <xsl:when test="/gamebook/section/data/section/data/section[@class='mainmatter-separate' and descendant::*[@id=$my-idref]]">
- <xsl:value-of select="/gamebook/section/data/section/data/section[@class='mainmatter-separate' and descendant::*[@id=$my-idref]]/@id" /><xsl:text>.htm#</xsl:text><xsl:value-of select="$my-idref" />
- </xsl:when>
- <xsl:when test="/gamebook/section/data/section/data/section[@class='glossary-separate' and descendant::*[@id=$my-idref]]">
- <xsl:value-of select="/gamebook/section/data/section/data/section[@class='glossary-separate' and descendant::*[@id=$my-idref]]/@id" /><xsl:text>.htm#</xsl:text><xsl:value-of select="$my-idref" />
- </xsl:when>
- <xsl:when test="/gamebook/section/data/section[descendant::*[@id=$my-idref]]">
- <xsl:value-of select="/gamebook/section/data/section[descendant::*[@id=$my-idref]]/@id" /><xsl:text>.htm#</xsl:text><xsl:value-of select="$my-idref" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>[error: "a" template]</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@id"><xsl:attribute name="name"><xsl:value-of select="@id" /></xsl:attribute></xsl:if>
- <xsl:apply-templates />
- </a>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template match="a[@class='footnote']">
- <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="a[@class='footnote']" from="/" level="any" format="1" />
- </a>
- </sup>
-</xsl:template>
-
-<xsl:template match="em">
- <em><xsl:apply-templates /></em>
-</xsl:template>
-
-<xsl:template match="strong">
- <strong><xsl:apply-templates /></strong>
-</xsl:template>
-
-<xsl:template match="thought">
- <i><xsl:apply-templates /></i>
-</xsl:template>
-
-<xsl:template match="onomatopoeia">
- <i><xsl:apply-templates /></i>
-</xsl:template>
-
-<xsl:template match="spell">
- <i><xsl:apply-templates /></i>
-</xsl:template>
-
-<xsl:template match="item">
- <xsl:apply-templates />
-</xsl:template>
-
-<xsl:template match="foreign">
- <i><xsl:apply-templates /></i>
-</xsl:template>
-
-<xsl:template match="quote">
- <xsl:text>'</xsl:text>
- <xsl:apply-templates />
- <xsl:if test="not(self::*[@class='open-ended'])"><xsl:text>'</xsl:text></xsl:if>
-</xsl:template>
-
-<xsl:template match="quote//quote">
- <xsl:text>"</xsl:text>
- <xsl:apply-templates />
- <xsl:if test="not(self::*[@class='open-ended'])"><xsl:text>"</xsl:text></xsl:if>
-</xsl:template>
-
-<xsl:template match="cite">
- <cite><xsl:apply-templates /></cite>
-</xsl:template>
-
-<xsl:template match="code">
- <tt><xsl:apply-templates /></tt>
-</xsl:template>
-
-<xsl:template match="br">
- <br />
-</xsl:template>
-
-<xsl:template match="typ[@class='attribute']">
- <span class="smallcaps"><xsl:apply-templates /></span>
-</xsl:template>
-
-<!-- ==================== named templates ======================= -->
-
-<xsl:template name="xhtml-wrapper">
- <xsl:param name="document-type">undefined</xsl:param>
- <xsl:param name="filename">undefined</xsl:param>
- <xsl:param name="glossary-id-prefix"></xsl:param>
-
- <redirect:write file="{$book-path}/{$filename}.htm">
- <xsl:fallback>
- <xsl:text>xhtml-wrapper: Cannot write to filename: "</xsl:text>
- <xsl:value-of select="$filename" /><xsl:text>.htm"</xsl:text>
- </xsl:fallback>
-
- <xsl:comment>
- <xsl:text> </xsl:text>
- <xsl:apply-templates select="/gamebook/meta/rights[@class='copyrights']" />
- <xsl:text> Published by </xsl:text>
- <xsl:value-of select="/gamebook/meta/publisher[1]" />
- <xsl:text>. </xsl:text>
- </xsl:comment>
- <xsl:value-of select="$newline" />
-
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-UK" lang="en-UK">
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <head><xsl:value-of select="$newline" />
- <title>
- <xsl:value-of select="/gamebook/meta/title[1]" />
- <xsl:text>: </xsl:text>
- <xsl:choose>
- <xsl:when test="$document-type='illustration'">
- <xsl:text>Illustration </xsl:text>
- <xsl:number count="illustration[@class='float']" from="/" level="any" format="I" />
- </xsl:when>
- <xsl:otherwise><xsl:value-of select="meta/title[1]" /></xsl:otherwise>
- </xsl:choose>
- </title><xsl:value-of select="$newline" />
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><xsl:value-of select="$newline" />
- <meta name="robots" content="noindex,nofollow" /><xsl:value-of select="$newline" />
- <link rel="stylesheet" href="main.css" type="text/css" /><xsl:value-of select="$newline" />
- </head>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <body>
- <xsl:attribute name="text"><xsl:value-of select="$text-color" /></xsl:attribute>
- <xsl:attribute name="bgcolor"><xsl:value-of select="$background-color" /></xsl:attribute>
- <xsl:attribute name="background"><xsl:text>bckgrnd.gif</xsl:text></xsl:attribute>
- <xsl:attribute name="link"><xsl:value-of select="$link-color" /></xsl:attribute>
- <xsl:attribute name="alink"><xsl:value-of select="$alink-color" /></xsl:attribute>
- <xsl:attribute name="vlink"><xsl:value-of select="$vlink-color" /></xsl:attribute>
-
- <xsl:value-of select="$newline" />
- <h1><xsl:value-of select="/gamebook/meta/title[1]" /></h1><xsl:value-of select="$newline" />
- <div id="body"><xsl:value-of select="$newline" />
-
- <xsl:choose>
-
-<!-- ~~~~~~~~~~~~~~~~~~~~~~~~ top-level ~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <xsl:when test="$document-type='top-level'">
- <div class="frontmatter"><xsl:value-of select="$newline" />
- <p class="author"><xsl:apply-templates select="/gamebook/meta/creator[@class='medium']" /></p>
-
- <xsl:apply-templates select="/gamebook/meta/description[@class='publication']" />
-
- <p>
- <xsl:text>Publication Date: </xsl:text>
- <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:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 2">
- <xsl:text>February</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 3">
- <xsl:text>March</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 4">
- <xsl:text>April</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 5">
- <xsl:text>May</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 6">
- <xsl:text>June</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 7">
- <xsl:text>July</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 8">
- <xsl:text>August</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 9">
- <xsl:text>September</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 10">
- <xsl:text>October</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 11">
- <xsl:text>November</xsl:text>
- </xsl:when>
- <xsl:when test="/gamebook/meta/date[@class='publication']/month = 12">
- <xsl:text>December</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>Invalid Month</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text> </xsl:text>
- <xsl:value-of select="/gamebook/meta/date[@class='publication']/year" />
- </p>
-
- <xsl:apply-templates select="/gamebook/meta/rights[@class='license-notification']" />
-
- <hr />
-
- <xsl:apply-templates select="/gamebook/meta/description[@class='blurb']" />
- <xsl:apply-templates select="/gamebook/meta/creator[@class='long']" />
-
- <xsl:value-of select="$newline" />
-
- <xsl:call-template name="navigation-bar" />
-
- <xsl:value-of select="$newline" />
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
-
- </xsl:when>
-
-<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ toc ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <xsl:when test="$document-type='toc'">
- <div class="frontmatter"><xsl:value-of select="$newline" />
- <h2>Table of Contents</h2><xsl:value-of select="$newline" />
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <ul><xsl:value-of select="$newline" />
- <li>
- <a><xsl:attribute name="href"><xsl:value-of select="@id" /><xsl:text>.htm</xsl:text></xsl:attribute>
- <xsl:value-of select="meta/title[1]" />
- </a>
- </li>
- <xsl:for-each select="data/section">
- <li>
- <a><xsl:attribute name="href"><xsl:value-of select="@id" /><xsl:text>.htm</xsl:text></xsl:attribute>
- <xsl:value-of select="meta/title[1]" />
- </a>
- <xsl:if test="data/section[@class='frontmatter-separate' or @class='mainmatter-separate']">
- <xsl:value-of select="$newline" />
- <ul><xsl:value-of select="$newline" />
- <xsl:for-each select="data/section[@class='frontmatter-separate' or @class='mainmatter-separate']">
- <li>
- <a><xsl:attribute name="href"><xsl:value-of select="@id" /><xsl:text>.htm</xsl:text></xsl:attribute>
- <xsl:value-of select ="meta/title[1]" />
- </a>
- </li><xsl:value-of select="$newline" />
- </xsl:for-each>
- </ul><xsl:value-of select="$newline" />
- </xsl:if>
- </li><xsl:value-of select="$newline" />
- </xsl:for-each>
- </ul><xsl:value-of select="$newline" />
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
- <xsl:call-template name="navigation-bar" />
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
- </xsl:when>
-
-<!-- ~~~~~~~~~~~~~~~~ second-level-frontmatter ~~~~~~~~~~~~~~~~~~~ -->
-
- <xsl:when test="$document-type='second-level-frontmatter'">
- <div class="frontmatter"><xsl:value-of select="$newline" />
- <h2><xsl:value-of select="meta/title" /></h2><xsl:value-of select="$newline" />
-
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-
- <xsl:value-of select="$newline" />
-
- <xsl:call-template name="navigation-bar" />
-
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
- </xsl:when>
-
-<!-- ~~~~~~~~~~~~~ third-level-frontmatter-separate ~~~~~~~~~~~~~~ -->
-
- <xsl:when test="$document-type='third-level-frontmatter-separate'">
- <div class="frontmatter"><xsl:value-of select="$newline" />
- <h3><xsl:value-of select="meta/title" /></h3><xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-
- <xsl:value-of select="$newline" />
-
- <xsl:call-template name="navigation-bar" />
-
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
- </xsl:when>
-
-<!-- ~~~~~~~~~~~~~~~~ second-level-mainmatter ~~~~~~~~~~~~~~~~~~~ -->
-
- <xsl:when test="$document-type='second-level-mainmatter'">
- <div class="mainmatter"><xsl:value-of select="$newline" />
- <h2><xsl:value-of select="meta/title" /></h2><xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-
- <xsl:value-of select="$newline" />
-
- <xsl:call-template name="navigation-bar" />
-
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
- </xsl:when>
-
-<!-- ~~~~~~~~~~~~~ third-level-mainmatter-separate ~~~~~~~~~~~~~~ -->
-
- <xsl:when test="$document-type='third-level-mainmatter-separate'">
- <div class="mainmatter"><xsl:value-of select="$newline" />
- <h3><xsl:value-of select="meta/title" /></h3><xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-
- <xsl:value-of select="$newline" />
-
- <xsl:call-template name="navigation-bar" />
-
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
- </xsl:when>
-
-<!-- ~~~~~~~~~~~~~~~~ second-level-glossary ~~~~~~~~~~~~~~~~~~~ -->
-
- <xsl:when test="$document-type='second-level-glossary'">
- <div class="mainmatter"><xsl:value-of select="$newline" />
- <h2><xsl:value-of select="meta/title" /></h2><xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-
- <xsl:value-of select="$newline" />
-
- <xsl:call-template name="alpha-bar">
- <xsl:with-param name="alpha-bar-id-prefix"><xsl:value-of select="$glossary-id-prefix" /></xsl:with-param>
- </xsl:call-template>
-
- <xsl:call-template name="navigation-bar" />
-
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
- </xsl:when>
-
-<!-- ~~~~~~~~~~~~~ third-level-glossary-separate ~~~~~~~~~~~~~~ -->
-
- <xsl:when test="$document-type='third-level-glossary-separate'">
- <div class="glossary"><xsl:value-of select="$newline" />
- <h3><xsl:value-of select="meta/title" /></h3><xsl:value-of select="$newline" />
- <xsl:call-template name="alpha-bar">
- <xsl:with-param name="alpha-bar-id-prefix"><xsl:value-of select="$glossary-id-prefix" /></xsl:with-param>
- </xsl:call-template>
-
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-
- <xsl:value-of select="$newline" />
-
- <xsl:call-template name="navigation-bar" />
- <xsl:value-of select="$newline" />
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
- </xsl:when>
-
-<!-- ~~~~~~~~~~~~~~~~~~ second-level-numbered ~~~~~~~~~~~~~~~~~~~~ -->
-
- <xsl:when test="$document-type='second-level-numbered'">
- <div class="frontmatter"><xsl:value-of select="$newline" />
- <h2><xsl:value-of select="meta/title" /></h2><xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <p>
- <xsl:for-each select="data/section">
- <xsl:if test="position() mod 50 = 1">
- <a>
- <xsl:attribute name="href"><xsl:text>#</xsl:text><xsl:value-of select="position()" /></xsl:attribute>
- <xsl:value-of select="position()" /><xsl:text> - </xsl:text>
- <xsl:choose>
- <xsl:when test="position() + 49 <= last()">
- <xsl:value-of select="position() + 49" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="last()" />
- </xsl:otherwise>
- </xsl:choose>
- </a><br /><xsl:value-of select="$newline" />
- </xsl:if>
- </xsl:for-each>
- </p>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <hr />
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:for-each select="data/section">
- <xsl:if test="position() mod 10 = 1">
- <h3>
- <a>
- <xsl:attribute name="name"><xsl:value-of select="position()" /></xsl:attribute>
- <xsl:value-of select="position()" /><xsl:text> - </xsl:text>
- <xsl:choose>
- <xsl:when test="position() + 9 <= last()">
- <xsl:value-of select="position() + 9" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="last()" />
- </xsl:otherwise>
- </xsl:choose>
- </a>
- </h3><xsl:value-of select="$newline" />
- <xsl:text disable-output-escaping="yes"><p class="center"><tt>[</xsl:text>
- </xsl:if>
- <a>
- <xsl:attribute name="href"><xsl:value-of select="@id" /><xsl:text>.htm</xsl:text></xsl:attribute>
- <xsl:value-of select="meta/title[1]" />
- </a>
- <xsl:choose>
- <xsl:when test="position() mod 10 = 0">
- <xsl:text disable-output-escaping="yes">]</tt></p></xsl:text>
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>|</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:call-template name="navigation-bar" />
- <xsl:value-of select="$newline" />
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
- </xsl:when>
-
-<!-- ~~~~~~~~~~~~~~~~~~ third-level-numbered ~~~~~~~~~~~~~~~~~~~~~ -->
-
- <xsl:when test="$document-type='third-level-numbered'">
- <div class="numbered"><xsl:value-of select="$newline" />
- <h3><xsl:value-of select="meta/title" /></h3><xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-
- <xsl:value-of select="$newline" />
- <xsl:call-template name="navigation-bar" />
- <xsl:value-of select="$newline" />
- </div>
- </xsl:when>
-
-<!-- ~~~~~~~~~~~~~~~~~ second-level-backmatter ~~~~~~~~~~~~~~~~~~~ -->
-
- <xsl:when test="$document-type='second-level-backmatter'">
- <div class="frontmatter"><xsl:value-of select="$newline" />
- <h2><xsl:value-of select="meta/title" /></h2><xsl:value-of select="$newline" />
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:apply-templates />
-
- <xsl:value-of select="$newline" />
-
- <xsl:call-template name="navigation-bar" />
- <xsl:value-of select="$newline" />
- </div><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
- </xsl:when>
-
-<!-- ~~~~~~~~~~~~~~~~~~~~~~~ map-adjusted ~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <xsl:when test="$document-type='map-adjusted'">
- <div class="frontmatter"><xsl:value-of select="$newline" />
- <h2><xsl:value-of select="meta/title" /></h2><xsl:value-of select="$newline" />
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:for-each select="data/* | data/text()">
- <xsl:choose>
- <xsl:when test="self::illustration">
- <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>
-
- <p>[map]</p>
-
-<!-- <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" />
- <br /><br />
- </div></div><xsl:value-of select="$newline" /> -->
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
-
- <xsl:value-of select="$newline" />
-
- <xsl:call-template name="navigation-bar" />
- <xsl:value-of select="$newline" />
- </div>
- </xsl:when>
-
-<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~ map ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <xsl:when test="$document-type='map'">
- <div class="frontmatter"><xsl:value-of select="$newline" />
- <h2><xsl:value-of select="meta/title" /></h2><xsl:value-of select="$newline" />
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- <xsl:for-each select="data/* | data/text()">
- <xsl:choose>
- <xsl:when test="self::illustration">
- <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" />
-
- <p>[map]</p>
-
-<!-- <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" />
- </div></div><xsl:value-of select="$newline" />-->
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="." />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
-
- <xsl:value-of select="$newline" />
-
- <xsl:call-template name="navigation-bar" />
- <xsl:value-of select="$newline" />
- </div>
- </xsl:when>
-
-<!-- ~~~~~~~~~~~~~~~~~~~~~~ illustration ~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <xsl:when test="$document-type='illustration'">
- <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" />
-
- <h3>
- <xsl:text>Illustration </xsl:text>
- <xsl:number count="illustration[@class='float']" from="/" level="any" format="I" />
- </h3><xsl:value-of select="$newline" />
-
- <div class="illustration"><div align="center"><xsl:value-of select="$newline" />
- <p><img src="{$illustration-src}" width="{$illustration-width}" height="{$illustration-height}" align="middle" border="0" alt="[illustration]" /></p><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>
-
-<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <xsl:otherwise>
- <xsl:message>
- <xsl:text>xhtml-wrapper: Cannot process document of type "</xsl:text>
- <xsl:value-of select="$document-type" />
- <xsl:text>".</xsl:text>
- </xsl:message>
- <p>
- <xsl:text>xhtml-wrapper: Cannot process document of type "</xsl:text>
- <xsl:value-of select="$document-type" />
- <xsl:text>".</xsl:text>
- </p>
- </xsl:otherwise>
-
- </xsl:choose>
-
-<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
-
- <xsl:call-template name="process-footnotes" />
-
- <p class="copyright"><xsl:apply-templates select="/gamebook/meta/rights[@class='copyrights']" /></p><xsl:value-of select="$newline" /><xsl:value-of select="$newline" />
-
- </div><xsl:value-of select="$newline" />
-
- <map name="imagemap" id="imagemap">
- <area shape="rect" coords="0,0,99,99" href="http://www.projectaon.org/" alt="Project Aon" />
- <area shape="default" href="title.htm" alt="The Masters of Darkness" />
- </map>
-
- </body>
-
- <xsl:value-of select="$newline" />
- <xsl:value-of select="$newline" />
-
- </html>
- </redirect:write>
-
-</xsl:template>
-
-<xsl:template name="process-footnotes">
- <xsl:if test="footnotes/footnote">
- <div id="footnotes"><xsl:value-of select="$newline" />
- <xsl:for-each select="footnotes/footnote">
- <xsl:variable name="footnote-idref" select="@idref" />
- <xsl:variable name="footnote-id" select="@id" />
- <xsl:variable name="footnote-marker"><xsl:number count="footnotes/footnote" from="/" level="any" format="1" /></xsl:variable>
-
- <xsl:for-each select="*[1]">
- <p>
- <xsl:text>[</xsl:text>
- <a href="#{$footnote-idref}" name="{$footnote-id}"><xsl:value-of select="$footnote-marker" /></a>
- <xsl:text>] </xsl:text>
- <xsl:apply-templates select="child::* | child::text()" />
- </p>
- </xsl:for-each>
-
- <xsl:for-each select="*[position() != 1]">
- <xsl:apply-templates select="." />
- </xsl:for-each>
- </xsl:for-each>
- </div><xsl:value-of select="$newline" />
- </xsl:if>
-</xsl:template>
-
-<xsl:template name="navigation-bar">
- <div class="navigation">
- <table cellspacing="0" cellpadding="0" border="0">
- <tr>
- <td>
- <xsl:choose>
- <xsl:when test="meta/link[@class='prev']">
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="meta/link[@class='prev']/@idref" />
- <xsl:text>.htm</xsl:text>
- </xsl:attribute>
- <img src="back.gif" width="150" height="30" border="0">
- <xsl:attribute name="alt">
- <xsl:value-of select="id( meta/link[@class='prev']/@idref )/meta/title" />
- </xsl:attribute>
- </img>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <img src="left.gif" width="150" height="30" border="0" alt="" />
- </xsl:otherwise>
- </xsl:choose>
- </td>
- <td><a href="toc.htm"><img src="toc.gif" width="150" height="30" border="0" alt="" /></a></td>
- <td>
- <xsl:choose>
- <xsl:when test="meta/link[@class='next']">
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="meta/link[@class='next']/@idref" />
- <xsl:text>.htm</xsl:text>
- </xsl:attribute>
- <img src="forward.gif" width="150" height="30" border="0">
- <xsl:attribute name="alt">
- <xsl:choose>
- <xsl:when test="$next-id = 'sect1'">
- <xsl:text>Section 1</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="id( meta/link[@class='next']/@idref )/meta/title" />
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </img>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <img src="right.gif" width="150" height="30" border="0" alt="" />
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </tr>
- </table>
- </div>
-</xsl:template>
-
-<xsl:template name="alpha-bar">
- <xsl:param name="alpha-bar-id-prefix"></xsl:param>
-
- <p class="navigation">[<a href="{$alpha-bar-id-prefix}a.htm">A</a> <a href="{$alpha-bar-id-prefix}b.htm">B</a> <a href="{$alpha-bar-id-prefix}c.htm">C</a> <a href="{$alpha-bar-id-prefix}d.htm">D</a> <a href="{$alpha-bar-id-prefix}e.htm">E</a> <a href="{$alpha-bar-id-prefix}f.htm">F</a> <a href="{$alpha-bar-id-prefix}g.htm">G</a> <a href="{$alpha-bar-id-prefix}h.htm">H</a> <a href="{$alpha-bar-id-prefix}i.htm">I</a> <a href="{$alpha-bar-id-prefix}j.htm">J</a> <a href="{$alpha-bar-id-prefix}k.htm">K</a> <a href="{$alpha-bar-id-prefix}l.htm">L</a> <a href="{$alpha-bar-id-prefix}m.htm">M</a> <a href="{$alpha-bar-id-prefix}n.htm">N</a> <a href="{$alpha-bar-id-prefix}o.htm">O</a> <a href="{$alpha-bar-id-prefix}p.htm">P</a> <a href="{$alpha-bar-id-prefix}q.htm">Q</a> <a href="{$alpha-bar-id-prefix}r.htm">R</a> <a href="{$alpha-bar-id-prefix}s.htm">S</a> <a href="{$alpha-bar-id-prefix}t.htm">T</a> <a href="{$alpha-bar-id-prefix}u.htm">U</a> <a href="{$alpha-bar-id-prefix}v.htm">V</a> <a href="{$alpha-bar-id-prefix}w.htm">W</a> <a href="{$alpha-bar-id-prefix}x.htm">X</a> <a href="{$alpha-bar-id-prefix}y.htm">Y</a> <a href="{$alpha-bar-id-prefix}z.htm">Z</a>]</p><xsl:value-of select="$newline" />
-
-</xsl:template>
-
-</xsl:transform>
\ No newline at end of file