| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329 |
- <?xml version="1.0"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output doctype-system="isetup.dtd" indent="yes" encoding="utf-8"/>
- <xsl:strip-space elements="*"/>
- <xsl:template match="yasyx">
- <xsl:comment>
- Inno Setup Preprocessor Reference
- Copyright (C) 1997-2025 Jordan Russell
- Portions Copyright (C) 2000-2024 Martijn Laan
- For conditions of distribution and use, see LICENSE.TXT.
- Portions Copyright (C) 2001-2004 Alex Yackimoff
- This file is automatically generated by ISHelpGen. Do not edit.
- </xsl:comment>
- <ishelp version="1">
- <xsl:apply-templates/>
- </ishelp>
- </xsl:template>
- <xsl:variable name="lcletters">abcdefghijklmnopqrstuvwxyz</xsl:variable>
- <xsl:variable name="ucletters">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
- <xsl:template match="topic">
- <topic name="{translate(@id,$ucletters,$lcletters)}" title="Inno Setup Preprocessor: {title}">
- <xsl:if test="title">
- <keyword value="{title}" />
- </xsl:if>
- <xsl:for-each select="keywords/kwd">
- <keyword value="{text()}" />
- </xsl:for-each>
- <body>
- <xsl:apply-templates select="*[name()!='topic']"/>
- <xsl:if test="topic">
- <heading><xsl:value-of select="subtopicstitle"/></heading>
- <ul>
- <xsl:choose>
- <xsl:when test="@id='funcs'">
- <xsl:for-each select="topic">
- <xsl:sort select="title" data-type="text" order="ascending"/>
- <xsl:if test="title">
- <li><link topic="{translate(@id,$ucletters,$lcletters)}"><xsl:value-of select="title"/></link></li>
- </xsl:if>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <xsl:for-each select="topic">
- <xsl:if test="title and not(@unlisted='yes')">
- <li><link topic="{translate(@id,$ucletters,$lcletters)}"><xsl:value-of select="title"/></link></li>
- </xsl:if>
- </xsl:for-each>
- </xsl:otherwise>
- </xsl:choose>
- </ul>
- </xsl:if>
- </body>
- </topic>
- <xsl:for-each select="topic">
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- </xsl:template>
- <xsl:template match="title">
- </xsl:template>
- <xsl:template match="subtopicstitle">
- </xsl:template>
- <xsl:template match="line">
- <xsl:apply-templates/><br />
- </xsl:template>
- <xsl:template match="table">
- <table><xsl:apply-templates/></table>
- </xsl:template>
- <xsl:template match="tr">
- <tr><xsl:apply-templates/></tr>
- </xsl:template>
- <xsl:template match="td">
- <td><xsl:apply-templates/></td>
- </xsl:template>
- <xsl:template match="code">
- <tt><xsl:apply-templates/></tt>
- </xsl:template>
- <xsl:template match="keywords">
- </xsl:template>
- <xsl:template match="description">
- <xsl:if test="@header='yes'">
- <heading>Description</heading>
- </xsl:if>
- <xsl:apply-templates/>
- </xsl:template>
- <xsl:template match="section">
- <heading><xsl:value-of select="@title"/></heading>
- <xsl:apply-templates/>
- </xsl:template>
- <xsl:template match="p">
- <p><xsl:apply-templates/></p>
- </xsl:template>
- <xsl:template match="ul">
- <ul><xsl:apply-templates/></ul>
- </xsl:template>
- <xsl:template match="li">
- <li><xsl:apply-templates/></li>
- </xsl:template>
- <xsl:template match="tt">
- <tt><xsl:apply-templates/></tt>
- </xsl:template>
- <xsl:template match="syntax">
- <heading>Syntax</heading>
- <xsl:apply-templates select="*[@inline!='yes']"/>
- </xsl:template>
- <xsl:template match="pre">
- <p><tt><xsl:apply-templates/></tt></p>
- </xsl:template>
- <xsl:template match="alink">
- <!-- <link topic="{@kwd}"><xsl:apply-templates/></link> -->
- </xsl:template>
- <xsl:template match="extlink">
- <extlink href="{@href}"><xsl:apply-templates/></extlink>
- </xsl:template>
- <xsl:template match="link">
- <xsl:choose>
- <xsl:when test="ancestor::topic/@id=@href">
- <xsl:choose>
- <xsl:when test="text()">
- <xsl:apply-templates/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="//topic[@id=current()/@href]/@usetitle='no'">
- <xsl:value-of select="//topic[@id=current()/@href]/@id"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="//topic[@id=current()/@href]/title/text()"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <link topic="{translate(@href,$ucletters,$lcletters)}">
- <xsl:choose>
- <xsl:when test="text()">
- <xsl:apply-templates/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="//topic[@id=current()/@href]/@usetitle='no'">
- <xsl:value-of select="//topic[@id=current()/@href]/@id"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="//topic[@id=current()/@href]/title/text()"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </link></xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <!--SYNTAX-->
- <xsl:template match="txt">
- <xsl:if test="(ancestor::opt or ancestor::group or ancestor::define[@inline='yes'])=0 or position()!=1">
- <xsl:text> </xsl:text>
- </xsl:if>
- <b><xsl:value-of select="text()"/></b>
- <xsl:if test="(ancestor::opt or ancestor::group or ancestor::define[@inline='yes'])=0 or position()!=last()">
- <xsl:text> </xsl:text>
- </xsl:if>
- </xsl:template>
- <xsl:template match="define/variant">
- <xsl:apply-templates/>
- </xsl:template>
- <xsl:template match="b">
- <xsl:copy-of select="."/></xsl:template>
- <xsl:template match="i">
- <xsl:copy-of select="."/></xsl:template>
- <xsl:template match="nt">
- <xsl:if test="(ancestor::opt or ancestor::group)=0 or position()!=last()">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="@name">
- <xsl:choose>
- <xsl:when test="id(@name)[@inline='yes']">
- <xsl:apply-templates select="id(@name)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text><</xsl:text>
- <!--link>
- <xsl:attribute name="href">
- <xsl:value-of select="@name"/>
- </xsl:attribute-->
- <xsl:value-of select="@name"/>
- <!--/link-->
- <xsl:text>></xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text><</xsl:text>
- <xsl:value-of select="text()"/>
- <xsl:text>></xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="(ancestor::opt or ancestor::group)=0 or position()!=last()">
- <xsl:text> </xsl:text>
- </xsl:if>
- </xsl:template>
- <xsl:template match="opt">
- <xsl:if test="(ancestor::opt or ancestor::group)=0 or position()!=1">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:text>[</xsl:text>
- <xsl:apply-templates/>
- <xsl:text>]</xsl:text>
- <xsl:if test="@repeated='yes'">
- <xsl:text>...</xsl:text>
- </xsl:if>
- <xsl:if test="(ancestor::opt or ancestor::group)=0 or position()!=last()">
- <xsl:text> </xsl:text>
- </xsl:if>
- </xsl:template>
- <xsl:template match="define">
- <xsl:choose>
- <xsl:when test="@inline='yes'">
- <xsl:apply-templates/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="variant">
- <table>
- <tr>
- <td>
- <i><xsl:value-of select="@id"/>
- <xsl:text>:</xsl:text></i></td>
- <td>
- <xsl:apply-templates select="variant[position()=1]"/>
- </td>
- </tr>
- <xsl:for-each select="variant[position()!=1]">
- <tr>
- <td></td>
- <td><xsl:apply-templates/></td>
- </tr>
- </xsl:for-each>
- </table>
- <!-- NT DESCRIPTION -->
- <xsl:for-each select="description">
- <para><xsl:value-of select="text()"/></para>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <table><tr><td><i><xsl:value-of select="@id"/><xsl:text>:</xsl:text></i>
- </td><td><xsl:apply-templates/></td></tr></table>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="br">
- <br/>
- </xsl:template>
- <xsl:template match="case" name="fromcases">
- <xsl:if test="child::*[position()>1] or id(nt/@name)/@inline='yes'">
- <xsl:text>(</xsl:text>
- </xsl:if>
- <xsl:apply-templates/>
- <xsl:if test="child::*[position()>1] or id(nt/@name)/@inline='yes'">
- <xsl:text>)</xsl:text>
- </xsl:if>
- </xsl:template>
- <xsl:template match="cases">
- <xsl:for-each select="case[position()!=last()]">
- <xsl:call-template name="fromcases"/>
- <xsl:text> | </xsl:text>
- </xsl:for-each>
- <xsl:apply-templates select="case[position()=last()]"/>
- </xsl:template>
- <xsl:template match="group">
- <xsl:if test="(ancestor::opt or ancestor::group)=0 or position()!=1">
- <xsl:text> </xsl:text>
- </xsl:if>
- <xsl:text>(</xsl:text>
- <xsl:apply-templates/>
- <xsl:text>)</xsl:text>
- <xsl:if test="@repeated='yes'">
- <xsl:text>...</xsl:text>
- </xsl:if>
- <xsl:if test="(ancestor::opt or ancestor::group)=0 or position()!=last()">
- <xsl:text> </xsl:text>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
|