diff options
| author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-07-15 17:01:57 +0000 | 
|---|---|---|
| committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-07-15 17:01:57 +0000 | 
| commit | 197f1edfc13e6b3ce89af4ff9047feee75121455 (patch) | |
| tree | 19702adc0b5fc6cb89034a7b82fe519d14f21f31 /docs | |
| parent | cc78d73f343601e487c0d22cd31e1100b60c4b6d (diff) | |
docs: Fixed TOC links properly, got rid of pointer-based auto-generated ids
git-svn-id: http://pugixml.googlecode.com/svn/trunk@604 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/manual.qbk | 3 | ||||
| -rw-r--r-- | docs/manual.xsl | 32 | ||||
| -rw-r--r-- | docs/quickstart.qbk | 10 | 
3 files changed, 31 insertions, 14 deletions
diff --git a/docs/manual.qbk b/docs/manual.qbk index b234fee..17f6de1 100644 --- a/docs/manual.qbk +++ b/docs/manual.qbk @@ -12,6 +12,7 @@  [template file[name]'''<filename>'''[name]'''</filename>''']
  [template sref[name]'''<xref linkend="'''[name]'''" xrefstyle="select:title" />''']
  [template anchor[name]'''<anchor id="'''[name]'''" />'''[^[name]]]
 +[template ftnt[id text]'''<footnote id="'''[id]'''"><para>'''[text]'''</para></footnote>''']
  [section:overview Overview]
 @@ -138,7 +139,7 @@ The complete pugixml source consists of four files - two source files, [file pug  [section:embed Building pugixml as a part of another static library/executable]
 -The easiest way to build pugixml is to compile two source files, [file pugixml.cpp] and [file pugixpath.cpp], along with the existing library/executable. This process depends on the method of building your application; for example, if you're using Microsoft Visual Studio[footnote All trademarks used are properties of their respective owners.], Apple Xcode, Code::Blocks or any other IDE, just add [file pugixml.cpp] and [file pugixpath.cpp] to one of your projects.
 +The easiest way to build pugixml is to compile two source files, [file pugixml.cpp] and [file pugixpath.cpp], along with the existing library/executable. This process depends on the method of building your application; for example, if you're using Microsoft Visual Studio[ftnt trademarks All trademarks used are properties of their respective owners.], Apple Xcode, Code::Blocks or any other IDE, just add [file pugixml.cpp] and [file pugixpath.cpp] to one of your projects.
  If you're using Microsoft Visual Studio and the project has precompiled headers turned on, you'll see the following error messages:
 diff --git a/docs/manual.xsl b/docs/manual.xsl index 1875f6e..58d2d99 100644 --- a/docs/manual.xsl +++ b/docs/manual.xsl @@ -86,14 +86,32 @@  	</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:call-template name="make.toc">
 +			<xsl:with-param name="toc-context" select="." />
 +			<xsl:with-param name="toc.title.p" select="false()" />
 +			<xsl:with-param name="nodes" select="/book/section" />
 +		</xsl:call-template>
  	</xsl:template>
      <xsl:template name="book.titlepage" />
 -</xsl:stylesheet>  
 +	<xsl:template name="anchor">
 +		<xsl:param name="node" select="." />
 +		<xsl:param name="conditional" select="1" />
 +		<xsl:variable name="id">
 +			<xsl:call-template name="object.id">
 +				<xsl:with-param name="object" select="$node"/>
 +			</xsl:call-template>
 +		</xsl:variable>
 +		<xsl:choose>
 +			<xsl:when test="$node/@id or $node/@xml:id">
 +				<a name="{$id}"/>
 +			</xsl:when>
 +			<xsl:when test="$conditional = 0 and local-name($node) != 'bridgehead'">
 +				<xsl:message terminate="yes">
 +				  <xsl:text>ERROR: Autogenerated id detected for element </xsl:text><xsl:value-of select="local-name($node)" />
 +				</xsl:message>
 +			</xsl:when>
 +		</xsl:choose>
 +	</xsl:template>
 +</xsl:stylesheet>  
 diff --git a/docs/quickstart.qbk b/docs/quickstart.qbk index bedaa15..512db4a 100644 --- a/docs/quickstart.qbk +++ b/docs/quickstart.qbk @@ -7,11 +7,9 @@      [license Distributed under the MIT License]
  ]
 -[template file[name] '''<filename>'''[name]'''</filename>''']
 -[template sbr[] '''<sbr/>''']
 -[template lbr[] '''<sbr/><sbr/>'''] [/ for empty lines in lists]
 -[template sref[name] '''<xref linkend="quickstart.main.'''[name]'''" xrefstyle="select:title" />''']
 -[template anchor[name] '''<anchor id="'''[name]'''" />'''[^[name]]]
 +[template file[name]'''<filename>'''[name]'''</filename>''']
 +[template sref[name]'''<xref linkend="quickstart.main.'''[name]'''" xrefstyle="select:title" />''']
 +[template ftnt[id text]'''<footnote id="'''[id]'''"><para>'''[text]'''</para></footnote>''']
  [section:main pugixml 0.9 quick start guide]
 @@ -40,7 +38,7 @@ The distribution contains library source, documentation (the guide you're readin  The complete pugixml source consists of four files - two source files, [file pugixml.cpp] and [file pugixpath.cpp], and two header files, [file pugixml.hpp] and [file pugiconfig.hpp]. [file pugixml.hpp] is the primary header which you need to include in order to use pugixml classes/functions. The rest of this guide assumes that [file pugixml.hpp] is either in the current directory or in one of include directories of your projects, so that `#include "pugixml.hpp"` can find the header; however you can also use relative path (i.e. `#include "../libs/pugixml/src/pugixml.hpp"`) or include directory-relative path (i.e. `#include <xml/thirdparty/pugixml/src/pugixml.hpp>`).
 -The easiest way to build pugixml is to compile two source files, [file pugixml.cpp] and [file pugixpath.cpp], along with the existing library/executable. This process depends on the method of building your application; for example, if you're using Microsoft Visual Studio[footnote All trademarks used are properties of their respective owners.], Apple Xcode, Code::Blocks or any other IDE, just add [file pugixml.cpp] and [file pugixpath.cpp] to one of your projects. There are other building methods available, including building pugixml as a standalone static/shared library; read the manual for further information.
 +The easiest way to build pugixml is to compile two source files, [file pugixml.cpp] and [file pugixpath.cpp], along with the existing library/executable. This process depends on the method of building your application; for example, if you're using Microsoft Visual Studio[ftnt trademarks All trademarks used are properties of their respective owners.], Apple Xcode, Code::Blocks or any other IDE, just add [file pugixml.cpp] and [file pugixpath.cpp] to one of your projects. There are other building methods available, including building pugixml as a standalone static/shared library; read the manual for further information.
  [endsect] [/install]
  | 
