1005N/A Licensed to the Apache Software Foundation (ASF) under one or more 1005N/A contributor license agreements. See the NOTICE file distributed with 1005N/A this work for additional information regarding copyright ownership. 1005N/A The ASF licenses this file to You under the Apache License, Version 2.0 1005N/A (the "License"); you may not use this file except in compliance with 1005N/A the License. You may obtain a copy of the License at 1005N/A Unless required by applicable law or agreed to in writing, software 1005N/A distributed under the License is distributed on an "AS IS" BASIS, 1005N/A WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1005N/A See the License for the specific language governing permissions and 1005N/A limitations under the License. 1005N/A<
xsl:
stylesheet version="1.0" 1005N/A<!-- Constants used for case translation --> 1005N/A<
xsl:
variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
1005N/A<
xsl:
variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
1005N/A<!-- ==================================================================== --> 1005N/A<!-- Process a documentation section --> 1005N/A<!-- ==================================================================== --> 1005N/A<
xsl:
template match="section">
1005N/A<
xsl:
text>\subsection*{</
xsl:
text>
<
xsl:
text>}</
xsl:
text><
xsl:
call-
template name="label"/>
<
xsl:
text>\subsubsection*{</
xsl:
text>
<
xsl:
text>}</
xsl:
text><
xsl:
call-
template name="label"/>
<
xsl:
text>\subsubsection*{</
xsl:
text>
<
xsl:
text>}</
xsl:
text><
xsl:
call-
template name="label"/>
<
xsl:
template match="note/title"></
xsl:
template>
<
xsl:
template name="label">
<
xsl:
variable name="metafile" select="document(/*/@metafile)/metafile" />
<
xsl:
text>\label{</
xsl:
text><
xsl:
value-
of <
xsl:
value-
of select="../@id"/>
<!-- ==================================================================== --> <!-- ==================================================================== --> <!-- verbatim inside of fbox doesn't work for some reason --> <
xsl:
template match="example">
<
xsl:
text>\par\smallskip\begin{center}</
xsl:
text>
<
xsl:
if test="not(pre)"><
xsl:
text>\fbox{</
xsl:
text></
xsl:
if>
<
xsl:
text>\begin{minipage}{.8\textwidth}\begin{flushleft}</
xsl:
text>
<
xsl:
apply-
templates select="title" mode="print" />
<
xsl:
text>{\ttfamily\small </
xsl:
text>
<
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:
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:
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:
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