| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369 |
- <?xml version="1.0" encoding="utf-8"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <!-- ***************************************************************
- VampyreDoc Tool
-
- Documentation XSL stylesheet which transforms VampyreDoc to
- XHTML page (in Borland Dev Studio help style).
- Note: these <xsl:text> </xsl:text> are at the ends of inline
- elements are here because of MS IE. It does not put spaces
- between e.g. <icode>umajo</icode> <b>boldly umajo</b>
- even there is space or linebreak in xml file.
- **************************************************************** -->
- <xsl:output method="xml" encoding="utf-8" indent="no"
- doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
- doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
- <xsl:template match="doc">
- <html>
- <!-- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- this adds ugly empty xmlns="" attribute to many elements
- when transforming with Saxon -->
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <meta name="generator" content="VampyreDoc" />
- <link href="../common/doc.css" type="text/css" rel="stylesheet" />
- <link href="../../common/doc.css" type="text/css" rel="stylesheet" />
- <link href="../../../common/doc.css" type="text/css" rel="stylesheet" />
- <link href="doc.css" type="text/css" rel="stylesheet" />
- <xsl:call-template name="doctitle" />
- </head>
- <body>
- <xsl:apply-templates select="chapter" />
- <br />
- <xsl:call-template name="pagefooter" />
- <br />
- </body>
- </html>
- </xsl:template>
- <!-- ***********************************
- Specials
- *********************************** -->
- <xsl:template match="chapter">
- <xsl:apply-templates />
- </xsl:template>
- <xsl:template match="section">
- <xsl:apply-templates />
- </xsl:template>
- <!-- ***********************************
- Headers & Captions
- *********************************** -->
- <xsl:template name="doctitle">
- <title>
- <xsl:choose>
- <xsl:when test="title!=''">
- <xsl:value-of select="title"/>
- </xsl:when>
- <xsl:otherwise>
- Documentation
- </xsl:otherwise>
- </xsl:choose>
- </title>
- </xsl:template>
- <xsl:template match="title">
- <span class="title">
- <xsl:value-of select="."/>
- </span>
- </xsl:template>
- <xsl:template match="lcap|largecap">
- <span class="subtopic1">
- <xsl:apply-templates/>
- </span>
- </xsl:template>
- <xsl:template match="mcap|mediumcap">
- <span class="subtopic2">
- <xsl:apply-templates/>
- </span>
- </xsl:template>
- <xsl:template match="scap|smallcap">
- <span class="caption">
- <xsl:apply-templates/>
- </span>
- </xsl:template>
- <!-- ***********************************
- Lists
- *********************************** -->
- <xsl:template match="list">
- <ul class="list">
- <xsl:apply-templates select="li" />
- </ul>
- </xsl:template>
- <xsl:template match="linklist|lslist">
- <div class="linklist">
- <div class="s">
- <xsl:value-of select="title"/>
- </div>
- <xsl:apply-templates select="listedlink|lslink" mode="inlist"/>
- </div>
- </xsl:template>
- <xsl:template match="bulletlist|blist">
- <ul class="bullet">
- <xsl:apply-templates select="li" />
- </ul>
- </xsl:template>
- <xsl:template match="orderedlist|olist">
- <ol class="orderedlist">
- <xsl:apply-templates select="li"/>
- </ol>
- </xsl:template>
- <xsl:template match="li">
- <li class="li">
- <xsl:apply-templates />
- </li>
- </xsl:template>
- <!-- ***********************************
- Text Formatting
- *********************************** -->
- <xsl:template match="b|bold">
- <b>
- <xsl:apply-templates />
- </b>
- </xsl:template>
- <xsl:template match="u|under">
- <u>
- <xsl:apply-templates />
- </u>
- </xsl:template>
- <xsl:template match="i|italic">
- <i>
- <xsl:apply-templates />
- </i>
- </xsl:template>
- <xsl:template match="center">
- <center>
- <xsl:apply-templates />
- </center>
- </xsl:template>
- <xsl:template match="linebreak|br">
- <br />
- </xsl:template>
- <xsl:template match="par|para">
- <p class="para">
- <xsl:apply-templates />
- </p>
- </xsl:template>
- <xsl:template match="code">
- <pre class="syntax">
- <xsl:apply-templates />
- </pre>
- </xsl:template>
- <xsl:template match="icode">
- <code class="codeinline">
- <xsl:apply-templates />
- </code>
- </xsl:template>
- <xsl:template match="keyword">
- <code class="keyword">
- <xsl:apply-templates />
- </code>
- </xsl:template>
- <xsl:template match="tip">
- <div class="tip">
- Tip:
- <span class="ntwpara">
- <xsl:apply-templates />
- </span>
- </div>
- </xsl:template>
- <xsl:template match="warning|warn">
- <div class="warning">
- Warning:
- <span class="ntwpara">
- <xsl:apply-templates />
- </span>
- </div>
- </xsl:template>
- <xsl:template match="note">
- <div class="note">
- Note:
- <span class="ntwpara">
- <xsl:apply-templates />
- </span>
- </div>
- </xsl:template>
- <xsl:template match="menuitem|mitem">
- <span class="menuitem">
- <xsl:apply-templates />
- </span>
- </xsl:template>
- <!-- ***********************************
- Links
- *********************************** -->
- <xsl:template match="link">
- <span class="link">
- <a>
- <xsl:attribute name="href">
- <xsl:if test="@url!=''">
- <xsl:value-of select="@url"/>
- </xsl:if>
- </xsl:attribute>
- <xsl:apply-templates />
- </a>
- </span>
- </xsl:template>
- <xsl:template match="listedlink|lslink">
- <span class="listedlink">
- <a>
- <xsl:attribute name="href">
- <xsl:if test="@url!=''">
- <xsl:value-of select="@url"/>
- </xsl:if>
- </xsl:attribute>
- <xsl:apply-templates />
- </a>
- </span>
- </xsl:template>
- <xsl:template match="listedlink|lslink" mode="inlist">
- <div class="linklistitem">
- <xsl:apply-templates select="."/>
- </div>
- </xsl:template>
- <xsl:template match="anchor">
- <a>
- <xsl:attribute name="id">
- <xsl:value-of select="@name"/>
- </xsl:attribute>
- <xsl:apply-templates />
- </a>
- </xsl:template>
- <xsl:template match="ref">
- <span class="codeinline">
- <span class="link">
- <a>
- <xsl:attribute name="href">
- <xsl:value-of select="@url"/>
- </xsl:attribute>
- <xsl:apply-templates />
- </a>
- </span>
- </span>
- </xsl:template>
- <!-- ***********************************
- Images
- *********************************** -->
- <xsl:template match="image|img">
- <img class="imageblock">
- <xsl:attribute name="src">
- <xsl:value-of select="@url"/>
- </xsl:attribute>
- <xsl:attribute name="alt">
- <xsl:value-of select="@desc"/>
- </xsl:attribute>
- </img>
- </xsl:template>
- <xsl:template match="inlineimage|inimg">
- <img class="imageinline">
- <xsl:attribute name="src">
- <xsl:value-of select="@url"/>
- </xsl:attribute>
- <xsl:attribute name="alt">
- <xsl:value-of select="@desc"/>
- </xsl:attribute>
- </img>
- </xsl:template>
- <!-- ***********************************
- Tables
- *********************************** -->
- <xsl:template match="table">
- <xsl:if test="title!=''">
- <span class="tabletitle">
- <xsl:value-of select="title"/>
- </span>
- </xsl:if>
- <table class="table">
- <xsl:apply-templates select="row|tr"/>
- </table>
- </xsl:template>
- <xsl:template match="row|tr">
- <tr class="tr">
- <xsl:apply-templates select="cell|th|header|td"/>
- </tr>
- </xsl:template>
- <xsl:template match="cell|td">
- <td class="td">
- <xsl:if test="@colspan!=''">
- <xsl:attribute name="colspan">
- <xsl:value-of select="@colspan"/>
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="@rowspan!=''">
- <xsl:attribute name="rowspan">
- <xsl:value-of select="@rowspan"/>
- </xsl:attribute>
- </xsl:if>
- <span class="tablepara">
- <xsl:apply-templates />
- </span>
- </td>
- </xsl:template>
- <xsl:template match="header|th">
- <th class="th">
- <xsl:apply-templates />
- </th>
- </xsl:template>
- <!-- ***********************************
- Page Footer
- *********************************** -->
- <xsl:template name="pagefooter">
- <br /><br />
- <div class="footer">
- <xsl:text>
- Vampyre Imaging Library (Documentation for version 0.26.4)
- </xsl:text>
- <br />
- <a href="http://imaginglib.sourceforge.net" target="_blank">
- http://imaginglib.sourceforge.net</a>
- <br />
- </div>
- </xsl:template>
- </xsl:stylesheet>
|