883N/A Licensed to the Apache Software Foundation (ASF) under one or more 883N/A contributor license agreements. See the NOTICE file distributed with 883N/A this work for additional information regarding copyright ownership. 883N/A The ASF licenses this file to You under the Apache License, Version 2.0 883N/A (the "License"); you may not use this file except in compliance with 883N/A the License. You may obtain a copy of the License at 883N/A Unless required by applicable law or agreed to in writing, software 883N/A distributed under the License is distributed on an "AS IS" BASIS, 883N/A WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 883N/A See the License for the specific language governing permissions and 883N/A limitations under the License. 883N/A<
xsl:
stylesheet version="1.0" 883N/A<!-- Constants used for case translation --> 883N/A<
xsl:
variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
883N/A<
xsl:
variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
883N/A<!-- ==================================================================== --> 883N/A<!-- Process a documentation section --> 883N/A<!-- ==================================================================== --> 1273N/A<
xsl:
template match="section">
4561N/A<
xsl:
text>\subsection*{</
xsl:
text>
4561N/A<
xsl:
text>}</
xsl:
text><
xsl:
call-
template name="label"/>
883N/A<
xsl:
text>\subsubsection*{</
xsl:
text>
883N/A<
xsl:
text>}</
xsl:
text><
xsl:
call-
template name="label"/>
883N/A<
xsl:
text>\subsubsection*{</
xsl:
text>
883N/A<
xsl:
text>}</
xsl:
text><
xsl:
call-
template name="label"/>
883N/A<
xsl:
template name="label">
883N/A<
xsl:
variable name="metafile" select="document(/*/@metafile)/metafile" />
883N/A<
xsl:
text>\label{</
xsl:
text><
xsl:
value-
of 883N/A<
xsl:
value-
of select="../@id"/>
913N/A<!-- ==================================================================== --> 883N/A<!-- ==================================================================== --> 3996N/A<!-- verbatim inside of fbox doesn't work for some reason --> 3996N/A<
xsl:
template match="example">
3996N/A<
xsl:
text>\par\smallskip\begin{center}</
xsl:
text>
3996N/A<
xsl:
if test="not(pre)"><
xsl:
text>\fbox{</
xsl:
text></
xsl:
if>
4100N/A<
xsl:
text>\begin{minipage}{.8\textwidth}\begin{flushleft}</
xsl:
text>
3996N/A<
xsl:
apply-
templates select="title" mode="print" />
3996N/A<
xsl:
text>{\ttfamily\small </
xsl:
text>
3996N/A<
xsl:
text>\noindent </
xsl:
text><
xsl:
apply-
templates/>
<
xsl:
text>\end{flushleft}\end{minipage}</
xsl:
text>
<
xsl:
if test="not(pre)"><
xsl:
text>}</
xsl:
text></
xsl:
if>
<
xsl:
text>\end{center}\par\smallskip</
xsl:
text>
<
xsl:
text>\textbf{</
xsl:
text>
<
xsl:
text>}\\ </
xsl:
text>
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template match="indent">
<
xsl:
text>\begin{list}{}{\topsep 0pt\rightmargin 0pt\leftmargin 2em}
<
xsl:
text>\end{list}</
xsl:
text>
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template match="note">
<
xsl:
when test="@type='warning'">
<
xsl:
text>\fbox{!} </
xsl:
text>
<
xsl:
text>$\Longrightarrow$</
xsl:
text>
<
xsl:
text>}\begin{minipage}[t]{.8\textwidth}
<
xsl:
apply-
templates select="title" mode="print" />
<
xsl:
text>\end{minipage}\par\smallskip</
xsl:
text>
<
xsl:
template match="note/title" mode="print">
<
xsl:
text>\textbf{</
xsl:
text>
<!-- ==================================================================== --> <!-- Inserts link to another directive, which might be in another module. --> <!-- References are converted into lower case. --> <!-- ==================================================================== --> <
xsl:
template match="directive" name="directive">
<
xsl:
text>\textsc{</
xsl:
text>
<
xsl:
if test="@type='section'"><
xsl:
text>\textless{}</
xsl:
text></
xsl:
if>
<
xsl:
when test="@module">
<
xsl:
text>\hyperlink{/mod/</
xsl:
text>
<
xsl:
value-
of select="normalize-space(@module)"/>
select="normalize-space(translate(@name,$uppercase,$lowercase))"/>
select="normalize-space(translate(.,$uppercase,$lowercase))"/>
<
xsl:
if test="@type='section'"><
xsl:
text>\textgreater{}</
xsl:
text></
xsl:
if>
<
xsl:
template match="directive" mode="tabular">
<
xsl:
text>\textsc{</
xsl:
text>
<
xsl:
if test="@type='section'"><
xsl:
text>\textless{}</
xsl:
text></
xsl:
if>
<
xsl:
when test="@module">
<
xsl:
text>\hyperlink{/mod/</
xsl:
text>
<
xsl:
value-
of select="normalize-space(@module)"/>
select="normalize-space(translate(@name,$uppercase,$lowercase))"/>
select="normalize-space(translate(.,$uppercase,$lowercase))"/>
<
xsl:
apply-
templates mode="tabular"/>
<
xsl:
apply-
templates mode="tabular"/>
<
xsl:
if test="@type='section'"><
xsl:
text>\textgreater{}</
xsl:
text></
xsl:
if>
<!-- ==================================================================== --> <!-- Inserts a link to refereed module --> <!-- ==================================================================== --> <
xsl:
template match="module" name="module">
<
xsl:
when test="@outdated = 'true'">
<
xsl:
text>\textsc{</
xsl:
text>
<
xsl:
text>\textsc{\hyperlink{/mod/</
xsl:
text>
<
xsl:
value-
of select="normalize-space(.)"/>
<
xsl:
template match="module" mode="tabular">
<
xsl:
when test="@outdated = 'true'">
<
xsl:
text>\textsc{</
xsl:
text>
<
xsl:
apply-
templates mode="tabular"/>
<
xsl:
text>\textsc{\hyperlink{/mod/</
xsl:
text>
<
xsl:
value-
of select="normalize-space(.)"/>
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template match="related">
\fbox{\begin{tabular}{rr}
\begin{minipage}[t]{.49\linewidth}
<
xsl:
value-
of select="$message[@id='relatedmodules']" />
<
xsl:
call-
template name="module"/>
\begin{minipage}[t]{.4\linewidth}
<
xsl:
value-
of select="$message[@id='relateddirectives']" />
<
xsl:
call-
template name="directive"/>
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template name="seealso">
<
xsl:
text>\textbf{</
xsl:
text>
<
xsl:
value-
of select="$message[@id='seealso']" />
<
xsl:
text>}\begin{itemize}</
xsl:
text>
<
xsl:
for-
each select="seealso">
<
xsl:
text>\item </
xsl:
text>
<
xsl:
text>\end{itemize}</
xsl:
text>
<!-- ==================================================================== --> <!-- ==================================================================== --> <
xsl:
template name="section-title">
<
xsl:
variable name="metafile" select="document(/*/@metafile)/metafile" />
<
xsl:
text>\section{</
xsl:
text><
xsl:
apply-
templates select="title"/>
<
xsl:
text>\label{</
xsl:
text><
xsl:
value-
of