diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/manual.qbk | 11 | ||||
-rw-r--r-- | docs/manual.xsl | 95 |
2 files changed, 104 insertions, 2 deletions
diff --git a/docs/manual.qbk b/docs/manual.qbk index f110503..5b7b5f9 100644 --- a/docs/manual.qbk +++ b/docs/manual.qbk @@ -1,4 +1,4 @@ -[article pugixml
+[book pugixml
[quickbook 1.5]
[version 0.9]
@@ -23,7 +23,7 @@ pugixml enables very fast, convenient and memory-efficient XML document processi This is the complete user manual for pugixml, which describes all features of the library in detail. If you want to start writing code as quickly as possible, you are advised to [@quickstart.html read the quick start guide first].
-[note No documentation is perfect, neither is this one. If you encounter a description that is unclear, please file an issue as described in [sref manual.overview.feedback]. Also if you can spare the time for a full proof-reading, including spelling and grammar, that would be great! Please send me an e-mail; as a token of appreciation, your name will be put into the corresponding section of this documentation.]
+[note No documentation is perfect, neither is this one. If you encounter a description that is unclear, please file an issue as described in [sref manual.overview.feedback]. Also if you can spare the time for a full proof-reading, including spelling and grammar, that would be great! Please [link email send me an e-mail]; as a token of appreciation, your name will be included into the [link manual.overview.thanks corresponding section] of this documentation.]
[endsect] [/introduction]
@@ -1996,3 +1996,10 @@ Functions: * [link set_memory_management_functions]
[endsect] [/apiref]
+
+[section:toc Table of contents]
+
+toc-placeholder
+
+[endsect] [/toc]
+
diff --git a/docs/manual.xsl b/docs/manual.xsl new file mode 100644 index 0000000..60e99b2 --- /dev/null +++ b/docs/manual.xsl @@ -0,0 +1,95 @@ +<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:template name="navbar.section">
+ <xsl:param name="name" select="/foo" />
+ <xsl:param name="target" select="id($name)" />
+ <xsl:param name="text" select="normalize-space($target/title)" />
+
+ <xsl:choose>
+ <xsl:when test="@id != $name">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$target"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:value-of select="$text" />
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="navbar.contents">
+ <xsl:value-of select="/*/title" /> user manual |
+ <xsl:call-template name="navbar.section"><xsl:with-param name="name" select="'manual.overview'" /></xsl:call-template> |
+ <xsl:call-template name="navbar.section"><xsl:with-param name="name" select="'manual.install'" /></xsl:call-template> |
+ Document:
+ <xsl:call-template name="navbar.section"><xsl:with-param name="name" select="'manual.dom'" /><xsl:with-param name="text" select="'Object model'" /></xsl:call-template>
+ <xsl:text disable-output-escaping="yes"> &middot; </xsl:text>
+ <xsl:call-template name="navbar.section"><xsl:with-param name="name" select="'manual.loading'" /><xsl:with-param name="text" select="'Loading'" /></xsl:call-template>
+ <xsl:text disable-output-escaping="yes"> &middot; </xsl:text>
+ <xsl:call-template name="navbar.section"><xsl:with-param name="name" select="'manual.access'" /><xsl:with-param name="text" select="'Accessing'" /></xsl:call-template>
+ <xsl:text disable-output-escaping="yes"> &middot; </xsl:text>
+ <xsl:call-template name="navbar.section"><xsl:with-param name="name" select="'manual.modify'" /><xsl:with-param name="text" select="'Modifying'" /></xsl:call-template>
+ <xsl:text disable-output-escaping="yes"> &middot; </xsl:text>
+ <xsl:call-template name="navbar.section"><xsl:with-param name="name" select="'manual.saving'" /><xsl:with-param name="text" select="'Saving'" /></xsl:call-template> |
+ <xsl:call-template name="navbar.section"><xsl:with-param name="name" select="'manual.xpath'" /></xsl:call-template> |
+ <xsl:call-template name="navbar.section"><xsl:with-param name="name" select="'manual.apiref'" /></xsl:call-template> |
+ <xsl:call-template name="navbar.section"><xsl:with-param name="name" select="'manual.toc'" /></xsl:call-template>
+ </xsl:template>
+
+ <xsl:template name="header.navigation">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:param name="nav.context"/>
+
+ <table width="100%"><tr>
+ <td>
+ <xsl:call-template name="navbar.contents" />
+ </td>
+ <td width="*" align="right">
+ <xsl:call-template name="navbar.spirit">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="nav.context" select="$nav.context"/>
+ </xsl:call-template>
+ </td>
+
+ </tr></table>
+ <hr/>
+ </xsl:template>
+
+ <xsl:template name="footer.navigation">
+ <xsl:param name="prev" select="/foo"/>
+ <xsl:param name="next" select="/foo"/>
+ <xsl:param name="nav.context"/>
+
+ <hr/>
+ <table width="100%"><tr>
+ <td>
+ <xsl:call-template name="navbar.contents" />
+ </td>
+ <td width="*" align="right">
+ <xsl:call-template name="navbar.spirit">
+ <xsl:with-param name="prev" select="$prev"/>
+ <xsl:with-param name="next" select="$next"/>
+ <xsl:with-param name="nav.context" select="$nav.context"/>
+ </xsl:call-template>
+ </td>
+
+ </tr></table>
+ </xsl:template>
+
+ <xsl:template match="section[@id='manual.toc']/para[normalize-space(text())='toc-placeholder']">
+ <!-- trick to switch context node to root element -->
+ <xsl:for-each select="/*">
+ <xsl:call-template name="component.toc">
+ <xsl:with-param name="toc.title.p" select="false()" />
+ </xsl:call-template>
+ </xsl:for-each>
+ </xsl:template>
+</xsl:stylesheet>
+
|