added util xsl sheets from BoostBook
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13197 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1231504465
commit
dbf9692045
362
src/documentation/xsl/annotation.xsl
Normal file
362
src/documentation/xsl/annotation.xsl
Normal file
@ -0,0 +1,362 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
<xsl:key name="classes" match="class|struct|union" use="@name"/>
|
||||
<xsl:key name="methods" match="method|overloaded-method" use="@name"/>
|
||||
<xsl:key name="functions" match="function|overloaded-function" use="@name"/>
|
||||
<xsl:key name="enums" match="enum" use="@name"/>
|
||||
<xsl:key name="libraries" match="library" use="@name"/>
|
||||
<xsl:key name="macros" match="macro" use="@name"/>
|
||||
<xsl:key name="headers" match="header" use="@name"/>
|
||||
<xsl:key name="named-entities" match="class|struct|union|function|overloaded-function|macro|library|*[attribute::id]" use="@name|@id"/>
|
||||
|
||||
<xsl:template match="function|overloaded-function" mode="generate.id">
|
||||
<xsl:variable name="name" select="normalize-space(@name)"/>
|
||||
<xsl:variable name="translated-name"
|
||||
select="translate($name,
|
||||
'~!%^&*()[].,<>|/ +-=',
|
||||
'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(key('named-entities', $name))=1
|
||||
and ($translated-name=$name)">
|
||||
<xsl:value-of select="$name"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="generate-id(.)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="classname" mode="annotation">
|
||||
<!-- Determine the (possibly qualified) class name we are looking for -->
|
||||
<xsl:variable name="fullname">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@alt">
|
||||
<xsl:value-of select="@alt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="string(.)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Strip off any instantiation -->
|
||||
<xsl:variable name="name">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($fullname, '<')">
|
||||
<xsl:value-of select="substring-before($fullname, '<')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$fullname"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Determine the unqualified name -->
|
||||
<xsl:variable name="unqualified-name">
|
||||
<xsl:call-template name="strip-qualifiers">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:call-template name="cxx-link-name">
|
||||
<xsl:with-param name="lookup" select="."/>
|
||||
<xsl:with-param name="type" select="'class'"/>
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="display-name" select="string(.)"/>
|
||||
<xsl:with-param name="unqualified-name" select="$unqualified-name"/>
|
||||
<xsl:with-param name="nodes" select="key('classes', $unqualified-name)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="methodname" mode="annotation">
|
||||
<!-- Determine the (possibly qualified) method name we are looking for -->
|
||||
<xsl:variable name="fullname">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@alt">
|
||||
<xsl:value-of select="@alt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="string(.)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Strip off any call -->
|
||||
<xsl:variable name="name">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($fullname, '(')">
|
||||
<xsl:value-of select="substring-before($fullname, '(')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$fullname"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Determine the unqualified name -->
|
||||
<xsl:variable name="unqualified-name">
|
||||
<xsl:call-template name="strip-qualifiers">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:call-template name="cxx-link-name">
|
||||
<xsl:with-param name="lookup" select="."/>
|
||||
<xsl:with-param name="type" select="'method'"/>
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="display-name" select="string(.)"/>
|
||||
<xsl:with-param name="unqualified-name" select="$unqualified-name"/>
|
||||
<xsl:with-param name="nodes" select="key('methods', $unqualified-name)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="functionname" mode="annotation">
|
||||
<!-- Determine the (possibly qualified) function name we are
|
||||
looking for -->
|
||||
<xsl:variable name="fullname">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@alt">
|
||||
<xsl:value-of select="@alt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="string(.)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Strip off any call -->
|
||||
<xsl:variable name="name">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($fullname, '(')">
|
||||
<xsl:value-of select="substring-before($fullname, '(')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$fullname"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Determine the unqualified name -->
|
||||
<xsl:variable name="unqualified-name">
|
||||
<xsl:call-template name="strip-qualifiers">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:call-template name="cxx-link-name">
|
||||
<xsl:with-param name="lookup" select="."/>
|
||||
<xsl:with-param name="type" select="'function'"/>
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="display-name" select="string(.)"/>
|
||||
<xsl:with-param name="unqualified-name" select="$unqualified-name"/>
|
||||
<xsl:with-param name="nodes"
|
||||
select="key('functions', $unqualified-name)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="enumname" mode="annotation">
|
||||
<!-- Determine the (possibly qualified) enum name we are
|
||||
looking for -->
|
||||
<xsl:variable name="fullname">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@alt">
|
||||
<xsl:value-of select="@alt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="string(.)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Strip off any call -->
|
||||
<xsl:variable name="name">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($fullname, '(')">
|
||||
<xsl:value-of select="substring-before($fullname, '(')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$fullname"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Determine the unqualified name -->
|
||||
<xsl:variable name="unqualified-name">
|
||||
<xsl:call-template name="strip-qualifiers">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:call-template name="cxx-link-name">
|
||||
<xsl:with-param name="lookup" select="."/>
|
||||
<xsl:with-param name="type" select="'enum'"/>
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="display-name" select="string(.)"/>
|
||||
<xsl:with-param name="unqualified-name" select="$unqualified-name"/>
|
||||
<xsl:with-param name="nodes"
|
||||
select="key('enums', $unqualified-name)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="libraryname" mode="annotation">
|
||||
<xsl:variable name="name">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@alt">
|
||||
<xsl:value-of select="@alt"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="text()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="node" select="key('libraries', $name)"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="count($node)=0">
|
||||
<xsl:message>
|
||||
<xsl:text>warning: Cannot find library '</xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text>'</xsl:text>
|
||||
</xsl:message>
|
||||
<xsl:value-of select="$name"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="library.link">
|
||||
<xsl:with-param name="node" select="$node"/>
|
||||
<xsl:with-param name="name" select="text()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="conceptname" mode="annotation">
|
||||
<xsl:param name="name" select="text()"/>
|
||||
|
||||
<xsl:call-template name="concept.link">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="macroname" mode="annotation">
|
||||
<xsl:param name="name" select="text()"/>
|
||||
|
||||
<xsl:variable name="node" select="key('macros', $name)"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="count($node) = 0">
|
||||
<xsl:message>
|
||||
<xsl:text>warning: cannot find macro `</xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text>'</xsl:text>
|
||||
</xsl:message>
|
||||
<xsl:value-of select="$name"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="count($node) = 1">
|
||||
<xsl:call-template name="internal-link">
|
||||
<xsl:with-param name="to">
|
||||
<xsl:call-template name="generate.id">
|
||||
<xsl:with-param name="node" select="$node"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="text" select="$name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<xsl:message>
|
||||
<xsl:text>error: macro `</xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text>' is multiply defined.</xsl:text>
|
||||
</xsl:message>
|
||||
<xsl:value-of select="$node"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="headername" mode="annotation">
|
||||
<xsl:param name="name" select="text()"/>
|
||||
|
||||
<xsl:variable name="node" select="key('headers', $name)"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="count($node) = 0">
|
||||
<xsl:message>
|
||||
<xsl:text>warning: cannot find header `</xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text>'</xsl:text>
|
||||
</xsl:message>
|
||||
<xsl:value-of select="$name"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="count($node) = 1">
|
||||
<xsl:call-template name="internal-link">
|
||||
<xsl:with-param name="to">
|
||||
<xsl:call-template name="generate.id">
|
||||
<xsl:with-param name="node" select="$node"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="text" select="$name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<xsl:message>
|
||||
<xsl:text>error: header `</xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text>' is multiply defined.</xsl:text>
|
||||
</xsl:message>
|
||||
<xsl:value-of select="$node"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="text()" mode="annotation">
|
||||
<xsl:param name="highlight" select="false()"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$highlight">
|
||||
<xsl:call-template name="source-highlight">
|
||||
<xsl:with-param name="text" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="code" mode="annotation">
|
||||
<computeroutput>
|
||||
<xsl:apply-templates mode="annotation"/>
|
||||
</computeroutput>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="node()" mode="annotation">
|
||||
<xsl:param name="highlight" select="false()"/>
|
||||
<xsl:element name="{name(.)}">
|
||||
<xsl:for-each select="./@*">
|
||||
<xsl:attribute name="{name(.)}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
<xsl:apply-templates select="./*|./text()" mode="annotation">
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<!-- The "purpose" mode strips simpara/para elements so that we can
|
||||
place the resulting text into a comment in the synopsis. -->
|
||||
<xsl:template match="para|simpara" mode="purpose">
|
||||
<xsl:apply-templates mode="annotation"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*" mode="purpose">
|
||||
<xsl:apply-templates select="." mode="annotation"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="text()" mode="purpose">
|
||||
<xsl:apply-templates select="." mode="annotation"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
813
src/documentation/xsl/caramel/concept2docbook.xsl
Normal file
813
src/documentation/xsl/caramel/concept2docbook.xsl
Normal file
@ -0,0 +1,813 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<!--
|
||||
Copyright (c) 2002-2003 The Trustees of Indiana University.
|
||||
All rights reserved.
|
||||
Copyright (c) 2000-2001 University of Notre Dame. All rights reserved.
|
||||
|
||||
The software included in this source file is licensed under the terms and
|
||||
conditions of the Software License, version 1.0, in the file LICENSE at the
|
||||
top level of the Caramel distribution. -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:strip-space elements="* xsl:*"/>
|
||||
|
||||
<xsl:include href="unparser.xsl"/>
|
||||
|
||||
<xsl:key name="concepts" match="concept" use="@name"/>
|
||||
|
||||
<!-- The layout type to use for concept descriptions. Can be one of:
|
||||
sgi: simulate the SGI STL documentation
|
||||
austern: simulate the documentation in Generic Programming and the STL,
|
||||
by Matthew H. Austern
|
||||
caramel: simulate the formatting from Caramel
|
||||
-->
|
||||
<xsl:param name="boost.concept.layout" select="'austern'"/>
|
||||
|
||||
<xsl:template match="concept">
|
||||
<refentry>
|
||||
<xsl:attribute name="id">
|
||||
<xsl:call-template name="generate.id"/>
|
||||
</xsl:attribute>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>Concept <xsl:value-of select="@name"/></refentrytitle>
|
||||
<manvolnum>7</manvolnum>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><xsl:value-of select="@name"/></refname>
|
||||
<xsl:if test="purpose">
|
||||
<refpurpose>
|
||||
<xsl:apply-templates select="purpose/*|purpose/text()"/>
|
||||
</refpurpose>
|
||||
</xsl:if>
|
||||
</refnamediv>
|
||||
|
||||
<!--
|
||||
<refentryinfo>
|
||||
<xsl:for-each select="copyright | copyright-include | legalnotice">
|
||||
<xsl:choose>
|
||||
<xsl:when test="name(.)='copyright'">
|
||||
<copyright><xsl:copy-of select="./node()"/></copyright>
|
||||
</xsl:when>
|
||||
<xsl:when test="name(.)='legalnotice'">
|
||||
<legalnotice><xsl:copy-of select="./node()"/></legalnotice>
|
||||
</xsl:when>
|
||||
<xsl:when test="name(.)='copyright-include'">
|
||||
<copyright><xsl:copy-of select="document(concat('../concepts/', @file))/copyright/node()"/></copyright>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</refentryinfo>
|
||||
-->
|
||||
|
||||
<xsl:if test="description">
|
||||
<xsl:if test="description">
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<xsl:for-each select="description">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:for-each>
|
||||
</refsect1>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="refines | refines-when-mutable">
|
||||
<refsect1>
|
||||
<title>Refinement of</title>
|
||||
<itemizedlist>
|
||||
<xsl:if test="refines">
|
||||
<xsl:for-each select="refines">
|
||||
<listitem>
|
||||
<para>
|
||||
<xsl:call-template name="concept.link">
|
||||
<xsl:with-param name="name" select="@concept"/>
|
||||
</xsl:call-template>
|
||||
</para>
|
||||
</listitem>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
<xsl:if test="refines-when-mutable">
|
||||
<xsl:for-each select="refines-when-mutable">
|
||||
<listitem>
|
||||
<para>
|
||||
<xsl:text>When mutable: </xsl:text>
|
||||
<xsl:call-template name="concept.link">
|
||||
<xsl:with-param name="name" select="@concept"/>
|
||||
</xsl:call-template>
|
||||
</para>
|
||||
</listitem>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
</xsl:if>
|
||||
|
||||
<!-- This part must be run even if there are no associated types to print out, so the hidden type definitions can be found -->
|
||||
<xsl:variable name="definition_list">
|
||||
<xsl:call-template name="make-definition-list">
|
||||
<xsl:with-param name="typedefs" select="define-type | associated-type"/>
|
||||
<xsl:with-param name="definition_list">
|
||||
<xsl:for-each select="param/@name">
|
||||
@(@<xsl:value-of select="."/>=<xsl:value-of select="."/>@)@
|
||||
</xsl:for-each>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- <xsl:message>Definition list: <xsl:value-of select="$definition_list"/></xsl:message> -->
|
||||
|
||||
<xsl:call-template name="print-associated-types">
|
||||
<xsl:with-param name="typedefs" select="associated-type"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:call-template name="concept.notation">
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:variable name="notations">
|
||||
<xsl:for-each select="notation">
|
||||
@@(@@<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="*[1]"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="ignore-cv" select="true()"/>
|
||||
<xsl:with-param name="ignore-references" select="true()"/>
|
||||
</xsl:call-template>@@=@@<xsl:value-of select="normalize-space(@variables)"/>@@)@@
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- <xsl:message>Notations: <xsl:value-of select="normalize-space($notations)"/> End notations</xsl:message> -->
|
||||
|
||||
<xsl:if test="definition">
|
||||
<refsect1>
|
||||
<title>Definitions</title>
|
||||
<xsl:for-each select="definition">
|
||||
<p><xsl:apply-templates/></p>
|
||||
</xsl:for-each>
|
||||
</refsect1>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="valid-type-expression | models | models-when-mutable">
|
||||
<refsect1>
|
||||
<title>Type expressions</title>
|
||||
<variablelist>
|
||||
<xsl:for-each select="models">
|
||||
<varlistentry>
|
||||
<term/>
|
||||
<listitem>
|
||||
<para>
|
||||
<xsl:call-template name="unparse-operator-definition">
|
||||
<xsl:with-param name="typeref" select="."/>
|
||||
<xsl:with-param name="operator_nodeset" select="key('concepts', @concept)/models-sentence/node()"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="notations" select="$notations"/>
|
||||
<xsl:with-param name="ignore-cv" select="false()"/>
|
||||
<xsl:with-param name="self" select="@concept"/>
|
||||
<xsl:with-param name="use-code-block" select="true()"/>
|
||||
</xsl:call-template>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="models-when-mutable">
|
||||
<varlistentry>
|
||||
<term>Only when mutable</term>
|
||||
<listitem>
|
||||
<para>
|
||||
<xsl:call-template name="unparse-operator-definition">
|
||||
<xsl:with-param name="typeref" select="."/>
|
||||
<xsl:with-param name="operator_nodeset" select="key('concepts', @concept)/models-sentence/node()"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="notations" select="$notations"/>
|
||||
<xsl:with-param name="ignore-cv" select="false()"/>
|
||||
<xsl:with-param name="self" select="@concept"/>
|
||||
<xsl:with-param name="use-code-block" select="true()"/>
|
||||
</xsl:call-template>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="valid-type-expression">
|
||||
<varlistentry>
|
||||
<term><xsl:value-of select="@name"/></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<type>
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="*[2]"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="notations" select="normalize-space($notations)"/>
|
||||
</xsl:call-template>
|
||||
</type>
|
||||
|
||||
<xsl:comment/> must be
|
||||
<xsl:for-each select="return-type/*">
|
||||
<xsl:if test="position()!=1 and last()!=2">, </xsl:if>
|
||||
<xsl:if test="position()=last() and last()!=1"> and </xsl:if>
|
||||
<xsl:call-template name="unparse-constraint">
|
||||
<xsl:with-param name="constraint" select="."/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="type-expr-mode" select="true()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each><xsl:comment/>.
|
||||
</para>
|
||||
|
||||
<xsl:if test="description">
|
||||
<xsl:for-each select="description">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</xsl:for-each>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="valid-expression">
|
||||
<refsect1>
|
||||
<title>Valid expressions</title>
|
||||
|
||||
<xsl:variable name="columns">
|
||||
<xsl:if test="valid-expression/return-type">
|
||||
<xsl:text>T</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="valid-expression/precondition">
|
||||
<xsl:text>P</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="valid-expression/semantics">
|
||||
<xsl:text>S</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="valid-expression/postcondition">
|
||||
<xsl:text>O</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
<informaltable>
|
||||
<tgroup>
|
||||
<xsl:attribute name="cols">
|
||||
<xsl:value-of select="string-length($columns) + 2"/>
|
||||
</xsl:attribute>
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Name</entry>
|
||||
<entry>Expression</entry>
|
||||
<xsl:if test="contains($columns, 'T')">
|
||||
<entry>Type</entry>
|
||||
</xsl:if>
|
||||
<xsl:if test="contains($columns, 'P')">
|
||||
<entry>Precondition</entry>
|
||||
</xsl:if>
|
||||
<xsl:if test="contains($columns, 'S')">
|
||||
<entry>Semantics</entry>
|
||||
</xsl:if>
|
||||
<xsl:if test="contains($columns, 'O')">
|
||||
<entry>Postcondition</entry>
|
||||
</xsl:if>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:apply-templates select="valid-expression">
|
||||
<xsl:with-param name="definition_list"
|
||||
select="$definition_list"/>
|
||||
<xsl:with-param name="notations"
|
||||
select="normalize-space($notations)"/>
|
||||
<xsl:with-param name="columns" select="$columns"/>
|
||||
</xsl:apply-templates>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<!-- Doug prefers the table
|
||||
<variablelist>
|
||||
<xsl:for-each select="valid-expression">
|
||||
<xsl:variable name="as-cxx-value">
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="*[1]"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="notations" select="normalize-space($notations)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<varlistentry>
|
||||
<term><xsl:value-of select="@name"/>: <literal><xsl:value-of select="$as-cxx-value"/></literal></term>
|
||||
<listitem><variablelist>
|
||||
<xsl:if test="return-type/*">
|
||||
<varlistentry><term>Return value</term><listitem><para>
|
||||
<xsl:for-each select="return-type/*">
|
||||
<xsl:if test="position()!=1 and last()!=2">, </xsl:if>
|
||||
<xsl:if test="position()=last() and last()!=1"> and </xsl:if>
|
||||
<xsl:call-template name="unparse-constraint">
|
||||
<xsl:with-param name="constraint" select="."/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="capitalize" select="position()=1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</para></listitem></varlistentry>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:for-each select="precondition">
|
||||
<varlistentry><term>Precondition</term><listitem><para>
|
||||
<xsl:apply-templates/>
|
||||
</para></listitem></varlistentry>
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:for-each select="semantics">
|
||||
<varlistentry><term>Semantics</term><listitem><para>
|
||||
<xsl:apply-templates/>
|
||||
</para></listitem></varlistentry>
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:for-each select="postcondition">
|
||||
<varlistentry><term>Postcondition</term><listitem><para>
|
||||
<xsl:apply-templates/>
|
||||
</para></listitem></varlistentry>
|
||||
</xsl:for-each>
|
||||
|
||||
</variablelist></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</xsl:for-each>
|
||||
</variablelist>
|
||||
-->
|
||||
</refsect1>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="complexity">
|
||||
<refsect1>
|
||||
<title>Complexity</title>
|
||||
<xsl:for-each select="complexity">
|
||||
<para><xsl:apply-templates/></para>
|
||||
</xsl:for-each>
|
||||
</refsect1>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="invariant">
|
||||
<refsect1>
|
||||
<title>Invariants</title>
|
||||
<variablelist>
|
||||
<xsl:for-each select="invariant">
|
||||
<varlistentry>
|
||||
<term><xsl:value-of select="@name"/></term>
|
||||
<listitem>
|
||||
<para><xsl:apply-templates/></para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</xsl:for-each>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="example-model">
|
||||
<refsect1>
|
||||
<title>Models</title>
|
||||
<itemizedlist>
|
||||
<xsl:for-each select="example-model">
|
||||
<listitem>
|
||||
<simplelist type="inline">
|
||||
<xsl:for-each select="*">
|
||||
<xsl:variable name="example-value">
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="."/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<member><type><xsl:value-of select="$example-value"/></type></member>
|
||||
</xsl:for-each>
|
||||
</simplelist>
|
||||
</listitem>
|
||||
</xsl:for-each>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:variable name="see-also-list" select="concept-ref | see-also | refines | refines-when-mutable | models-as-first-arg | models | models-when-mutable"/>
|
||||
<xsl:if test="$see-also-list">
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<itemizedlist>
|
||||
<xsl:for-each select="$see-also-list">
|
||||
<xsl:sort select="string(@name|@concept)" data-type="text"/>
|
||||
<xsl:if test="string(@name|@concept) != string(../@name)">
|
||||
<xsl:if test="not(string(@name|@concept) = (preceding::*/@name | preceding::*/@concept | ancestor::*/@name | ancestor::*/@concept))">
|
||||
<listitem>
|
||||
<para>
|
||||
<xsl:call-template name="concept.link">
|
||||
<xsl:with-param name="name" select="@name|@concept"/>
|
||||
</xsl:call-template>
|
||||
</para>
|
||||
</listitem>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
</xsl:if>
|
||||
|
||||
</refentry>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="unparse-constraint">
|
||||
<xsl:param name="constraint"/>
|
||||
<xsl:param name="definition_list"/>
|
||||
<xsl:param name="type-expr-mode" select="false()"/>
|
||||
<xsl:param name="capitalize" select="true()"/>
|
||||
|
||||
<xsl:choose>
|
||||
|
||||
<xsl:when test="name($constraint)='require-same-type'">
|
||||
<xsl:if test="$type-expr-mode">identical to </xsl:if>
|
||||
<type>
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="$constraint/*[1]"/>
|
||||
<xsl:with-param name="definition_list" select="definition_list"/>
|
||||
</xsl:call-template>
|
||||
</type>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="name($constraint)='convertible-to'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type-expr-mode">convertible to </xsl:when>
|
||||
<xsl:when test="not($type-expr-mode) and $capitalize">Convertible to </xsl:when>
|
||||
<xsl:when test="not($type-expr-mode) and not($capitalize)">convertible to </xsl:when>
|
||||
</xsl:choose>
|
||||
<type>
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="$constraint/*[1]"/>
|
||||
<xsl:with-param name="definition_list" select="definition_list"/>
|
||||
</xsl:call-template>
|
||||
</type>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="name($constraint)='derived-from'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type-expr-mode">derived from </xsl:when>
|
||||
<xsl:when test="not($type-expr-mode) and $capitalize">Derived from </xsl:when>
|
||||
<xsl:when test="not($type-expr-mode) and not($capitalize)">derived from </xsl:when>
|
||||
</xsl:choose>
|
||||
<type>
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="$constraint/*[1]"/>
|
||||
<xsl:with-param name="definition_list" select="definition_list"/>
|
||||
</xsl:call-template>
|
||||
</type>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="name($constraint)='assignable-to'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type-expr-mode">assignable to </xsl:when>
|
||||
<xsl:when test="not($type-expr-mode) and $capitalize">Assignable to </xsl:when>
|
||||
<xsl:when test="not($type-expr-mode) and not($capitalize)">assignable to </xsl:when>
|
||||
</xsl:choose>
|
||||
<type>
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="$constraint/*[1]"/>
|
||||
<xsl:with-param name="definition_list" select="definition_list"/>
|
||||
</xsl:call-template>
|
||||
</type>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="name($constraint)='models-as-first-arg'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$type-expr-mode"> a model </xsl:when>
|
||||
<xsl:when test="not($type-expr-mode) and $capitalize"> Models </xsl:when>
|
||||
<xsl:when test="not($type-expr-mode) and not($capitalize)"> models </xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:if test="$constraint/*"><xsl:comment/>
|
||||
(along with <xsl:for-each select="$constraint/*"><type>
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="."/>
|
||||
<xsl:with-param name="definition_list" select="definition_list"/>
|
||||
</xsl:call-template>
|
||||
</type>
|
||||
<xsl:choose>
|
||||
<xsl:when test="position()=last()"/>
|
||||
<xsl:when test="position()=last()-1 and last()=2"> and </xsl:when>
|
||||
<xsl:when test="position()=last()-1 and last()!=2">, and </xsl:when>
|
||||
<xsl:otherwise>, </xsl:otherwise>
|
||||
</xsl:choose><xsl:comment/>
|
||||
</xsl:for-each><xsl:comment/>) <xsl:comment/>
|
||||
</xsl:if><xsl:comment/>
|
||||
<xsl:if test="$type-expr-mode"> of </xsl:if>
|
||||
<xsl:call-template name="concept.link">
|
||||
<xsl:with-param name="name" select="$constraint/@concept"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="make-definition-list">
|
||||
<xsl:param name="typedefs"/>
|
||||
<xsl:param name="definition_list"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$typedefs">
|
||||
<xsl:variable name="type_definition">
|
||||
<xsl:if test="name($typedefs[1]/*[1])!='description'">
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="$typedefs[1]/*[1]"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="new_type_definition">
|
||||
<xsl:choose>
|
||||
<xsl:when test="name($typedefs[1])='associated-type'">
|
||||
<xsl:value-of select="$typedefs[1]/@name"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$type_definition"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:call-template name="make-definition-list">
|
||||
<xsl:with-param name="typedefs" select="$typedefs[position()!=1]"/>
|
||||
<xsl:with-param name="definition_list" select="concat($definition_list, ' @(@', $typedefs[1]/@name, '=', $new_type_definition, '@)@')"/>
|
||||
</xsl:call-template>
|
||||
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise> <!-- End of expression list, emit the results that have accumulated -->
|
||||
<xsl:value-of select="$definition_list"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="print-associated-types">
|
||||
<xsl:param name="typedefs"/>
|
||||
<xsl:param name="definition_list"/>
|
||||
|
||||
<xsl:if test="$typedefs">
|
||||
<refsect1>
|
||||
<title>Associated types</title>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$boost.concept.layout='sgi'">
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<xsl:apply-templates select="associated-type" mode="sgi">
|
||||
<xsl:with-param name="definition_list"
|
||||
select="$definition_list"/>
|
||||
</xsl:apply-templates>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</xsl:when>
|
||||
<xsl:when test="$boost.concept.layout='austern'">
|
||||
<itemizedlist>
|
||||
<xsl:apply-templates select="associated-type" mode="austern">
|
||||
<xsl:with-param name="definition_list"
|
||||
select="$definition_list"/>
|
||||
</xsl:apply-templates>
|
||||
</itemizedlist>
|
||||
</xsl:when>
|
||||
<xsl:when test="$boost.concept.layout='caramel'">
|
||||
<segmentedlist>
|
||||
<segtitle>Name</segtitle>
|
||||
<segtitle>Code</segtitle>
|
||||
<segtitle>Description</segtitle>
|
||||
<xsl:for-each select="$typedefs">
|
||||
<xsl:variable name="type_definition">
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="*[1]"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<seglistitem>
|
||||
<seg><xsl:value-of select="@name"/></seg>
|
||||
<seg><xsl:value-of select="$type_definition"/></seg>
|
||||
<seg>
|
||||
<xsl:for-each select="description">
|
||||
<xsl:call-template name="description"/>
|
||||
</xsl:for-each>
|
||||
</seg>
|
||||
</seglistitem>
|
||||
</xsl:for-each>
|
||||
</segmentedlist>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</refsect1>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="comma-list">
|
||||
<xsl:param name="list"/>
|
||||
|
||||
<xsl:if test="$list!=''">
|
||||
<term><varname>
|
||||
<xsl:if test="substring-before($list,' ')=''"><xsl:value-of select="$list"/></xsl:if>
|
||||
<xsl:value-of select="substring-before($list,' ')"/>
|
||||
</varname></term>
|
||||
<xsl:call-template name="comma-list">
|
||||
<xsl:with-param name="list" select="substring-after($list,' ')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="associated-type" mode="sgi">
|
||||
<row>
|
||||
<entry><simpara><xsl:value-of select="@name"/></simpara></entry>
|
||||
|
||||
<entry>
|
||||
<para>
|
||||
<xsl:for-each select="description">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:for-each>
|
||||
</para>
|
||||
</entry>
|
||||
</row>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="associated-type" mode="austern">
|
||||
<xsl:param name="definition_list" select="''"/>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis role="bold"><xsl:value-of select="@name"/></emphasis>
|
||||
|
||||
<xsl:call-template name="preformatted">
|
||||
<xsl:with-param name="text">
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="*[1]"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:for-each select="description">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:for-each>
|
||||
</para>
|
||||
</listitem>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="valid-expression">
|
||||
<xsl:param name="definition_list"/>
|
||||
<xsl:param name="notations"/>
|
||||
<xsl:param name="columns"/>
|
||||
|
||||
<row>
|
||||
<entry><simpara><xsl:value-of select="@name"/></simpara></entry>
|
||||
|
||||
<entry>
|
||||
<simpara>
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="*[1]"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="notations" select="$notations"/>
|
||||
</xsl:call-template>
|
||||
</simpara>
|
||||
</entry>
|
||||
|
||||
<xsl:if test="contains($columns, 'T')">
|
||||
<entry>
|
||||
<simpara>
|
||||
<xsl:for-each select="return-type/*">
|
||||
<xsl:if test="position()!=1 and last()!=2">, </xsl:if>
|
||||
<xsl:if test="position()=last() and last()!=1"> and </xsl:if>
|
||||
<xsl:call-template name="unparse-constraint">
|
||||
<xsl:with-param name="constraint" select="."/>
|
||||
<xsl:with-param name="definition_list"
|
||||
select="$definition_list"/>
|
||||
<xsl:with-param name="capitalize" select="position()=1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</simpara>
|
||||
</entry>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="contains($columns, 'P')">
|
||||
<entry>
|
||||
<xsl:for-each select="precondition">
|
||||
<simpara><xsl:apply-templates/></simpara>
|
||||
</xsl:for-each>
|
||||
</entry>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="contains($columns, 'S')">
|
||||
<entry>
|
||||
<xsl:for-each select="semantics">
|
||||
<simpara><xsl:apply-templates/></simpara>
|
||||
</xsl:for-each>
|
||||
</entry>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="contains($columns, 'O')">
|
||||
<entry>
|
||||
<xsl:for-each select="postcondition">
|
||||
<simpara><xsl:apply-templates/></simpara>
|
||||
</xsl:for-each>
|
||||
</entry>
|
||||
</xsl:if>
|
||||
</row>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="concept.notation">
|
||||
<xsl:param name="definition_list"/>
|
||||
|
||||
<refsect1>
|
||||
<title>Notation</title>
|
||||
<variablelist>
|
||||
<xsl:for-each select="param">
|
||||
<varlistentry>
|
||||
<term><xsl:value-of select="@name"/></term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<xsl:text>A type playing the role of </xsl:text>
|
||||
<xsl:value-of select="@role"/>
|
||||
<xsl:text> in the </xsl:text>
|
||||
<xsl:call-template name="concept.link">
|
||||
<xsl:with-param name="name" select="../@name"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> concept.</xsl:text>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="notation">
|
||||
<xsl:variable name="notation_name">
|
||||
<xsl:call-template name="comma-list">
|
||||
<xsl:with-param name="list"
|
||||
select="normalize-space(@variables)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<varlistentry>
|
||||
<xsl:copy-of select="$notation_name"/>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<xsl:variable name="output-plural" select="substring-before(normalize-space(@variables),' ')!=''"/>
|
||||
<xsl:if test="name(*[1])='sample-value'">Object<xsl:if test="$output-plural">s</xsl:if> of type </xsl:if>
|
||||
<xsl:variable name="typeref-to-print" select="*[name()!='sample-value'] | sample-value/*[name()!='sample-value']"/>
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="$typeref-to-print"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="ignore-cv" select="true()"/>
|
||||
<xsl:with-param name="ignore-references" select="true()"/>
|
||||
</xsl:call-template>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</xsl:for-each>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="concept.link">
|
||||
<xsl:param name="name" select="text()"/>
|
||||
<xsl:param name="warn" select="true()"/>
|
||||
<xsl:param name="text" select="$name"/>
|
||||
<xsl:variable name="node" select="key('concepts', $name)"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="count($node)=0">
|
||||
<xsl:if test="$warn">
|
||||
<xsl:message>
|
||||
<xsl:text>warning: cannot find concept '</xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text>'</xsl:text>
|
||||
</xsl:message>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="$text"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="internal-link">
|
||||
<xsl:with-param name="to">
|
||||
<xsl:call-template name="generate.id">
|
||||
<xsl:with-param name="node" select="$node"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="text" select="$text"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="remove-whitespace">
|
||||
<xsl:param name="text" select="text()"/>
|
||||
|
||||
<xsl:variable name="normalized" select="normalize-space($text)"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($normalized, ' ')">
|
||||
<xsl:value-of select="substring-before($normalized, ' ')"/>
|
||||
<xsl:call-template name="remove-whitespace">
|
||||
<xsl:with-param name="text"
|
||||
select="substring-after($normalized, ' ')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$normalized"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="concept" mode="generate.id">
|
||||
<xsl:call-template name="remove-whitespace">
|
||||
<xsl:with-param name="text" select="@name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
497
src/documentation/xsl/caramel/unparser.xsl
Normal file
497
src/documentation/xsl/caramel/unparser.xsl
Normal file
@ -0,0 +1,497 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<!--
|
||||
Copyright (c) 2002-2003 The Trustees of Indiana University.
|
||||
All rights reserved.
|
||||
Copyright (c) 2000-2001 University of Notre Dame. All rights reserved.
|
||||
|
||||
The software included in this source file is licensed under the terms and
|
||||
conditions of the Software License, version 1.0, in the file LICENSE at the
|
||||
top level of the Caramel distribution. -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:template name="unparse-cpp">
|
||||
<xsl:param name="typeref"/>
|
||||
<xsl:param name="definition_list"/>
|
||||
<xsl:param name="priority">0</xsl:param>
|
||||
<xsl:param name="ignore-cv" select="false()"/>
|
||||
<xsl:param name="ignore-references" select="false()"/>
|
||||
<xsl:param name="notations"/>
|
||||
<xsl:param name="ignore-notation" select="false()"/>
|
||||
<xsl:param name="print-updated-notation" select="false()"/>
|
||||
<xsl:param name="use-typename" select="false()"/>
|
||||
<xsl:param name="const-if-not-mutable-value" select="'const-if-not-mutable'"/>
|
||||
|
||||
<xsl:variable name="notation_check">
|
||||
<xsl:if test="not($ignore-notation)"> <!-- Prevent infinite recursion -->
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="$typeref"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="priority">0</xsl:with-param>
|
||||
<xsl:with-param name="ignore-cv" select="true()"/>
|
||||
<xsl:with-param name="ignore-references" select="true()"/>
|
||||
<xsl:with-param name="notations" select="$notations"/>
|
||||
<xsl:with-param name="ignore-notation" select="true()"/>
|
||||
<xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
<!--
|
||||
<xsl:message>Notation check: <xsl:value-of select="$notation_check"/>
|
||||
Notations: <xsl:value-of select="$notations"/>
|
||||
</xsl:message> -->
|
||||
|
||||
<xsl:variable name="this_op_priority" select="document('cpp-operators.xml')/operator-list/op[@name=name($typeref)]/apply/@priority"/>
|
||||
|
||||
<xsl:variable name="result">
|
||||
|
||||
<xsl:variable name="subcall_priority">
|
||||
<xsl:choose>
|
||||
<xsl:when test="true() or ($this_op_priority > $priority)">
|
||||
<xsl:value-of select="$this_op_priority"/>
|
||||
</xsl:when>
|
||||
<!-- <xsl:otherwise>0</xsl:otherwise> -->
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="$this_op_priority <= $priority">(</xsl:if>
|
||||
|
||||
<xsl:choose>
|
||||
|
||||
<xsl:when test="name($typeref)='sample-value'"
|
||||
>boost::sample_value < <xsl:call-template name="unparse-cpp"><xsl:with-param name="typeref" select="$typeref/*[1]"/><xsl:with-param name="definition_list" select="$definition_list"/><xsl:with-param name="ignore-cv" select="$ignore-cv"/><xsl:with-param name="notations" select="$notations"/><xsl:with-param name="ignore-references" select="$ignore-references"/><xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/></xsl:call-template> >()</xsl:when>
|
||||
|
||||
<xsl:when test="name($typeref)='reference-to'"
|
||||
><xsl:call-template name="unparse-cpp"><xsl:with-param name="typeref" select="$typeref/*[1]"/><xsl:with-param name="definition_list" select="$definition_list"/><xsl:with-param name="priority" select="$subcall_priority"/><xsl:with-param name="ignore-cv" select="$ignore-cv"/><xsl:with-param name="notations" select="$notations"/><xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/></xsl:call-template><xsl:if test="not($ignore-references)"> &</xsl:if></xsl:when>
|
||||
|
||||
<xsl:when test="name($typeref)='pointer-to'"
|
||||
><xsl:call-template name="unparse-cpp"><xsl:with-param name="typeref" select="$typeref/*[1]"/><xsl:with-param name="definition_list" select="$definition_list"/><xsl:with-param name="priority" select="$subcall_priority"/><xsl:with-param name="ignore-cv" select="$ignore-cv"/><xsl:with-param name="notations" select="$notations"/></xsl:call-template> *</xsl:when>
|
||||
|
||||
<xsl:when test="name($typeref)='const'"
|
||||
><xsl:if test="not($ignore-cv)">const </xsl:if><xsl:call-template name="unparse-cpp"><xsl:with-param name="typeref" select="$typeref/*[1]"/><xsl:with-param name="definition_list" select="$definition_list"/><xsl:with-param name="priority" select="$subcall_priority"/><xsl:with-param name="ignore-cv" select="$ignore-cv"/><xsl:with-param name="notations" select="$notations"/><xsl:with-param name="ignore-references" select="$ignore-references"/><xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/></xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="name($typeref)='const-if-not-mutable'"
|
||||
><xsl:if test="not($ignore-cv)"><xsl:value-of select="$const-if-not-mutable-value"/><xsl:if test="$const-if-not-mutable-value"><xsl:text> </xsl:text></xsl:if></xsl:if><xsl:call-template name="unparse-cpp"><xsl:with-param name="typeref" select="$typeref/*[1]"/><xsl:with-param name="definition_list" select="$definition_list"/><xsl:with-param name="priority" select="$subcall_priority"/><xsl:with-param name="ignore-cv" select="$ignore-cv"/><xsl:with-param name="notations" select="$notations"/><xsl:with-param name="ignore-references" select="$ignore-references"/><xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/></xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="name($typeref)='volatile'"
|
||||
><xsl:if test="not($ignore-cv)">volatile </xsl:if><xsl:call-template name="unparse-cpp"><xsl:with-param name="typeref" select="$typeref/*[1]"/><xsl:with-param name="definition_list" select="$definition_list"/><xsl:with-param name="priority" select="$subcall_priority"/><xsl:with-param name="ignore-cv" select="$ignore-cv"/><xsl:with-param name="notations" select="$notations"/><xsl:with-param name="ignore-references" select="$ignore-references"/><xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/></xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="name($typeref)='apply-template'">
|
||||
<xsl:value-of select="$typeref/@name"/><<xsl:for-each select="$typeref/*">
|
||||
<xsl:if test="position()!=1">, </xsl:if><xsl:comment/>
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="."/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="ignore-cv" select="$ignore-cv"/>
|
||||
<xsl:with-param name="notations" select="$notations"/>
|
||||
<xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
|
||||
</xsl:call-template></xsl:for-each
|
||||
><xsl:comment/>></xsl:when>
|
||||
|
||||
<xsl:when test="name($typeref)='get-member-type'">
|
||||
<xsl:call-template name="unparse-cpp"><xsl:with-param name="typeref" select="$typeref/*[1]"/><xsl:with-param name="definition_list" select="$definition_list"/><xsl:with-param name="ignore-cv" select="$ignore-cv"/><xsl:with-param name="notations" select="$notations"/><xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/></xsl:call-template>::<xsl:value-of select="$typeref/@name"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="name($typeref)='type'">
|
||||
<xsl:variable name="typeref_value" select="normalize-space(substring-before(substring-after($definition_list,concat('@(@',$typeref/@name,'=')),'@)@'))"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$typeref_value=''">
|
||||
<xsl:value-of select="$typeref/@name"/><xsl:comment/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$typeref_value"/><xsl:comment/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="name($typeref)='documentation'"/>
|
||||
|
||||
<xsl:when test="document('cpp-operators.xml')/operator-list/op[@name=name($typeref)]">
|
||||
<xsl:variable name="op_file" select="document('cpp-operators.xml')/operator-list"/>
|
||||
<xsl:variable name="op_info" select="$op_file/op[@name=name($typeref)]/apply/."/>
|
||||
|
||||
<xsl:call-template name="unparse-operator-definition">
|
||||
<xsl:with-param name="typeref" select="$typeref"/>
|
||||
<xsl:with-param name="operator_nodeset" select="$op_info/child::node()"/>
|
||||
<xsl:with-param name="my_priority" select="$subcall_priority"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="notations" select="$notations"/>
|
||||
<xsl:with-param name="ignore-cv" select="$ignore-cv"/>
|
||||
<xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
|
||||
<xsl:with-param name="print-updated-notation" select="$print-updated-notation"/>
|
||||
</xsl:call-template>
|
||||
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
(Unrecognized tag <xsl:value-of select="name($typeref)"/>)
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!-- Close parenthesis code moved below -->
|
||||
|
||||
</xsl:variable>
|
||||
|
||||
<!-- <xsl:message>ignore-notation = <xsl:value-of select="$ignore-notation"/></xsl:message> -->
|
||||
<!-- <xsl:message>notation_check = <xsl:value-of select="$notation_check"/></xsl:message> -->
|
||||
<!-- <xsl:message>notations = <xsl:value-of select="$notations"/></xsl:message> -->
|
||||
<!-- <xsl:message>result = <xsl:value-of select="$result"/></xsl:message> -->
|
||||
|
||||
<xsl:variable name="used_notation" select="boolean($notation_check) and boolean(substring-before(substring-after($notations, concat('@@(@@', $notation_check, '@@=@@')),'@@)@@'))"/>
|
||||
|
||||
<xsl:variable name="notations2">
|
||||
<!-- Possibly replace from result of unparse-operator-definition -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($result, ' *@@@* ')">
|
||||
<xsl:value-of select="substring-after($result, ' *@@@* ')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$notations"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="result2">
|
||||
<!-- Possibly replace from result of unparse-operator-definition -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($result, ' *@@@* ')">
|
||||
<xsl:value-of select="substring-before($result, ' *@@@* ')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$result"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<!-- Close parenthesis code -->
|
||||
<xsl:if test="$this_op_priority <= $priority">)</xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="notation_varlist">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$used_notation">
|
||||
<xsl:value-of select="substring-before(substring-after($notations2, concat('@@(@@', $notation_check, '@@=@@')), '@@)@@')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$result2"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="new_varlist" select="substring-after(normalize-space($notation_varlist), ' ')"/>
|
||||
|
||||
<xsl:variable name="notation_var">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not($used_notation)">
|
||||
<xsl:value-of select="$result2"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$new_varlist=''">
|
||||
<xsl:value-of select="$notation_varlist"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring-before(normalize-space($notation_varlist), ' ')"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Generate new notation list -->
|
||||
<xsl:variable name="new_notations">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$used_notation">
|
||||
<xsl:value-of select="normalize-space(concat('@@(@@', $notation_check, '@@=@@', $new_varlist, '@@)@@', $notations2))"/>
|
||||
<!-- Duplicate entries always use first occurrance, so I can optimize this -->
|
||||
</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$notations2"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- <xsl:message>final_result = <xsl:value-of select="normalize-space($final_result)"/></xsl:message> -->
|
||||
|
||||
<xsl:call-template name="add-typename"><xsl:with-param name="really-do-it" select="$use-typename"/><xsl:with-param name="type"><xsl:value-of select="normalize-space($notation_var)"/></xsl:with-param></xsl:call-template><xsl:if test="$print-updated-notation"> *@@@* <xsl:value-of select="$new_notations"/></xsl:if>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="unparse-operator-definition">
|
||||
<xsl:param name="typeref"/>
|
||||
<xsl:param name="operator_nodeset"/>
|
||||
<xsl:param name="current_start">1</xsl:param>
|
||||
<xsl:param name="my_priority"/>
|
||||
<xsl:param name="definition_list"/>
|
||||
<xsl:param name="notations"/>
|
||||
<xsl:param name="ignore-cv"/>
|
||||
<xsl:param name="self"/>
|
||||
<xsl:param name="use-code-block" select="false()"/>
|
||||
<xsl:param name="print-updated-notation" select="false()"/>
|
||||
<xsl:param name="const-if-not-mutable-value"/>
|
||||
|
||||
<xsl:variable name="op_current" select="$operator_nodeset[position()=1]"/>
|
||||
<xsl:variable name="op_rest" select="$operator_nodeset[position()!=1]"/>
|
||||
|
||||
<xsl:choose>
|
||||
|
||||
<xsl:when test="count($operator_nodeset)=0">
|
||||
<xsl:if test="$print-updated-notation"> *@@@* <xsl:value-of select="$notations"/></xsl:if>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$op_current != $op_current/../*"> <!-- If I am not an element -->
|
||||
<xsl:value-of select="$op_current"/>
|
||||
<xsl:call-template name="unparse-operator-definition">
|
||||
<xsl:with-param name="typeref" select="$typeref"/>
|
||||
<xsl:with-param name="operator_nodeset" select="$op_rest"/>
|
||||
<xsl:with-param name="my_priority" select="$my_priority"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="notations" select="$notations"/>
|
||||
<xsl:with-param name="self" select="$self"/>
|
||||
<xsl:with-param name="use-code-block" select="$use-code-block"/>
|
||||
<xsl:with-param name="print-updated-notation" select="$print-updated-notation"/>
|
||||
<xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="name($op_current)='name'">
|
||||
<xsl:value-of select="$typeref/@name"/>
|
||||
<xsl:call-template name="unparse-operator-definition">
|
||||
<xsl:with-param name="typeref" select="$typeref"/>
|
||||
<xsl:with-param name="operator_nodeset" select="$op_rest"/>
|
||||
<xsl:with-param name="my_priority" select="$my_priority"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="notations" select="$notations"/>
|
||||
<xsl:with-param name="ignore-cv" select="$ignore-cv"/>
|
||||
<xsl:with-param name="self" select="$self"/>
|
||||
<xsl:with-param name="use-code-block" select="$use-code-block"/>
|
||||
<xsl:with-param name="print-updated-notation" select="$print-updated-notation"/>
|
||||
<xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="name($op_current)='self'">
|
||||
<xsl:call-template name="concept.link">
|
||||
<xsl:with-param name="name" select="string($self)"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="unparse-operator-definition">
|
||||
<xsl:with-param name="typeref" select="$typeref"/>
|
||||
<xsl:with-param name="operator_nodeset" select="$op_rest"/>
|
||||
<xsl:with-param name="my_priority" select="$my_priority"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="notations" select="$notations"/>
|
||||
<xsl:with-param name="ignore-cv" select="$ignore-cv"/>
|
||||
<xsl:with-param name="self" select="$self"/>
|
||||
<xsl:with-param name="use-code-block" select="$use-code-block"/>
|
||||
<xsl:with-param name="print-updated-notation" select="$print-updated-notation"/>
|
||||
<xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="name($op_current)='arg'">
|
||||
<xsl:variable name="num" select="$op_current/@num"/>
|
||||
<xsl:variable name="assoc" select="$op_current/../@assoc"/>
|
||||
<xsl:variable name="my_priority_before" select="$my_priority"/>
|
||||
<xsl:variable name="my_priority">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count($op_current/@priority)">
|
||||
<xsl:value-of select="$op_current/@priority"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$assoc and ($num = $assoc)">
|
||||
<xsl:value-of select="$my_priority_before - 1"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$my_priority"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="typeref-result">
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="$typeref/*[position()=$num]"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="priority" select="$my_priority"/>
|
||||
<xsl:with-param name="ignore-cv" select="$ignore-cv"/>
|
||||
<xsl:with-param name="notations" select="$notations"/>
|
||||
<xsl:with-param name="print-updated-notation" select="true()"/>
|
||||
<xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="typeref-print" select="normalize-space(substring-before($typeref-result, ' *@@@* '))"/>
|
||||
<xsl:variable name="new_notations" select="normalize-space(substring-after($typeref-result, ' *@@@* '))"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$use-code-block">
|
||||
<type><xsl:value-of select="$typeref-print"/></type>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$typeref-print"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<xsl:call-template name="unparse-operator-definition">
|
||||
<xsl:with-param name="typeref" select="$typeref"/>
|
||||
<xsl:with-param name="operator_nodeset" select="$op_rest"/>
|
||||
<xsl:with-param name="my_priority" select="$my_priority_before"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="notations" select="$new_notations"/>
|
||||
<xsl:with-param name="ignore-cv" select="$ignore-cv"/>
|
||||
<xsl:with-param name="self" select="$self"/>
|
||||
<xsl:with-param name="use-code-block" select="$use-code-block"/>
|
||||
<xsl:with-param name="print-updated-notation" select="$print-updated-notation"/>
|
||||
<xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="name($op_current)='arg-list'">
|
||||
<xsl:variable name="start" select="$op_current/@start"/>
|
||||
<xsl:variable name="typeref-result">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$current_start >= $start">
|
||||
<xsl:call-template name="unparse-cpp">
|
||||
<xsl:with-param name="typeref" select="$typeref/*[$current_start]"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="priority" select="$my_priority"/>
|
||||
<xsl:with-param name="ignore-cv" select="$ignore-cv"/>
|
||||
<xsl:with-param name="notations" select="$notations"/>
|
||||
<xsl:with-param name="print-updated-notation" select="true()"/>
|
||||
<xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
*@@@* <xsl:value-of select="$notations"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="typeref-print" select="normalize-space(substring-before($typeref-result, ' *@@@* '))"/>
|
||||
<xsl:variable name="new_notations" select="normalize-space(substring-after($typeref-result, ' *@@@* '))"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$use-code-block">
|
||||
<type><xsl:value-of select="$typeref-print"/></type>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$typeref-print"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<xsl:if test="$current_start >= $start">
|
||||
<xsl:if test="$current_start!=count($typeref/*)">, </xsl:if>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$current_start != count($typeref/*)">
|
||||
<xsl:call-template name="unparse-operator-definition">
|
||||
<xsl:with-param name="typeref" select="$typeref"/>
|
||||
<xsl:with-param name="operator_nodeset" select="$operator_nodeset"/>
|
||||
<xsl:with-param name="current_start" select="$current_start + 1"/>
|
||||
<xsl:with-param name="my_priority" select="$my_priority"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="notations" select="$new_notations"/>
|
||||
<xsl:with-param name="ignore-cv" select="$ignore-cv"/>
|
||||
<xsl:with-param name="self" select="$self"/>
|
||||
<xsl:with-param name="use-code-block" select="$use-code-block"/>
|
||||
<xsl:with-param name="print-updated-notation" select="$print-updated-notation"/>
|
||||
<xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="unparse-operator-definition">
|
||||
<xsl:with-param name="typeref" select="$typeref"/>
|
||||
<xsl:with-param name="operator_nodeset" select="$op_rest"/>
|
||||
<xsl:with-param name="my_priority" select="$my_priority"/>
|
||||
<xsl:with-param name="definition_list" select="$definition_list"/>
|
||||
<xsl:with-param name="notations" select="$new_notations"/>
|
||||
<xsl:with-param name="ignore-cv" select="$ignore-cv"/>
|
||||
<xsl:with-param name="self" select="$self"/>
|
||||
<xsl:with-param name="use-code-block" select="$use-code-block"/>
|
||||
<xsl:with-param name="const-if-not-mutable-value" select="$const-if-not-mutable-value"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>Invalid tag in operator definition: <xsl:value-of select="name($op_current)"/></xsl:otherwise>
|
||||
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="add-typename">
|
||||
<!-- Adds typename to the front of a string if it is necessary. -->
|
||||
<xsl:param name="type"/> <!-- string to prepend to -->
|
||||
<xsl:param name="params" select="/concept/param | /concept/define-type | /concept/associated-type"/>
|
||||
<!-- nodeset of param tags for concept -->
|
||||
<!-- associated types are assumed to be dependent -->
|
||||
<xsl:param name="really-do-it"/> <!-- really change anything? -->
|
||||
|
||||
<xsl:variable name="type-after-last-scope">
|
||||
<xsl:call-template name="substring-before-last">
|
||||
<xsl:with-param name="string" select="$type"/>
|
||||
<xsl:with-param name="to-find" select="'::'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="tokenized-type-after-last-scope">
|
||||
<xsl:call-template name="rough-tokenize">
|
||||
<xsl:with-param name="string" select="$type-after-last-scope"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$really-do-it and boolean($params[contains($tokenized-type-after-last-scope, concat(' ', @name, ' '))])">
|
||||
<!-- If the tokenized string contains any of the param names in a
|
||||
token by itself, return true. Return false otherwise -->
|
||||
<xsl:comment/>typename <xsl:value-of select="$type"/><xsl:comment/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="substring-before-last">
|
||||
<xsl:param name="string"/>
|
||||
<xsl:param name="to-find"/>
|
||||
<xsl:param name="string-processed-so-far"/> <!-- internal -->
|
||||
<!-- Find the substring of $string before the last occurrance of
|
||||
$to-find, returning '' if it was not found. -->
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($string, $to-find)">
|
||||
<xsl:call-template name="substring-before-last">
|
||||
<xsl:with-param name="string" select="substring-after($string, $to-find)"/>
|
||||
<xsl:with-param name="to-find" select="$to-find"/>
|
||||
<xsl:with-param name="string-processed-so-far" select="concat($string-processed-so-far, substring-before($string, $to-find), $to-find)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="substring($string-processed-so-far, 1, string-length($string-processed-so-far)-(string-length($to-find)))"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="substring-after-last">
|
||||
<xsl:param name="string"/>
|
||||
<xsl:param name="to-find"/>
|
||||
<!-- Find the substring of $string after the last occurrance of
|
||||
$to-find, returning the original string if it was not found. -->
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($string, $to-find)">
|
||||
<xsl:call-template name="substring-after-last">
|
||||
<xsl:with-param name="string" select="substring-after($string, $to-find)"/>
|
||||
<xsl:with-param name="to-find" select="$to-find"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$string"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="rough-tokenize">
|
||||
<xsl:param name="string"/>
|
||||
<!-- Do a rough tokenization of the string. Right now, just translate
|
||||
all non-token-chars to spaces, normalize-space the result, and prepend
|
||||
and append spaces. -->
|
||||
|
||||
<xsl:value-of select="concat(' ', normalize-space(translate($string, '<>,./?;:[]{}-=\\_+|!@#$%^&*()', ' ')), ' ')"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
408
src/documentation/xsl/docbook.xsl
Normal file
408
src/documentation/xsl/docbook.xsl
Normal file
@ -0,0 +1,408 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
<xsl:include href="reference.xsl"/>
|
||||
|
||||
<xsl:output method="xml"
|
||||
doctype-public="-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
doctype-system="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"/>
|
||||
|
||||
<!-- The maximum number of columns allowed in preformatted text -->
|
||||
<xsl:param name="max-columns" select="78"/>
|
||||
|
||||
<!-- The root of the Boost directory -->
|
||||
<xsl:param name="boost.root" select="'../..'"/>
|
||||
|
||||
<!-- A space-separated list of libraries to include in the
|
||||
output. If this list is empty, all libraries will be included. -->
|
||||
<xsl:param name="boost.include.libraries" select="''"/>
|
||||
|
||||
<xsl:template match="library-reference">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ancestor::library-reference">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<section>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@id">
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="@id"/>
|
||||
</xsl:attribute>
|
||||
</xsl:when>
|
||||
<xsl:when test="ancestor::library/attribute::id">
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="ancestor::library/attribute::id"/>
|
||||
<xsl:text>.reference</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:if test="not(title)">
|
||||
<title>
|
||||
<xsl:text>Reference</xsl:text>
|
||||
</title>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="concept">
|
||||
<section>
|
||||
<title>Concepts</title>
|
||||
|
||||
<xsl:if test="ancestor::library/attribute::id">
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="ancestor::library/attribute::id"/>
|
||||
<xsl:text>.concepts</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
|
||||
<itemizedlist>
|
||||
<xsl:for-each select="concept">
|
||||
<listitem>
|
||||
<xsl:call-template name="internal-link">
|
||||
<xsl:with-param name="to">
|
||||
<xsl:call-template name="generate.id"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="text" select="@name"/>
|
||||
</xsl:call-template>
|
||||
</listitem>
|
||||
</xsl:for-each>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:apply-templates/>
|
||||
</section>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="header">
|
||||
<xsl:if test="*">
|
||||
<section>
|
||||
<xsl:attribute name="id">
|
||||
<xsl:call-template name="generate.id"/>
|
||||
</xsl:attribute>
|
||||
|
||||
<title>
|
||||
<xsl:text>Header <</xsl:text>
|
||||
<ulink>
|
||||
<xsl:attribute name="url">
|
||||
<xsl:value-of select="$boost.root"/>
|
||||
<xsl:text>/</xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="@name"/>
|
||||
</ulink>
|
||||
<xsl:text>></xsl:text>
|
||||
</title>
|
||||
|
||||
<xsl:apply-templates select="para|section" mode="annotation"/>
|
||||
|
||||
<xsl:if test="macro">
|
||||
<xsl:call-template name="synopsis">
|
||||
<xsl:with-param name="text">
|
||||
<xsl:apply-templates mode="synopsis" select="macro">
|
||||
<xsl:with-param name="indentation" select="0"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="namespace|class|struct|union">
|
||||
<xsl:call-template name="synopsis">
|
||||
<xsl:with-param name="text">
|
||||
<xsl:apply-templates mode="synopsis"
|
||||
select="namespace|class|struct|union">
|
||||
<xsl:with-param name="indentation" select="0"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:apply-templates mode="namespace-reference"/>
|
||||
</section>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="header" mode="generate.id">
|
||||
<xsl:text>header.</xsl:text>
|
||||
<xsl:value-of select="translate(@name, '/','.')"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*" mode="passthrough">
|
||||
<xsl:copy-of select="."/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Syntax highlighting -->
|
||||
<xsl:template name="highlight-keyword">
|
||||
<xsl:param name="keyword"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$boost.syntax.highlight='1'">
|
||||
<emphasis role="bold"><xsl:value-of select="$keyword"/></emphasis>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$keyword"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="highlight-comment">
|
||||
<xsl:param name="text"/>
|
||||
<emphasis><xsl:copy-of select="$text"/></emphasis>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="monospaced">
|
||||
<xsl:param name="text"/>
|
||||
<computeroutput><xsl:value-of select="$text"/></computeroutput>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Linking -->
|
||||
<xsl:template name="internal-link">
|
||||
<xsl:param name="to"/>
|
||||
<xsl:param name="text"/>
|
||||
<xsl:param name="highlight" select="false()"/>
|
||||
|
||||
<link linkend="{$to}">
|
||||
<xsl:if test="$highlight">
|
||||
<xsl:call-template name="source-highlight">
|
||||
<xsl:with-param name="text" select="$text"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:if test="not($highlight)">
|
||||
<xsl:value-of select="string($text)"/>
|
||||
</xsl:if>
|
||||
</link>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="anchor">
|
||||
<xsl:param name="to"/>
|
||||
<xsl:param name="text"/>
|
||||
<xsl:param name="highlight" select="false()"/>
|
||||
|
||||
<anchor id="{$to}"/>
|
||||
<xsl:if test="$highlight">
|
||||
<xsl:call-template name="source-highlight">
|
||||
<xsl:with-param name="text" select="$text"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:if test="not($highlight)">
|
||||
<xsl:value-of select="$text"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="link-or-anchor">
|
||||
<xsl:param name="to"/>
|
||||
<xsl:param name="text"/>
|
||||
|
||||
<!-- True if we should create an anchor, otherwise we will create
|
||||
a link. If you require more control (e.g., with the possibility of
|
||||
having no link or anchor), set link-type instead: if present, it
|
||||
takes precedence. -->
|
||||
<xsl:param name="is-anchor"/>
|
||||
|
||||
<!-- 'anchor', 'link', or 'none' -->
|
||||
<xsl:param name="link-type">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$is-anchor">
|
||||
<xsl:text>anchor</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>link</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:param>
|
||||
|
||||
<xsl:param name="highlight" select="false()"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$link-type='anchor'">
|
||||
<xsl:call-template name="anchor">
|
||||
<xsl:with-param name="to" select="$to"/>
|
||||
<xsl:with-param name="text" select="$text"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$link-type='link'">
|
||||
<xsl:call-template name="internal-link">
|
||||
<xsl:with-param name="to" select="$to"/>
|
||||
<xsl:with-param name="text" select="$text"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$link-type='none'">
|
||||
<xsl:if test="$highlight">
|
||||
<xsl:call-template name="source-highlight">
|
||||
<xsl:with-param name="text" select="$text"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:if test="not($highlight)">
|
||||
<xsl:value-of select="$text"/>
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:message>
|
||||
Error: XSL template 'link-or-anchor' called with invalid link-type '<xsl:value-of select="$link-type"/>'
|
||||
</xsl:message>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="separator"/>
|
||||
|
||||
<xsl:template name="reference-documentation">
|
||||
<xsl:param name="name"/>
|
||||
<xsl:param name="refname"/>
|
||||
<xsl:param name="purpose"/>
|
||||
<xsl:param name="anchor"/>
|
||||
<xsl:param name="synopsis"/>
|
||||
<xsl:param name="text"/>
|
||||
|
||||
<refentry id="{$anchor}">
|
||||
<refmeta>
|
||||
<refentrytitle><xsl:value-of select="$name"/></refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname><xsl:value-of select="$refname"/></refname>
|
||||
<refpurpose>
|
||||
<xsl:apply-templates mode="annotation" select="$purpose"/>
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<synopsis>
|
||||
<xsl:copy-of select="$synopsis"/>
|
||||
</synopsis>
|
||||
</refsynopsisdiv>
|
||||
<xsl:if test="not(string($text)='')">
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<xsl:copy-of select="$text"/>
|
||||
</refsect1>
|
||||
</xsl:if>
|
||||
</refentry>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="member-documentation">
|
||||
<xsl:param name="name"/>
|
||||
<xsl:param name="text"/>
|
||||
|
||||
<refsect2>
|
||||
<title><xsl:copy-of select="$name"/></title>
|
||||
<xsl:copy-of select="$text"/>
|
||||
</refsect2>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="preformatted">
|
||||
<xsl:param name="text"/>
|
||||
|
||||
<literallayout class="monospaced">
|
||||
<xsl:copy-of select="$text"/>
|
||||
</literallayout>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="synopsis">
|
||||
<xsl:param name="text"/>
|
||||
|
||||
<synopsis>
|
||||
<xsl:copy-of select="$text"/>
|
||||
</synopsis>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Fallthrough for DocBook elements -->
|
||||
<xsl:template match="*">
|
||||
<xsl:element name="{name(.)}">
|
||||
<xsl:for-each select="./@*">
|
||||
<xsl:choose>
|
||||
<xsl:when test="local-name(.)='last-revision'">
|
||||
<xsl:attribute
|
||||
name="rev:last-revision"
|
||||
namespace="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:attribute name="{name(.)}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="code">
|
||||
<computeroutput>
|
||||
<xsl:apply-templates mode="annotation"/>
|
||||
</computeroutput>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="library">
|
||||
<xsl:if test="not(@html-only = 1) and
|
||||
($boost.include.libraries='' or
|
||||
contains($boost.include.libraries, @id))">
|
||||
<chapter>
|
||||
<xsl:attribute name="id">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@id">
|
||||
<xsl:value-of select="@id"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="generate.id"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:if test="@last-revision">
|
||||
<xsl:attribute
|
||||
name="rev:last-revision"
|
||||
namespace="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision">
|
||||
<xsl:value-of select="@last-revision"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates/>
|
||||
</chapter>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="chapter">
|
||||
<xsl:if test="$boost.include.libraries=''">
|
||||
<chapter>
|
||||
<xsl:for-each select="./@*">
|
||||
<xsl:attribute name="{name(.)}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:for-each>
|
||||
|
||||
<xsl:apply-templates/>
|
||||
</chapter>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="boostbook">
|
||||
<book><xsl:apply-templates/></book>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="programlisting">
|
||||
<programlisting><xsl:apply-templates/></programlisting>
|
||||
</xsl:template>
|
||||
|
||||
<!-- These DocBook elements have special meaning. Use the annotation mode -->
|
||||
<xsl:template match="classname|methodname|functionname|enumname|libraryname|
|
||||
conceptname|macroname|headername">
|
||||
<xsl:apply-templates select="." mode="annotation"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="description">
|
||||
<xsl:apply-templates mode="annotation"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Swallow using-namespace and using-class directives along with
|
||||
last-revised elements -->
|
||||
<xsl:template match="using-namespace|using-class|last-revised"/>
|
||||
|
||||
<!-- If there is no "namespace-reference" mode, forward to
|
||||
"reference" mode -->
|
||||
<xsl:template match="*" mode="namespace-reference">
|
||||
<xsl:apply-templates select="." mode="reference"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
12
src/documentation/xsl/error.xsl
Normal file
12
src/documentation/xsl/error.xsl
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
<xsl:template name="print.warning.context">
|
||||
<xsl:message>
|
||||
<xsl:text> In </xsl:text>
|
||||
<xsl:call-template name="fully-qualified-name">
|
||||
<xsl:with-param name="node" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:message>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
1199
src/documentation/xsl/function.xsl
Normal file
1199
src/documentation/xsl/function.xsl
Normal file
File diff suppressed because it is too large
Load Diff
11
src/documentation/xsl/index.xsl
Normal file
11
src/documentation/xsl/index.xsl
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
<xsl:template match="class-index">
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="function-index">
|
||||
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
122
src/documentation/xsl/library.xsl
Normal file
122
src/documentation/xsl/library.xsl
Normal file
@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
<xsl:key name="library-categories" match="library"
|
||||
use="libraryinfo/librarycategory/@name"/>
|
||||
|
||||
<xsl:template match="librarylist">
|
||||
<itemizedlist spacing="compact">
|
||||
<xsl:apply-templates select="//library"
|
||||
mode="build-library-list">
|
||||
<xsl:sort select="@name"/>
|
||||
</xsl:apply-templates>
|
||||
</itemizedlist>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="library.link">
|
||||
<xsl:param name="node" select="."/>
|
||||
<xsl:param name="name" select="$node/attribute::name"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$node/attribute::html-only = 1">
|
||||
<xsl:variable name="url">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$node/attribute::url">
|
||||
<xsl:value-of select="$node/attribute::url"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="concat($boost.root,
|
||||
'/libs/',
|
||||
$node/attribute::dirname,
|
||||
'/index.html')"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<ulink>
|
||||
<xsl:attribute name="url">
|
||||
<xsl:value-of select="$url"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="$name"/>
|
||||
</ulink>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="internal-link">
|
||||
<xsl:with-param name="to">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$node/attribute::id">
|
||||
<xsl:value-of select="$node/attribute::id"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="generate.id">
|
||||
<xsl:with-param name="node" select="$node"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="text" select="$name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="library" mode="build-library-list">
|
||||
<listitem>
|
||||
<simpara>
|
||||
<xsl:call-template name="library.link"/>
|
||||
<xsl:text> - </xsl:text>
|
||||
<xsl:apply-templates select="libraryinfo/librarypurpose"
|
||||
mode="build-library-list"/>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="librarypurpose" mode="build-library-list">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text>, from </xsl:text>
|
||||
<xsl:apply-templates select="../author" mode="display-author-list"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="author" mode="display-author-list">
|
||||
<xsl:if test="(position() > 1) and (count(../author) > 2)">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="(position() = count(../author)) and (position() > 1)">
|
||||
<xsl:if test="position() < 3">
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>and </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="firstname/text()"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="surname/text()"/>
|
||||
<xsl:if test="(position() = count(../author))">
|
||||
<xsl:text>.</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="librarycategorylist">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="librarycategorydef">
|
||||
<section>
|
||||
<title><xsl:apply-templates/></title>
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<itemizedlist spacing="compact">
|
||||
<xsl:apply-templates select="key('library-categories', $name)"
|
||||
mode="build-library-list">
|
||||
<xsl:sort select="@name"/>
|
||||
</xsl:apply-templates>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="libraryinfo">
|
||||
<chapterinfo>
|
||||
<xsl:apply-templates select="author|copyright|legalnotice"/>
|
||||
</chapterinfo>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="librarypurpose|librarycategory"/>
|
||||
|
||||
</xsl:stylesheet>
|
335
src/documentation/xsl/lookup.xsl
Normal file
335
src/documentation/xsl/lookup.xsl
Normal file
@ -0,0 +1,335 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:param name="boost.max.id.length">26</xsl:param>
|
||||
|
||||
<!-- Generate an ID for the entity referenced -->
|
||||
<xsl:template name="generate.id">
|
||||
<xsl:param name="node" select="."/>
|
||||
<xsl:variable name="id">
|
||||
<xsl:apply-templates select="$node" mode="generate.id"/>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length($id) > $boost.max.id.length">
|
||||
<xsl:value-of select="generate-id($node)"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="string($id)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*" mode="generate.id">
|
||||
<xsl:value-of select="generate-id(.)"/>
|
||||
<xsl:text>-bb</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Strip the qualifiers off a qualified name and return the unqualified
|
||||
name. For instance, "boost::python::function" would become just
|
||||
"function". -->
|
||||
<xsl:template name="strip-qualifiers">
|
||||
<xsl:param name="name"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($name, '::')">
|
||||
<xsl:call-template name="strip-qualifiers">
|
||||
<xsl:with-param name="name" select="substring-after($name, '::')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$name"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Build the fully-qualified name of the given node -->
|
||||
<xsl:template name="fully-qualified-name">
|
||||
<xsl:param name="node"/>
|
||||
<xsl:param name="separator" select="'::'"/>
|
||||
<xsl:apply-templates select="$node" mode="fully-qualified-name">
|
||||
<xsl:with-param name="separator" select="$separator"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Hack to make the node we are building the current node so that the
|
||||
ancestor:: syntax will work -->
|
||||
<xsl:template match="*" mode="fully-qualified-name">
|
||||
<xsl:param name="separator" select="'::'"/>
|
||||
<xsl:call-template name="build-fully-qualified-name">
|
||||
<xsl:with-param name="separator" select="$separator"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<!-- The real routine that builds a fully-qualified name for the current
|
||||
node. -->
|
||||
<xsl:template name="build-fully-qualified-name">
|
||||
<xsl:param name="separator" select="'::'"/>
|
||||
|
||||
<!-- The depth of qualified name element that we will print now-->
|
||||
<xsl:param name="depth" select="1"/>
|
||||
|
||||
<!-- Determine the set of ancestor namespaces -->
|
||||
<xsl:variable name="ancestors"
|
||||
select="ancestor::namespace|ancestor::class"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$depth > count($ancestors)">
|
||||
<xsl:apply-templates select="." mode="print-name"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="name($ancestors[$depth])='namespace' or
|
||||
count(ancestor::free-function-group)=0">
|
||||
<xsl:apply-templates select="$ancestors[$depth]" mode="print-name"/>
|
||||
<xsl:value-of select="$separator"/>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="build-fully-qualified-name">
|
||||
<xsl:with-param name="separator" select="$separator"/>
|
||||
<xsl:with-param name="depth" select="$depth + 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Print the name of the current node -->
|
||||
<xsl:template match="*" mode="print-name">
|
||||
<xsl:value-of select="@name"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="name-matches-node">
|
||||
<!-- The name we are looking for -->
|
||||
<xsl:param name="name"/>
|
||||
|
||||
<!-- The name to display -->
|
||||
<xsl:param name="display-name" select="$name"/>
|
||||
|
||||
<!-- The context in which this name occurs -->
|
||||
<xsl:param name="context"/>
|
||||
|
||||
<!-- The node that we are checking against -->
|
||||
<xsl:param name="node"/>
|
||||
|
||||
<!-- The mode we are in. Can be one of:
|
||||
matches: emits the matches as they are found (for debugging)
|
||||
link: link to the node that was found
|
||||
-->
|
||||
<xsl:param name="mode" select="'matches'"/>
|
||||
|
||||
<!-- The index into the list of using directives for the context node -->
|
||||
<xsl:param name="index" select="1"/>
|
||||
|
||||
<!-- The prefix we should append to the name when checking this node -->
|
||||
<xsl:param name="prefix" select="''"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="count($node) > 1">
|
||||
<xsl:variable name="matches">
|
||||
<xsl:call-template name="count-matches">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="context" select="$context"/>
|
||||
<xsl:with-param name="nodes" select="$node[position() = 1]"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$matches = 0">
|
||||
<xsl:call-template name="name-matches-node">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="display-name" select="$display-name"/>
|
||||
<xsl:with-param name="context" select="$context"/>
|
||||
<xsl:with-param name="node" select="$node[position() > 1]"/>
|
||||
<xsl:with-param name="mode" select="$mode"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="name-matches-node">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="display-name" select="$display-name"/>
|
||||
<xsl:with-param name="context" select="$context"/>
|
||||
<xsl:with-param name="node" select="$node[position() = 1]"/>
|
||||
<xsl:with-param name="mode" select="$mode"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="count($node) = 1">
|
||||
<!-- The fully-qualified name of the node we are checking against -->
|
||||
<xsl:variable name="fully-qualified-name">
|
||||
<xsl:call-template name="fully-qualified-name">
|
||||
<xsl:with-param name="node" select="$node"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- The set of using directives for this context node -->
|
||||
<xsl:variable name="directives"
|
||||
select="$context/ancestor::*/using-namespace |
|
||||
$context/ancestor::namespace |
|
||||
$context/ancestor::*/using-class |
|
||||
$context/ancestor::class"/>
|
||||
|
||||
<!-- The name of the current directive -->
|
||||
<xsl:variable name="this-context">
|
||||
<xsl:apply-templates select="$directives[$index]" mode="print-name"/>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Check if we have a match -->
|
||||
<xsl:variable name="have-match"
|
||||
select="$fully-qualified-name = concat($prefix, $name)"/>
|
||||
|
||||
<xsl:if test="$have-match">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$mode='matches'">
|
||||
Match in namespace ::<xsl:value-of select="$prefix"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$mode='link'">
|
||||
<xsl:call-template name="internal-link">
|
||||
<xsl:with-param name="to">
|
||||
<xsl:call-template name="generate.id">
|
||||
<xsl:with-param name="node" select="$node"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="text" select="$display-name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="(not($index > count($directives))) and
|
||||
(not($have-match) or ($mode = 'matches'))">
|
||||
<xsl:variable name="first-branch">
|
||||
<xsl:if test="not ($prefix = '')">
|
||||
<!-- Recurse and append the current context node to the prefix -->
|
||||
<xsl:call-template name="name-matches-node">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="display-name" select="$display-name"/>
|
||||
<xsl:with-param name="context" select="$context"/>
|
||||
<xsl:with-param name="node" select="$node"/>
|
||||
<xsl:with-param name="mode" select="$mode"/>
|
||||
<xsl:with-param name="index" select="$index + 1"/>
|
||||
<xsl:with-param name="prefix"
|
||||
select="concat($prefix, $this-context, '::')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="string($first-branch) != ''">
|
||||
<xsl:copy-of select="$first-branch"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- Recurse with just the current context node -->
|
||||
<xsl:call-template name="name-matches-node">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="display-name" select="$display-name"/>
|
||||
<xsl:with-param name="context" select="$context"/>
|
||||
<xsl:with-param name="node" select="$node"/>
|
||||
<xsl:with-param name="mode" select="$mode"/>
|
||||
<xsl:with-param name="index" select="$index + 1"/>
|
||||
<xsl:with-param name="prefix"
|
||||
select="concat($this-context, '::')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Count the number of nodes in the set that match the given name and
|
||||
lookup context -->
|
||||
<xsl:template name="count-matches">
|
||||
<xsl:param name="name"/>
|
||||
<xsl:param name="context"/>
|
||||
<xsl:param name="nodes"/>
|
||||
|
||||
<xsl:variable name="match-string">
|
||||
<xsl:for-each select="$nodes">
|
||||
<xsl:variable name="does-match">
|
||||
<xsl:call-template name="name-matches-node">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="context" select="$context"/>
|
||||
<xsl:with-param name="node" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:if test="not($does-match='')">X</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<xsl:value-of select="string-length($match-string)"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="cxx-link-name">
|
||||
<!-- The actual lookup node -->
|
||||
<xsl:param name="lookup"/>
|
||||
|
||||
<!-- The type of name to lookup (e.g., class) -->
|
||||
<xsl:param name="type"/>
|
||||
|
||||
<!-- The name we are looking for -->
|
||||
<xsl:param name="name"/>
|
||||
|
||||
<!-- The name we will display -->
|
||||
<xsl:param name="display-name"/>
|
||||
|
||||
<!-- The name we are looking for (unqualified)-->
|
||||
<xsl:param name="unqualified name"/>
|
||||
|
||||
<!-- The list of nodes that match the lookup node in both name and type -->
|
||||
<xsl:param name="nodes"/>
|
||||
|
||||
<!-- Count the number of nodes that match -->
|
||||
<xsl:variable name="matches">
|
||||
<xsl:call-template name="count-matches">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="context" select="$lookup"/>
|
||||
<xsl:with-param name="nodes" select="$nodes"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$matches = 0">
|
||||
<xsl:message>
|
||||
<xsl:text>Cannot find </xsl:text>
|
||||
<xsl:value-of select="$type"/>
|
||||
<xsl:text> named '</xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text>'</xsl:text>
|
||||
</xsl:message>
|
||||
<xsl:value-of select="$display-name"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$matches = 1">
|
||||
<xsl:for-each select="$nodes">
|
||||
<xsl:call-template name="name-matches-node">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="display-name" select="$display-name"/>
|
||||
<xsl:with-param name="context" select="$lookup"/>
|
||||
<xsl:with-param name="node" select="."/>
|
||||
<xsl:with-param name="mode" select="'link'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:message>
|
||||
<xsl:text>Reference to </xsl:text>
|
||||
<xsl:value-of select="$type"/>
|
||||
<xsl:text> '</xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text>' is ambiguous. Found:</xsl:text>
|
||||
<xsl:for-each select="$nodes">
|
||||
<xsl:call-template name="name-matches-node">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="context" select="$lookup"/>
|
||||
<xsl:with-param name="node" select="."/>
|
||||
<xsl:with-param name="mode" select="'matches'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</xsl:message>
|
||||
<xsl:call-template name="name-matches-node">
|
||||
<xsl:with-param name="name" select="$name"/>
|
||||
<xsl:with-param name="display-name" select="$display-name"/>
|
||||
<xsl:with-param name="context" select="$lookup"/>
|
||||
<xsl:with-param name="node" select="$nodes"/>
|
||||
<xsl:with-param name="mode" select="'link'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
70
src/documentation/xsl/macro.xsl
Normal file
70
src/documentation/xsl/macro.xsl
Normal file
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
<xsl:template match="macro" mode="synopsis">
|
||||
<xsl:param name="indentation" select="0"/>
|
||||
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:if
|
||||
test="not(local-name(preceding-sibling::*[position()=1])=local-name(.))">
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="macro-synopsis">
|
||||
<xsl:with-param name="link-type" select="'link'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="macro" mode="reference">
|
||||
<xsl:call-template name="reference-documentation">
|
||||
<xsl:with-param name="refname" select="@name"/>
|
||||
<xsl:with-param name="purpose" select="purpose/*|purpose/text()"/>
|
||||
<xsl:with-param name="anchor">
|
||||
<xsl:call-template name="generate.id"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="name">
|
||||
<xsl:text>Macro </xsl:text>
|
||||
<xsl:call-template name="monospaced">
|
||||
<xsl:with-param name="text" select="@name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="synopsis">
|
||||
<xsl:call-template name="macro-synopsis">
|
||||
<xsl:with-param name="link-type" select="'none'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="text">
|
||||
<xsl:apply-templates select="description"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="macro-synopsis">
|
||||
<xsl:param name="link-type"/>
|
||||
|
||||
<xsl:call-template name="link-or-anchor">
|
||||
<xsl:with-param name="to">
|
||||
<xsl:call-template name="generate.id" select="."/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="text" select="@name"/>
|
||||
<xsl:with-param name="link-type" select="$link-type"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:if test="@kind='functionlike'">
|
||||
<xsl:text>(</xsl:text>
|
||||
<xsl:for-each select="macro-parameter">
|
||||
<xsl:if test="position() > 1">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="@name"/>
|
||||
</xsl:for-each>
|
||||
<xsl:text>)</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="macro" mode="generate.id">
|
||||
<xsl:value-of select="@name"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
109
src/documentation/xsl/reference.xsl
Normal file
109
src/documentation/xsl/reference.xsl
Normal file
@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
<xsl:include href="annotation.xsl"/>
|
||||
<xsl:include href="template.xsl"/>
|
||||
<xsl:include href="function.xsl"/>
|
||||
<xsl:include href="type.xsl"/>
|
||||
<xsl:include href="source-highlight.xsl"/>
|
||||
<xsl:include href="utility.xsl"/>
|
||||
<xsl:include href="lookup.xsl"/>
|
||||
<xsl:include href="library.xsl"/>
|
||||
<xsl:include href="index.xsl"/>
|
||||
<xsl:include href="error.xsl"/>
|
||||
<xsl:include href="macro.xsl"/>
|
||||
<xsl:include href="testing/testsuite.xsl"/>
|
||||
<xsl:include href="caramel/concept2docbook.xsl"/>
|
||||
|
||||
<xsl:template name="namespace-synopsis">
|
||||
<xsl:param name="indentation" select="0"/>
|
||||
<!-- Open namespace-->
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="source-highlight">
|
||||
<xsl:with-param name="text" select="concat('namespace ',@name)"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> {</xsl:text>
|
||||
|
||||
<!-- Emit namespace types -->
|
||||
<xsl:apply-templates select="class|class-specialization|
|
||||
struct|struct-specialization|
|
||||
union|union-specialization|
|
||||
typedef|enum" mode="synopsis">
|
||||
<xsl:with-param name="indentation" select="$indentation + 2"/>
|
||||
</xsl:apply-templates>
|
||||
|
||||
<!-- Emit namespace functions -->
|
||||
<xsl:apply-templates
|
||||
select="free-function-group|function|overloaded-function"
|
||||
mode="synopsis">
|
||||
<xsl:with-param name="indentation" select="$indentation + 2"/>
|
||||
</xsl:apply-templates>
|
||||
|
||||
<!-- Emit namespaces -->
|
||||
<xsl:apply-templates select="namespace" mode="synopsis">
|
||||
<xsl:with-param name="indentation" select="$indentation + 2"/>
|
||||
</xsl:apply-templates>
|
||||
|
||||
<!-- Close namespace -->
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>}</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Emit namespace synopsis -->
|
||||
<xsl:template match="namespace" mode="synopsis">
|
||||
<xsl:param name="indentation" select="0"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(ancestor::namespace)=0">
|
||||
<xsl:call-template name="namespace-synopsis">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="namespace-synopsis">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Emit namespace reference -->
|
||||
<xsl:template match="namespace" mode="reference">
|
||||
<xsl:apply-templates select="namespace|typedef|free-function-group"
|
||||
mode="reference">
|
||||
<xsl:with-param name="indentation" select="0"/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="class|class-specialization|
|
||||
struct|struct-specialization|
|
||||
union|union-specialization|enum|function|
|
||||
overloaded-function"
|
||||
mode="namespace-reference"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Eat extra documentation when in the synopsis or reference sections -->
|
||||
<xsl:template match="para|section" mode="synopsis"/>
|
||||
<xsl:template match="para|section" mode="reference"/>
|
||||
|
||||
<!-- Comment mode tries to wipe out any extra spacing in the output -->
|
||||
<xsl:template match="purpose" mode="comment">
|
||||
<xsl:apply-templates mode="comment"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="simpara|para" mode="comment">
|
||||
<xsl:apply-templates select="text()|*" mode="comment"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="text()" mode="comment">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*" mode="comment">
|
||||
<xsl:apply-templates select="." mode="annotation"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
158
src/documentation/xsl/source-highlight.xsl
Normal file
158
src/documentation/xsl/source-highlight.xsl
Normal file
@ -0,0 +1,158 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
<xsl:param name="boost.syntax.highlight">1</xsl:param>
|
||||
|
||||
<xsl:template name="source-highlight">
|
||||
<xsl:param name="text" select="."/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$boost.syntax.highlight='1'">
|
||||
<xsl:call-template name="highlight-text">
|
||||
<xsl:with-param name="text" select="$text"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$text"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Perform C++ keyword highlighting on the given text -->
|
||||
<xsl:template name="highlight-text">
|
||||
<xsl:param name="text" select="."/>
|
||||
<xsl:param name="keywords"
|
||||
select="'asm auto bool break case catch char class const const_cast continue default delete do double dynamic_cast else enum explicit export extern false float for friend goto if inline int long mutable namespace new operator private protected public register reinterpret_cast return short signed sizeof static static_cast struct switch template this throw true try typedef typeid typename union unsigned using virtual void volatile wchar_t while'"/>
|
||||
<xsl:param name="best-match" select="''"/>
|
||||
|
||||
<!-- Determine the current keyword -->
|
||||
<xsl:variable name="keyword">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($keywords, ' ')">
|
||||
<xsl:value-of select="substring-before($keywords, ' ')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$keywords"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Determine the set of keywords that are left -->
|
||||
<xsl:variable name="keywords-left">
|
||||
<xsl:if test="contains($keywords, ' ')">
|
||||
<xsl:value-of select="substring-after($keywords, ' ')"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- The set of characters that can be identifiers -->
|
||||
<xsl:variable name="id-chars" select="'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'"/>
|
||||
|
||||
<xsl:variable name="X" select="'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'"/>
|
||||
|
||||
<xsl:choose>
|
||||
<!-- Have we exhausted all keywords without finding any to highlight? -->
|
||||
<xsl:when test="$keyword='' and $best-match=''">
|
||||
<!-- Just copy the text -->
|
||||
<xsl:copy-of select="$text"/>
|
||||
</xsl:when>
|
||||
|
||||
<!-- Have we exhausted all keywords, but have one to highlight? If so,
|
||||
make sure we didn't just find part of an identifier. -->
|
||||
<xsl:when
|
||||
test="$keyword='' and
|
||||
not (starts-with(translate(substring-after($text, $best-match),
|
||||
$id-chars, $X), 'X')) and
|
||||
not (substring(translate(substring-before($text, $best-match),
|
||||
$id-chars, $X),
|
||||
string-length(substring-before($text,
|
||||
$best-match)),
|
||||
1) = 'X')">
|
||||
<!-- Copy text before this keyword -->
|
||||
<xsl:value-of select="substring-before($text, $best-match)"/>
|
||||
|
||||
<!-- Highlight the keyword -->
|
||||
<xsl:call-template name="highlight-keyword">
|
||||
<xsl:with-param name="keyword" select="$best-match"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<!-- Recurse on the rest of the text -->
|
||||
<xsl:call-template name="highlight-text">
|
||||
<xsl:with-param name="text"
|
||||
select="substring-after($text, $best-match)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<!-- We thought we had a keyword to highlight, but it was part of an
|
||||
identifier. So output all of the text up to (but not including!)
|
||||
the last letter of the identifier, and try again to
|
||||
highlight. -->
|
||||
<xsl:when test="$keyword=''">
|
||||
<xsl:value-of select="substring-before($text, $best-match)"/>
|
||||
<xsl:value-of
|
||||
select="substring($best-match, 1, string-length($best-match)-1)"/>
|
||||
<xsl:call-template name="highlight-text">
|
||||
<xsl:with-param name="text"
|
||||
select="concat(substring($best-match, string-length($best-match),
|
||||
1), substring-after($text, $best-match))"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<!-- Does the text contain this keyword with a better match than we
|
||||
previously had? -->
|
||||
<xsl:when
|
||||
test="contains($text, $keyword) and
|
||||
(($best-match = '') or
|
||||
(string-length(substring-before($text, $keyword)) <
|
||||
string-length(substring-before($text, $best-match))))">
|
||||
<!-- Recurse with the current keyword as the new best match -->
|
||||
<xsl:call-template name="highlight-text">
|
||||
<xsl:with-param name="text" select="$text"/>
|
||||
<xsl:with-param name="keywords" select="$keywords-left"/>
|
||||
<xsl:with-param name="best-match" select="$keyword"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
|
||||
<!-- Text does not contain this keyword. Just recurse normally -->
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="highlight-text">
|
||||
<xsl:with-param name="text" select="$text"/>
|
||||
<xsl:with-param name="keywords" select="$keywords-left"/>
|
||||
<xsl:with-param name="best-match" select="$best-match"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="*" mode="highlight">
|
||||
<xsl:element name="{name(.)}">
|
||||
<xsl:for-each select="./@*">
|
||||
<xsl:choose>
|
||||
<xsl:when test="local-name(.)='last-revision'">
|
||||
<xsl:attribute
|
||||
name="rev:last-revision"
|
||||
namespace="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"
|
||||
>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:attribute name="{name(.)}">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:attribute>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
<xsl:apply-templates mode="highlight"/>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="text()" mode="highlight">
|
||||
<xsl:call-template name="source-highlight">
|
||||
<xsl:with-param name="text" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="classname|methodname|functionname|libraryname|enumname|
|
||||
conceptname|macroname" mode="highlight">
|
||||
<xsl:apply-templates select="." mode="annotation"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
436
src/documentation/xsl/template.xsl
Normal file
436
src/documentation/xsl/template.xsl
Normal file
@ -0,0 +1,436 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
<!-- Determine the length of a template header synopsis -->
|
||||
<xsl:template name="template.synopsis.length">
|
||||
<xsl:variable name="text">
|
||||
<xsl:apply-templates select="template" mode="synopsis">
|
||||
<xsl:with-param name="indentation" select="0"/>
|
||||
<xsl:with-param name="wrap" select="false()"/>
|
||||
<xsl:with-param name="highlight" select="false()"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:variable>
|
||||
<xsl:value-of select="string-length($text)"/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Determine the length of a template header reference -->
|
||||
<xsl:template name="template.reference.length">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(template)">
|
||||
0
|
||||
</xsl:when>
|
||||
<xsl:when test="template/*/purpose">
|
||||
<!-- TBD: The resulting value need only be greater than the number of
|
||||
columns. We chose to add 17 because it's funny for C++
|
||||
programmers. :) -->
|
||||
<xsl:value-of select="$max-columns + 17"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="template.synopsis.length"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Output a template header in synopsis mode -->
|
||||
<xsl:template match="template" mode="synopsis">
|
||||
<xsl:param name="indentation" select="0"/>
|
||||
<xsl:param name="wrap" select="true()"/>
|
||||
<xsl:param name="highlight" select="true()"/>
|
||||
|
||||
<xsl:call-template name="template.synopsis">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
<xsl:with-param name="wrap" select="$wrap"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Output a template header in reference mode -->
|
||||
<xsl:template match="template" mode="reference">
|
||||
<xsl:param name="indentation" select="0"/>
|
||||
<xsl:param name="highlight" select="true()"/>
|
||||
<xsl:call-template name="template.reference">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Emit a template header synopsis -->
|
||||
<xsl:template name="template.synopsis">
|
||||
<xsl:param name="indentation" select="0"/>
|
||||
<xsl:param name="wrap" select="true()"/>
|
||||
<xsl:param name="highlight" select="true()"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$highlight">
|
||||
<xsl:call-template name="highlight-keyword">
|
||||
<xsl:with-param name="keyword" select="'template'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>template</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text><</xsl:text>
|
||||
<xsl:call-template name="template.synopsis.parameters">
|
||||
<xsl:with-param name="indentation" select="$indentation + 9"/>
|
||||
<xsl:with-param name="wrap" select="$wrap"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>> </xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Display a list of template parameters for a synopsis (no comments) -->
|
||||
<xsl:template name="template.synopsis.parameters">
|
||||
<xsl:param name="indentation"/>
|
||||
<xsl:param name="wrap" select="true()"/>
|
||||
<xsl:param name="highlight" select="true()"/>
|
||||
|
||||
<xsl:param name="column" select="$indentation"/>
|
||||
<xsl:param name="prefix" select="''"/>
|
||||
<xsl:param name="parameters" select="template-type-parameter|template-varargs|template-nontype-parameter"/>
|
||||
<xsl:param name="first-on-line" select="true()"/>
|
||||
|
||||
<xsl:if test="$parameters">
|
||||
<!-- Emit the prefix (either a comma-space, or empty if this is
|
||||
the first parameter) -->
|
||||
<xsl:value-of select="$prefix"/>
|
||||
|
||||
<!-- Get the actual parameter and its attributes -->
|
||||
<xsl:variable name="parameter" select="$parameters[position()=1]"/>
|
||||
<xsl:variable name="rest" select="$parameters[position()!=1]"/>
|
||||
|
||||
<!-- Compute the actual text of this parameter -->
|
||||
<xsl:variable name="text">
|
||||
<xsl:call-template name="template.parameter">
|
||||
<xsl:with-param name="parameter" select="$parameter"/>
|
||||
<xsl:with-param name="is-last" select="not(rest)"/>
|
||||
<xsl:with-param name="highlight" select="false()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Where will this template parameter finish? -->
|
||||
<xsl:variable name="end-column"
|
||||
select="$column + string-length($prefix) + string-length($text)"/>
|
||||
|
||||
<!-- Should the text go on this line or on the next? -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="$first-on-line or ($end-column < $max-columns) or
|
||||
not($wrap)">
|
||||
<!-- Print on this line -->
|
||||
<xsl:call-template name="template.parameter">
|
||||
<xsl:with-param name="parameter" select="$parameter"/>
|
||||
<xsl:with-param name="is-last" select="not($rest)"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<!-- Recurse -->
|
||||
<xsl:call-template name="template.synopsis.parameters">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
<xsl:with-param name="wrap" select="$wrap"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
<xsl:with-param name="column" select="$end-column"/>
|
||||
<xsl:with-param name="prefix" select="', '"/>
|
||||
<xsl:with-param name="parameters" select="$rest"/>
|
||||
<xsl:with-param name="first-on-line" select="false()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- Print on next line -->
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="template.parameter">
|
||||
<xsl:with-param name="parameter" select="$parameter"/>
|
||||
<xsl:with-param name="is-last" select="not($rest)"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:call-template name="template.synopsis.parameters">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
<xsl:with-param name="wrap" select="$wrap"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
<xsl:with-param name="column"
|
||||
select="$indentation + string-length($text)"/>
|
||||
<xsl:with-param name="prefix" select="', '"/>
|
||||
<xsl:with-param name="parameters" select="$rest"/>
|
||||
<xsl:with-param name="first-on-line" select="false()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Emit a template header reference -->
|
||||
<xsl:template name="template.reference">
|
||||
<xsl:param name="indentation" select="0"/>
|
||||
<xsl:param name="highlight" select="true()"/>
|
||||
|
||||
<xsl:if test="template-type-parameter|template-varargs|template-nontype-parameter">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$highlight">
|
||||
<xsl:call-template name="highlight-keyword">
|
||||
<xsl:with-param name="keyword" select="'template'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>template</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text><</xsl:text>
|
||||
<xsl:call-template name="template.reference.parameters">
|
||||
<xsl:with-param name="indentation" select="$indentation + 9"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>> </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Display a set of template parameters for a reference -->
|
||||
<xsl:template name="template.reference.parameters">
|
||||
<xsl:param name="indentation"/>
|
||||
<xsl:param name="highlight" select="true()"/>
|
||||
<xsl:param name="parameters" select="template-type-parameter|template-varargs|template-nontype-parameter"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$parameters/purpose">
|
||||
<xsl:call-template name="template.reference.parameters.comments">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="template.synopsis.parameters">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
<xsl:with-param name="wrap" select="true()"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Output template parameters when there are comments with the parameters.
|
||||
For clarity, we output each template parameter on a separate line. -->
|
||||
<xsl:template name="template.reference.parameters.comments">
|
||||
<xsl:param name="indentation"/>
|
||||
<xsl:param name="highlight" select="true()"/>
|
||||
<xsl:param name="parameters" select="template-type-parameter|template-varargs|template-nontype-parameter"/>
|
||||
|
||||
<xsl:if test="$parameters">
|
||||
<!-- Get the actual parameter and its attributes -->
|
||||
<xsl:variable name="parameter" select="$parameters[position()=1]"/>
|
||||
<xsl:variable name="rest" select="$parameters[position()!=1]"/>
|
||||
|
||||
<!-- Display the parameter -->
|
||||
<xsl:call-template name="template.parameter">
|
||||
<xsl:with-param name="parameter" select="$parameter"/>
|
||||
<xsl:with-param name="is-last" select="not($rest)"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:if test="$rest">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Display the comment -->
|
||||
<xsl:if test="$parameter/purpose">
|
||||
<xsl:call-template name="highlight-comment">
|
||||
<xsl:with-param name="text">
|
||||
<xsl:text> // </xsl:text>
|
||||
<xsl:apply-templates
|
||||
select="$parameter/purpose/*|$parameter/purpose/text()"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Indent the next line -->
|
||||
<xsl:if test="$parameter/purpose or $rest">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
|
||||
<!-- Recurse to print the rest of the parameters -->
|
||||
<xsl:call-template name="template.reference.parameters.comments">
|
||||
<xsl:with-param name="indentation" select="$indentation"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
<xsl:with-param name="parameters" select="$rest"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Print a template parameter -->
|
||||
<xsl:template name="template.parameter">
|
||||
<xsl:param name="parameter"/>
|
||||
<xsl:param name="is-last"/>
|
||||
<xsl:param name="highlight" select="true()"/>
|
||||
<xsl:apply-templates select="$parameter"
|
||||
mode="print.parameter">
|
||||
<xsl:with-param name="parameter" select="$parameter"/>
|
||||
<xsl:with-param name="is-last" select="$is-last"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="template.parameter.name">
|
||||
<xsl:param name="name" select="@name"/>
|
||||
<xsl:param name="highlight" select="true()"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$highlight">
|
||||
<xsl:call-template name="concept.link">
|
||||
<xsl:with-param name="name"
|
||||
select="translate($name, '0123456789', '')"/>
|
||||
<xsl:with-param name="text" select="$name"/>
|
||||
<xsl:with-param name="warn" select="false"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$name"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="template-type-parameter" mode="print.parameter">
|
||||
<xsl:param name="parameter"/>
|
||||
<xsl:param name="is-last"/>
|
||||
<xsl:param name="highlight"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$highlight">
|
||||
<xsl:call-template name="highlight-keyword">
|
||||
<xsl:with-param name="keyword" select="'typename'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>typename</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text> </xsl:text>
|
||||
|
||||
<xsl:call-template name="template.parameter.name">
|
||||
<xsl:with-param name="name" select="$parameter/@name"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:variable name="def">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$parameter/@default">
|
||||
<xsl:message>
|
||||
<xsl:text>Warning: 'default' attribute of template parameter element is deprecated. Use 'default' element.</xsl:text>
|
||||
<xsl:call-template name="print.warning.context"/>
|
||||
</xsl:message>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$highlight and false()">
|
||||
<xsl:call-template name="source-highlight">
|
||||
<xsl:with-param name="text">
|
||||
<xsl:value-of select="$parameter/@default"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$parameter/@default"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="$parameter/default">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$highlight">
|
||||
<xsl:apply-templates
|
||||
select="$parameter/default/*|$parameter/default/text()"
|
||||
mode="highlight"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="string($parameter/default)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="not($def='')">
|
||||
<xsl:text> = </xsl:text>
|
||||
|
||||
<xsl:copy-of select="$def"/>
|
||||
|
||||
<!-- If this is the last parameter, add an extra space to
|
||||
avoid printing >> -->
|
||||
<xsl:if
|
||||
test="$is-last and (substring($def, string-length($def))='>')">
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="template-nontype-parameter" mode="print.parameter">
|
||||
<xsl:param name="parameter"/>
|
||||
<xsl:param name="is-last"/>
|
||||
<xsl:param name="highlight"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$highlight">
|
||||
<xsl:call-template name="source-highlight">
|
||||
<xsl:with-param name="text">
|
||||
<xsl:apply-templates
|
||||
select="$parameter/type/*|$parameter/type/text()"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$parameter/type/*|$parameter/type/text()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:text> </xsl:text>
|
||||
|
||||
<xsl:call-template name="template.parameter.name">
|
||||
<xsl:with-param name="name" select="$parameter/@name"/>
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:variable name="def">
|
||||
<xsl:value-of select="string($parameter/default)"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:if test="not($def='')">
|
||||
<xsl:text> = </xsl:text>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$highlight">
|
||||
<xsl:apply-templates select="$parameter/default/*" mode="highlight"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$def"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!-- If this is the last parameter, add an extra space to
|
||||
avoid printing >> -->
|
||||
<xsl:if
|
||||
test="$is-last and (substring($def, string-length($def))='>')">
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="template-varargs" mode="print.parameter">
|
||||
<xsl:text>...</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="specialization">
|
||||
<xsl:param name="highlight" select="true()"/>
|
||||
<xsl:text><</xsl:text>
|
||||
<xsl:apply-templates select="template-arg">
|
||||
<xsl:with-param name="highlight" select="$highlight"/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:text>></xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="template-arg">
|
||||
<xsl:if test="position() > 1">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates mode="highlight"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
111
src/documentation/xsl/testing/testsuite.xsl
Normal file
111
src/documentation/xsl/testing/testsuite.xsl
Normal file
@ -0,0 +1,111 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
<xsl:template match="testsuite">
|
||||
<section>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@id">
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="@id"/>
|
||||
</xsl:attribute>
|
||||
</xsl:when>
|
||||
<xsl:when test="../@id">
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="concat(../@id, '.tests')"/>
|
||||
</xsl:attribute>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
|
||||
<title>Testsuite</title>
|
||||
|
||||
<xsl:if test="compile-test|link-test|run-test">
|
||||
<section>
|
||||
<xsl:if test="@id">
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="@id"/>
|
||||
<xsl:text>.acceptance</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
|
||||
<title>Acceptance tests</title>
|
||||
<informaltable>
|
||||
<tgroup cols="3">
|
||||
<colspec colnum="2" colwidth="1in"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Test</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Description</entry>
|
||||
<entry>If failing...</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:apply-templates select="compile-test|link-test|run-test"/>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</section>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="compile-fail-test|link-fail-test|run-fail-test">
|
||||
<section>
|
||||
<xsl:if test="@id">
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="@id"/>
|
||||
<xsl:text>.negative</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<title>Negative tests</title>
|
||||
<informaltable>
|
||||
<tgroup cols="3">
|
||||
<colspec colnum="2" colwidth="1in"/>
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Test</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Description</entry>
|
||||
<entry>If failing...</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:apply-templates
|
||||
select="compile-fail-test|link-fail-test|run-fail-test"/>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</section>
|
||||
</xsl:if>
|
||||
</section>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="compile-test|link-test|run-test|
|
||||
compile-fail-test|link-fail-test|run-fail-test">
|
||||
<row>
|
||||
<entry>
|
||||
<simpara>
|
||||
<ulink>
|
||||
<xsl:attribute name="url">
|
||||
<xsl:value-of
|
||||
select="concat('../../libs/',
|
||||
ancestor::library/attribute::dirname, '/test/',
|
||||
@filename)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="@filename"/>
|
||||
</ulink>
|
||||
</simpara>
|
||||
</entry>
|
||||
<entry>
|
||||
<simpara>
|
||||
<xsl:value-of select="substring-before(local-name(.), '-test')"/>
|
||||
</simpara>
|
||||
</entry>
|
||||
<entry><xsl:apply-templates select="purpose/*"/></entry>
|
||||
<entry><xsl:apply-templates select="if-fails/*"/></entry>
|
||||
</row>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="snippet">
|
||||
<xsl:variable name="snippet-name" select="@name"/>
|
||||
<xsl:apply-templates select="//programlisting[@name=$snippet-name]"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
1098
src/documentation/xsl/type.xsl
Normal file
1098
src/documentation/xsl/type.xsl
Normal file
File diff suppressed because it is too large
Load Diff
18
src/documentation/xsl/utility.xsl
Normal file
18
src/documentation/xsl/utility.xsl
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY nbsp " ">
|
||||
]>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
<!-- Indent the current line-->
|
||||
<xsl:template name="indent">
|
||||
<xsl:param name="indentation"/>
|
||||
<xsl:if test="$indentation > 0">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="indent">
|
||||
<xsl:with-param name="indentation" select="$indentation - 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
55
src/documentation/xsl/xml/collect.xsl
Normal file
55
src/documentation/xsl/xml/collect.xsl
Normal file
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:output method="xml" version="1.0" indent="yes" standalone="yes" />
|
||||
|
||||
<xsl:param name="doxygen.xml.path">./</xsl:param>
|
||||
|
||||
<xsl:template match="/">
|
||||
<doxygen>
|
||||
<xsl:attribute name="version">
|
||||
<xsl:choose>
|
||||
<xsl:when test="doxygen">
|
||||
<xsl:value-of select="doxygen/attribute::version"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="doxygenindex/attribute::version"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
|
||||
<!-- Load all doxgen generated xml files -->
|
||||
<xsl:for-each select="doxygen/compound">
|
||||
<xsl:variable name="id">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@refid">
|
||||
<xsl:value-of select="@refid"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@id">
|
||||
<xsl:value-of select="@id"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:if test="$id">
|
||||
<xsl:copy-of select="document( concat($doxygen.xml.path, '/',
|
||||
$id, '.xml' ) )/doxygen/*" />
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="doxygenindex/compound">
|
||||
<xsl:variable name="id">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@refid">
|
||||
<xsl:value-of select="@refid"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@id">
|
||||
<xsl:value-of select="@id"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:if test="$id">
|
||||
<xsl:copy-of select="document( concat($doxygen.xml.path, '/',
|
||||
$id, '.xml' ) )/doxygen/*" />
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</doxygen>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
15
src/documentation/xsl/xml/combine.xslt
Normal file
15
src/documentation/xsl/xml/combine.xslt
Normal file
@ -0,0 +1,15 @@
|
||||
<!-- XSLT script to combine the generated output into a single file.
|
||||
If you have xsltproc you could use:
|
||||
xsltproc combine.xslt index.xml >all.xml
|
||||
-->
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:output method="xml" version="1.0" indent="yes" standalone="yes" />
|
||||
<xsl:template match="/">
|
||||
<doxygen version="{doxygenindex/@version}">
|
||||
<!-- Load all doxgen generated xml files -->
|
||||
<xsl:for-each select="doxygenindex/compound">
|
||||
<xsl:copy-of select="document( concat( @refid, '.xml' ) )/doxygen/*" />
|
||||
</xsl:for-each>
|
||||
</doxygen>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
773
src/documentation/xsl/xml/compound.xsd
Normal file
773
src/documentation/xsl/xml/compound.xsd
Normal file
@ -0,0 +1,773 @@
|
||||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:element name="doxygen" type="DoxygenType"/>
|
||||
|
||||
<!-- Complex types -->
|
||||
|
||||
<xsd:complexType name="DoxygenType">
|
||||
<xsd:sequence maxOccurs="unbounded">
|
||||
<xsd:element name="compounddef" type="compounddefType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="version" type="DoxVersionNumber" use="required" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="compounddefType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="compoundname" type="xsd:string"/>
|
||||
<xsd:element name="title" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="basecompoundref" type="compoundRefType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="derivedcompoundref" type="compoundRefType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="includes" type="incType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="includedby" type="incType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="incdepgraph" type="graphType" minOccurs="0" />
|
||||
<xsd:element name="invincdepgraph" type="graphType" minOccurs="0" />
|
||||
<xsd:element name="innerdir" type="refType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="innerfile" type="refType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="innerclass" type="refType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="innernamespace" type="refType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="innerpage" type="refType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="innergroup" type="refType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="templateparamlist" type="templateparamlistType" minOccurs="0" />
|
||||
<xsd:element name="sectiondef" type="sectiondefType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="briefdescription" type="descriptionType" minOccurs="0" />
|
||||
<xsd:element name="detaileddescription" type="descriptionType" minOccurs="0" />
|
||||
<xsd:element name="inheritancegraph" type="graphType" minOccurs="0" />
|
||||
<xsd:element name="collaborationgraph" type="graphType" minOccurs="0" />
|
||||
<xsd:element name="programlisting" type="listingType" minOccurs="0" />
|
||||
<xsd:element name="location" type="locationType" minOccurs="0" />
|
||||
<xsd:element name="listofallmembers" type="listofallmembersType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
<xsd:attribute name="kind" type="DoxCompoundKind" />
|
||||
<xsd:attribute name="prot" type="DoxProtectionKind" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="listofallmembersType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="member" type="memberRefType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="memberRefType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="scope" />
|
||||
<xsd:element name="name" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="refid" type="xsd:string" />
|
||||
<xsd:attribute name="prot" type="DoxProtectionKind" />
|
||||
<xsd:attribute name="virt" type="DoxVirtualKind" />
|
||||
<xsd:attribute name="ambiguityscope" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="compoundRefType" mixed="true">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="refid" type="xsd:string" use="optional" />
|
||||
<xsd:attribute name="prot" type="DoxProtectionKind" />
|
||||
<xsd:attribute name="virt" type="DoxVirtualKind" />
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="reimplementType" mixed="true">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="refid" type="xsd:string" />
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="incType" mixed="true">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="refid" type="xsd:string" />
|
||||
<xsd:attribute name="local" type="DoxBool" />
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="refType" mixed="true">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="refid" type="xsd:string" />
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="refTextType" mixed="true">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="refid" type="xsd:string" />
|
||||
<xsd:attribute name="kindref" type="DoxRefKind" />
|
||||
<xsd:attribute name="external" type="xsd:string" />
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="sectiondefType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="header" type="xsd:string" minOccurs="0" />
|
||||
<xsd:element name="description" type="descriptionType" minOccurs="0" />
|
||||
<xsd:element name="memberdef" type="memberdefType" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="kind" type="DoxSectionKind" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="memberdefType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="templateparamlist" type="templateparamlistType" minOccurs="0" />
|
||||
<xsd:element name="type" type="linkedTextType" minOccurs="0" />
|
||||
<xsd:element name="definition" minOccurs="0" />
|
||||
<xsd:element name="argsstring" minOccurs="0" />
|
||||
<xsd:element name="name" />
|
||||
<xsd:element name="read" minOccurs="0" />
|
||||
<xsd:element name="write" minOccurs="0" />
|
||||
<xsd:element name="reimplements" type="reimplementType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="reimplementedby" type="reimplementType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="param" type="paramType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="enumvalue" type="enumvalueType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="initializer" type="linkedTextType" minOccurs="0" />
|
||||
<xsd:element name="exceptions" type="linkedTextType" minOccurs="0" />
|
||||
<xsd:element name="briefdescription" type="descriptionType" minOccurs="0" />
|
||||
<xsd:element name="detaileddescription" type="descriptionType" minOccurs="0" />
|
||||
<xsd:element name="inbodydescription" type="descriptionType" minOccurs="0" />
|
||||
<xsd:element name="location" type="locationType" />
|
||||
<xsd:element name="references" type="referenceType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="referencedby" type="referenceType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="kind" type="DoxMemberKind" />
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
<xsd:attribute name="prot" type="DoxProtectionKind" />
|
||||
<xsd:attribute name="static" type="DoxBool" />
|
||||
<xsd:attribute name="const" type="DoxBool" />
|
||||
<xsd:attribute name="explicit" type="DoxBool" />
|
||||
<xsd:attribute name="inline" type="DoxBool" />
|
||||
<xsd:attribute name="virt" type="DoxVirtualKind" />
|
||||
<xsd:attribute name="volatile" type="DoxBool" />
|
||||
<xsd:attribute name="mutable" type="DoxBool" />
|
||||
<xsd:attribute name="readable" type="DoxBool" use="optional"/>
|
||||
<xsd:attribute name="writable" type="DoxBool" use="optional"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="descriptionType" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="sect1" type="docSect1Type" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="internal" type="docInternalType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="enumvalueType" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="name" />
|
||||
<xsd:element name="initializer" type="linkedTextType" minOccurs="0" />
|
||||
<xsd:element name="briefdescription" type="descriptionType" minOccurs="0" />
|
||||
<xsd:element name="detaileddescription" type="descriptionType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
<xsd:attribute name="prot" type="DoxProtectionKind" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="templateparamlistType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="param" type="paramType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="paramType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="type" type="linkedTextType" minOccurs="0" />
|
||||
<xsd:element name="declname" minOccurs="0" />
|
||||
<xsd:element name="defname" minOccurs="0" />
|
||||
<xsd:element name="array" minOccurs="0" />
|
||||
<xsd:element name="defval" type="linkedTextType" minOccurs="0" />
|
||||
<xsd:element name="briefdescription" type="descriptionType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="linkedTextType" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="ref" type="refTextType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="graphType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="node" type="nodeType" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="nodeType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="label" />
|
||||
<xsd:element name="link" type="linkType" minOccurs="0" />
|
||||
<xsd:element name="childnode" type="childnodeType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="childnodeType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="edgelabel" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="refid" type="xsd:string" />
|
||||
<xsd:attribute name="relation" type="DoxGraphRelation" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="linkType">
|
||||
<xsd:attribute name="refid" type="xsd:string" />
|
||||
<xsd:attribute name="external" type="xsd:string" use="optional"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="listingType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="codeline" type="codelineType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="codelineType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="highlight" type="highlightType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="lineno" type="xsd:integer" />
|
||||
<xsd:attribute name="refid" type="xsd:string" />
|
||||
<xsd:attribute name="refkind" type="DoxRefKind" />
|
||||
<xsd:attribute name="external" type="DoxBool" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="highlightType" mixed="true">
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="sp" />
|
||||
<xsd:element name="ref" type="refTextType" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="class" type="DoxHighlightClass" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="referenceType" mixed="true">
|
||||
<xsd:attribute name="refid" type="xsd:string" />
|
||||
<xsd:attribute name="compoundref" type="xsd:string" use="optional" />
|
||||
<xsd:attribute name="startline" type="xsd:integer" />
|
||||
<xsd:attribute name="endline" type="xsd:integer" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="locationType">
|
||||
<xsd:attribute name="file" type="xsd:string" />
|
||||
<xsd:attribute name="line" type="xsd:integer" />
|
||||
<xsd:attribute name="bodyfile" type="xsd:string" />
|
||||
<xsd:attribute name="bodystart" type="xsd:integer" />
|
||||
<xsd:attribute name="bodyend" type="xsd:integer" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docSect1Type" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="title" type="xsd:string" />
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="sect2" type="docSect2Type" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="internal" type="docInternalS1Type" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docSect2Type" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="title" type="xsd:string" />
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="sect3" type="docSect3Type" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="internal" type="docInternalS2Type" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docSect3Type" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="title" type="xsd:string" />
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="sect4" type="docSect4Type" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="internal" type="docInternalS3Type" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docSect4Type" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="title" type="xsd:string" />
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="internal" type="docInternalS4Type" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docInternalType" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="sect1" type="docSect1Type" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docInternalS1Type" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="sect2" type="docSect2Type" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docInternalS2Type" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="sect3" type="docSect3Type" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docInternalS3Type" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="sect3" type="docSect4Type" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docInternalS4Type" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:group name="docTitleCmdGroup">
|
||||
<xsd:choice>
|
||||
<xsd:element name="ulink" type="docURLLink" />
|
||||
<xsd:element name="bold" type="docMarkupType" />
|
||||
<xsd:element name="emphasis" type="docMarkupType" />
|
||||
<xsd:element name="computeroutput" type="docMarkupType" />
|
||||
<xsd:element name="subscript" type="docMarkupType" />
|
||||
<xsd:element name="superscript" type="docMarkupType" />
|
||||
<xsd:element name="center" type="docMarkupType" />
|
||||
<xsd:element name="small" type="docMarkupType" />
|
||||
<xsd:element name="htmlonly" type="xsd:string" />
|
||||
<xsd:element name="latexonly" type="xsd:string" />
|
||||
<xsd:element name="dot" type="xsd:string" />
|
||||
<xsd:element name="anchor" type="docAnchorType" />
|
||||
<xsd:element name="formula" type="docFormulaType" />
|
||||
<xsd:element name="ref" type="docRefTextType" />
|
||||
<xsd:element name="copy" type="docEmptyType" />
|
||||
<xsd:element name="trademark" type="docEmptyType" />
|
||||
<xsd:element name="registered" type="docEmptyType" />
|
||||
<xsd:element name="umlaut" type="docCharType" />
|
||||
<xsd:element name="acute" type="docCharType" />
|
||||
<xsd:element name="grave" type="docCharType" />
|
||||
<xsd:element name="circ" type="docCharType" />
|
||||
<xsd:element name="slash" type="docCharType" />
|
||||
<xsd:element name="tilde" type="docCharType" />
|
||||
<xsd:element name="cedil" type="docCharType" />
|
||||
<xsd:element name="ring" type="docCharType" />
|
||||
<xsd:element name="szlig" type="docEmptyType" />
|
||||
<xsd:element name="nonbreakablespace" type="docEmptyType" />
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
|
||||
<xsd:complexType name="docTitleType" mixed="true">
|
||||
<xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:group name="docCmdGroup">
|
||||
<xsd:choice>
|
||||
<xsd:group ref="docTitleCmdGroup"/>
|
||||
<xsd:element name="linebreak" type="docEmptyType" />
|
||||
<xsd:element name="hruler" type="docEmptyType" />
|
||||
<xsd:element name="preformatted" type="docMarkupType" />
|
||||
<xsd:element name="programlisting" type="listingType" />
|
||||
<xsd:element name="verbatim" type="xsd:string" />
|
||||
<xsd:element name="indexentry" type="docIndexEntryType" />
|
||||
<xsd:element name="orderedlist" type="docListType" />
|
||||
<xsd:element name="itemizedlist" type="docListType" />
|
||||
<xsd:element name="simplesect" type="docSimpleSectType" />
|
||||
<xsd:element name="title" type="docTitleType" />
|
||||
<xsd:element name="variablelist" type="docVariableListType" />
|
||||
<xsd:element name="table" type="docTableType" />
|
||||
<xsd:element name="heading" type="docHeadingType" />
|
||||
<xsd:element name="image" type="docImageType" />
|
||||
<xsd:element name="dotfile" type="docDotFileType" />
|
||||
<xsd:element name="toclist" type="docTocListType" />
|
||||
<xsd:element name="language" type="docLanguageType" />
|
||||
<xsd:element name="parameterlist" type="docParamListType" />
|
||||
<xsd:element name="xrefsect" type="docXRefSectType" />
|
||||
<xsd:element name="copydoc" type="docCopyType" />
|
||||
</xsd:choice>
|
||||
</xsd:group>
|
||||
|
||||
<xsd:complexType name="docParaType" mixed="true">
|
||||
<xsd:group ref="docCmdGroup" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docMarkupType" mixed="true">
|
||||
<xsd:group ref="docCmdGroup" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docURLLink" mixed="true">
|
||||
<xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:attribute name="url" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docAnchorType" mixed="true">
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docFormulaType" mixed="true">
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docIndexEntryType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="primaryie" type="xsd:string" />
|
||||
<xsd:element name="secondaryie" type="xsd:string" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="listitem" type="docListItemType" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docListItemType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docSimpleSectType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="title" type="docTitleType" minOccurs="0" />
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="kind" type="DoxSimpleSectKind" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docVarListEntryType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="term" type="docTitleType" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:group name="docVariableListGroup">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="varlistentry" type="docVarListEntryType" />
|
||||
<xsd:element name="listitem" type="docListItemType" />
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
|
||||
<xsd:complexType name="docVariableListType">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="docVariableListGroup" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docRefTextType" mixed="true">
|
||||
<xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:attribute name="refid" type="xsd:string" />
|
||||
<xsd:attribute name="kindref" type="DoxRefKind" />
|
||||
<xsd:attribute name="external" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docTableType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="row" type="docRowType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="caption" type="docCaptionType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="rows" type="xsd:integer" />
|
||||
<xsd:attribute name="cols" type="xsd:integer" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docRowType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="entry" type="docEntryType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docEntryType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="thead" type="DoxBool" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docCaptionType" mixed="true">
|
||||
<xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docHeadingType" mixed="true">
|
||||
<xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:attribute name="level" type="xsd:integer" /> <!-- todo: range 1-6 -->
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docImageType" mixed="true">
|
||||
<xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:attribute name="type" type="DoxImageKind" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="width" type="xsd:string" />
|
||||
<xsd:attribute name="height" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docDotFileType" mixed="true">
|
||||
<xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docTocItemType" mixed="true">
|
||||
<xsd:group ref="docTitleCmdGroup" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docTocListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="tocitem" type="docTocItemType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docLanguageType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="langid" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docParamListType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="parameteritem" type="docParamListItem" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="kind" type="DoxParamListKind" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docParamListItem">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="parameternamelist" type="docParamNameList" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="parameterdescription" type="descriptionType" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docParamNameList">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="parametername" type="docParamName" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docParamName" mixed="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="ref" type="refTextType" minOccurs="0" maxOccurs="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="direction" type="DoxParamDir" use="optional" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docXRefSectType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="xreftitle" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="xrefdescription" type="descriptionType" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docCopyType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="sect1" type="docSect1Type" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="internal" type="docInternalType" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="link" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docCharType">
|
||||
<xsd:attribute name="char" type="DoxCharRange"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="docEmptyType"/>
|
||||
|
||||
<!-- Simple types -->
|
||||
|
||||
<xsd:simpleType name="DoxBool">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="yes" />
|
||||
<xsd:enumeration value="no" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="DoxGraphRelation">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="include" />
|
||||
<xsd:enumeration value="usage" />
|
||||
<xsd:enumeration value="template-instance" />
|
||||
<xsd:enumeration value="public-inheritance" />
|
||||
<xsd:enumeration value="protected-inheritance" />
|
||||
<xsd:enumeration value="private-inheritance" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="DoxRefKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="compound" />
|
||||
<xsd:enumeration value="member" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="DoxMemberKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="define" />
|
||||
<xsd:enumeration value="property" />
|
||||
<xsd:enumeration value="event" />
|
||||
<xsd:enumeration value="variable" />
|
||||
<xsd:enumeration value="typedef" />
|
||||
<xsd:enumeration value="enum" />
|
||||
<xsd:enumeration value="function" />
|
||||
<xsd:enumeration value="signal" />
|
||||
<xsd:enumeration value="prototype" />
|
||||
<xsd:enumeration value="friend" />
|
||||
<xsd:enumeration value="dcop" />
|
||||
<xsd:enumeration value="slot" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="DoxProtectionKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="public" />
|
||||
<xsd:enumeration value="protected" />
|
||||
<xsd:enumeration value="private" />
|
||||
<xsd:enumeration value="package" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="DoxVirtualKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="non-virtual" />
|
||||
<xsd:enumeration value="virtual" />
|
||||
<xsd:enumeration value="pure-virtual" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="DoxCompoundKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="class" />
|
||||
<xsd:enumeration value="struct" />
|
||||
<xsd:enumeration value="union" />
|
||||
<xsd:enumeration value="interface" />
|
||||
<xsd:enumeration value="protocol" />
|
||||
<xsd:enumeration value="category" />
|
||||
<xsd:enumeration value="exception" />
|
||||
<xsd:enumeration value="file" />
|
||||
<xsd:enumeration value="namespace" />
|
||||
<xsd:enumeration value="group" />
|
||||
<xsd:enumeration value="page" />
|
||||
<xsd:enumeration value="example" />
|
||||
<xsd:enumeration value="dir" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="DoxSectionKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="user-defined" />
|
||||
<xsd:enumeration value="public-type" />
|
||||
<xsd:enumeration value="public-func" />
|
||||
<xsd:enumeration value="public-attrib" />
|
||||
<xsd:enumeration value="public-slot" />
|
||||
<xsd:enumeration value="signal" />
|
||||
<xsd:enumeration value="dcop-func" />
|
||||
<xsd:enumeration value="property" />
|
||||
<xsd:enumeration value="event" />
|
||||
<xsd:enumeration value="public-static-func" />
|
||||
<xsd:enumeration value="public-static-attrib" />
|
||||
<xsd:enumeration value="protected-type" />
|
||||
<xsd:enumeration value="protected-func" />
|
||||
<xsd:enumeration value="protected-attrib" />
|
||||
<xsd:enumeration value="protected-slot" />
|
||||
<xsd:enumeration value="protected-static-func" />
|
||||
<xsd:enumeration value="protected-static-attrib" />
|
||||
<xsd:enumeration value="package-type" />
|
||||
<xsd:enumeration value="package-func" />
|
||||
<xsd:enumeration value="package-attrib" />
|
||||
<xsd:enumeration value="package-static-func" />
|
||||
<xsd:enumeration value="package-static-attrib" />
|
||||
<xsd:enumeration value="private-type" />
|
||||
<xsd:enumeration value="private-func" />
|
||||
<xsd:enumeration value="private-attrib" />
|
||||
<xsd:enumeration value="private-slot" />
|
||||
<xsd:enumeration value="private-static-func" />
|
||||
<xsd:enumeration value="private-static-attrib" />
|
||||
<xsd:enumeration value="friend" />
|
||||
<xsd:enumeration value="related" />
|
||||
<xsd:enumeration value="define" />
|
||||
<xsd:enumeration value="prototype" />
|
||||
<xsd:enumeration value="typedef" />
|
||||
<xsd:enumeration value="enum" />
|
||||
<xsd:enumeration value="func" />
|
||||
<xsd:enumeration value="var" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="DoxHighlightClass">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="comment" />
|
||||
<xsd:enumeration value="normal" />
|
||||
<xsd:enumeration value="preprocessor" />
|
||||
<xsd:enumeration value="keyword" />
|
||||
<xsd:enumeration value="keywordtype" />
|
||||
<xsd:enumeration value="keywordflow" />
|
||||
<xsd:enumeration value="stringliteral" />
|
||||
<xsd:enumeration value="charliteral" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="DoxSimpleSectKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="see" />
|
||||
<xsd:enumeration value="return" />
|
||||
<xsd:enumeration value="author" />
|
||||
<xsd:enumeration value="authors" />
|
||||
<xsd:enumeration value="version" />
|
||||
<xsd:enumeration value="since" />
|
||||
<xsd:enumeration value="date" />
|
||||
<xsd:enumeration value="note" />
|
||||
<xsd:enumeration value="warning" />
|
||||
<xsd:enumeration value="pre" />
|
||||
<xsd:enumeration value="post" />
|
||||
<xsd:enumeration value="invariant" />
|
||||
<xsd:enumeration value="remark" />
|
||||
<xsd:enumeration value="attention" />
|
||||
<xsd:enumeration value="par" />
|
||||
<xsd:enumeration value="rcs" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="DoxVersionNumber">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:pattern value="\d+\.\d+.*" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="DoxImageKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="html" />
|
||||
<xsd:enumeration value="latex" />
|
||||
<xsd:enumeration value="rtf" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="DoxParamListKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="param" />
|
||||
<xsd:enumeration value="retval" />
|
||||
<xsd:enumeration value="exception" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="DoxCharRange">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:pattern value="[aeiouncAEIOUNC]" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="DoxParamDir">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="in"/>
|
||||
<xsd:enumeration value="out"/>
|
||||
<xsd:enumeration value="inout"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
</xsd:schema>
|
||||
|
1226
src/documentation/xsl/xml/doxygen2boostbook.xsl
Normal file
1226
src/documentation/xsl/xml/doxygen2boostbook.xsl
Normal file
File diff suppressed because it is too large
Load Diff
66
src/documentation/xsl/xml/index.xsd
Normal file
66
src/documentation/xsl/xml/index.xsd
Normal file
@ -0,0 +1,66 @@
|
||||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:element name="doxygenindex" type="DoxygenType"/>
|
||||
|
||||
<xsd:complexType name="DoxygenType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="compound" type="CompoundType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="version" type="xsd:string" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="CompoundType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="name" type="xsd:string"/>
|
||||
<xsd:element name="member" type="MemberType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="refid" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="kind" type="CompoundKind" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="MemberType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="name" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="refid" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="kind" type="MemberKind" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:simpleType name="CompoundKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="class"/>
|
||||
<xsd:enumeration value="struct"/>
|
||||
<xsd:enumeration value="union"/>
|
||||
<xsd:enumeration value="interface"/>
|
||||
<xsd:enumeration value="protocol"/>
|
||||
<xsd:enumeration value="category"/>
|
||||
<xsd:enumeration value="exception"/>
|
||||
<xsd:enumeration value="file"/>
|
||||
<xsd:enumeration value="namespace"/>
|
||||
<xsd:enumeration value="group"/>
|
||||
<xsd:enumeration value="page"/>
|
||||
<xsd:enumeration value="example"/>
|
||||
<xsd:enumeration value="dir"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="MemberKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="define"/>
|
||||
<xsd:enumeration value="property"/>
|
||||
<xsd:enumeration value="event"/>
|
||||
<xsd:enumeration value="variable"/>
|
||||
<xsd:enumeration value="typedef"/>
|
||||
<xsd:enumeration value="enum"/>
|
||||
<xsd:enumeration value="enumvalue"/>
|
||||
<xsd:enumeration value="function"/>
|
||||
<xsd:enumeration value="signal"/>
|
||||
<xsd:enumeration value="prototype"/>
|
||||
<xsd:enumeration value="friend"/>
|
||||
<xsd:enumeration value="dcop"/>
|
||||
<xsd:enumeration value="slot"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
</xsd:schema>
|
||||
|
Loading…
Reference in New Issue
Block a user