Warning, /frameworks/kdoctools/src/customization/kde-chunk.xsl is written in an unsupported language. File is not indexed.

0001 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
0002                 version="1.0">
0003 
0004 <xsl:import href="kde-chunk-common.xsl"/>
0005 <xsl:include href="kde-navig.xsl"/>
0006 <xsl:include href="kde-ttlpg.xsl"/>
0007 <xsl:include href="kde-style.xsl"/>
0008 
0009 <xsl:variable name="KDOCTOOLS_XSLT_VERSION">1.14</xsl:variable>
0010 
0011 <xsl:template name="make-relative-filename">
0012   <xsl:param name="base.dir" select="'./'"/>
0013   <xsl:param name="base.name" select="''"/>
0014 
0015   <!-- XT makes chunks relative -->
0016   <xsl:choose>
0017     <xsl:when test="count(parent::*) = 0">
0018       <xsl:value-of select="concat($base.dir,$base.name)"/>
0019     </xsl:when>
0020     <xsl:otherwise>
0021       <xsl:value-of select="$base.name"/>
0022     </xsl:otherwise>
0023   </xsl:choose>
0024 </xsl:template>
0025 
0026 <xsl:template name="write.chunk">
0027   <xsl:param name="filename" select="''"/>
0028   <xsl:param name="method" select="'html'"/>
0029   <xsl:param name="encoding" select="'utf-8'"/>
0030   <xsl:param name="content" select="''"/>
0031 
0032   <FILENAME filename="{$filename}">
0033   <xsl:copy-of select="$content"/>
0034   </FILENAME>
0035 </xsl:template>
0036 
0037 <xsl:param name="use.id.as.filename">1</xsl:param>
0038 <xsl:param name="generate.section.toc">0</xsl:param>
0039 <xsl:param name="generate.component.toc">0</xsl:param>
0040 <xsl:param name="use.extensions">0</xsl:param>
0041 <xsl:param name="admon.graphics">0</xsl:param>
0042 <xsl:param name="kde.common">help:/kdoctools5-common/</xsl:param>
0043 <xsl:param name="html.stylesheet" select="concat($kde.common,'kde-default.css',' ',$kde.common,'kde-docs.css',' ',$kde.common,'kde-localised.css')"/>
0044 <xsl:param name="admon.graphics.path"><xsl:value-of select="kde.common"/></xsl:param>
0045 <xsl:param name="footer.email">kde-doc-english@kde.org</xsl:param>
0046 <xsl:param name="footer.teamname">software author</xsl:param>
0047 
0048 <xsl:param name="generate.toc">
0049 appendix  toc,title
0050 article/appendix  nop
0051 article   toc,title
0052 book      toc,title,figure,table,example,equation
0053 chapter   nop
0054 part      toc,title
0055 preface   toc,title
0056 qandadiv  toc
0057 qandaset  toc
0058 reference toc,title
0059 sect1     nop
0060 sect2     nop
0061 sect3     nop
0062 sect4     nop
0063 sect5     nop
0064 section   nop
0065 set       toc,title
0066 </xsl:param>
0067 
0068 
0069 <xsl:template match="/book/bookinfo/legalnotice" mode="titlepage.mode">
0070   <xsl:variable name="filename" select="concat($kde.common,'fdl-notice.html')"/>
0071   <xsl:variable name="title">
0072     <xsl:apply-templates select="." mode="title.markup"/>
0073   </xsl:variable>
0074   <!-- Hard-coding the GNU FDL is not appropriate, but for backward compatibility,
0075        if the text in the legalnotice is the FDL notice, then just show the
0076        "Legal Notice" text, as KDE4 has done from very early.
0077        Otherwise, continue to process the contents of the legalnotice element -->
0078   <xsl:choose>
0079      <xsl:when test=".//xref[@linkend='gnu-fdl']">
0080       <p>
0081         <a href="{$filename}">
0082           <xsl:copy-of select="$title"/>
0083         </a>
0084       </p>
0085     </xsl:when>
0086     <xsl:otherwise>
0087       <xsl:apply-templates select="*"/>
0088     </xsl:otherwise>
0089   </xsl:choose>
0090 </xsl:template>
0091 
0092 <!-- try with olinks: it nearly works --><!--
0093   <xsl:template match="olink">
0094     <a>
0095       <xsl:attribute name="href">
0096         <xsl:choose>
0097           <xsl:when test="@type = 'kde-installation'">
0098             <xsl:choose>
0099               <xsl:when test="@linkmode = 'kdems-man'">
0100                 <xsl:value-of select="id(@linkmode)"/>
0101                 <xsl:value-of select="@targetdocent"/>
0102                 <xsl:text>(</xsl:text>
0103                 <xsl:value-of select="@localinfo"/>
0104                 <xsl:text>)</xsl:text>
0105               </xsl:when>
0106               <xsl:when test="@linkmode = 'kdems-help'">
0107                 <xsl:value-of select="id(@linkmode)"/>
0108                 <xsl:text>/</xsl:text>
0109                 <xsl:value-of select="@targetdocent"/>
0110 <xsl:variable name="targetdocent" select="@targetdocent"/>
0111 <xsl:value-of select="$targetdocent"/>
0112           <xsl:if test="@targetdocent">
0113             <xsl:value-of select="unparsed-entity-uri(string($targetdocent))"/>
0114           </xsl:if>
0115                 <xsl:for-each select="document('/home/fouvry/kdeutils/doc/kedit/index.docbook')">
0116                   <xsl:value-of select=".//*[@id=$localinfo]"/>
0117                 </xsl:for-each>
0118                 <xsl:text>#</xsl:text>
0119                 <xsl:value-of select="@localinfo"/>
0120               </xsl:when>
0121             </xsl:choose>
0122           </xsl:when>
0123         </xsl:choose>
0124       </xsl:attribute>
0125       <xsl:value-of select="."/>
0126     </a>
0127   </xsl:template>
0128 -->
0129 
0130 </xsl:stylesheet>
0131 
0132