Post-release changes:
- removed a reference to cachegrind dot org from mc-tech-docs.xml
- in an effort to simplify future borked links, replaced all valgrind 
  website urls with entities so now we just have to change one string.
- new stylesheet to create the docs to 'fit' into the website
- added build rules 'make website-docs' + make download-docs
  to /docs/Makefile.am




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5239 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/docs/xml/FAQ.xml b/docs/xml/FAQ.xml
index dd486a6..7c275ea 100644
--- a/docs/xml/FAQ.xml
+++ b/docs/xml/FAQ.xml
@@ -3,6 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
 [ <!ENTITY % vg-entities SYSTEM "vg-entities.xml"> %vg-entities; ]>
 
+
 <book id="FAQ" xreflabel="Valgrind FAQ">
 
 <bookinfo>
@@ -18,7 +19,7 @@
 </bookinfo>
 
 
-<article>
+<article id="faq">
 <title>Valgrind Frequently Asked Questions</title>
 
 
@@ -523,11 +524,9 @@
   <para>If you think an answer is incomplete or inaccurate, please
   e-mail <ulink url="mailto:&vg-vemail;">&vg-vemail;</ulink>.</para>
 
-  <para>Read the appropriate section(s) of the 
-  <ulink url="http://www.valgrind.org/docs/manual.html">Valgrind 
-  Documentation</ulink>.</para>
+  <para>Read the appropriate section(s) of the <xref linkend="set-index"/>.</para>
 
-  <para>Read the <ulink url="http://www.valgrind.org/docs/dist.html">Distribution Documents</ulink>.</para>
+  <para>Read the <xref linkend="dist"/>.</para>
 
   <para><ulink url="http://search.gmane.org">Search</ulink> the 
   <ulink url="http://news.gmane.org/gmane.comp.debugging.valgrind">valgrind-users</ulink> mailing list archives, using the group name 
diff --git a/docs/xml/dist-docs.xml b/docs/xml/dist-docs.xml
index 3e99c39..85302a8 100644
--- a/docs/xml/dist-docs.xml
+++ b/docs/xml/dist-docs.xml
@@ -3,6 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
 [ <!ENTITY % vg-entities SYSTEM "vg-entities.xml"> %vg-entities; ]>
 
+
 <book id="dist" xreflabel="Distribution Documents">
 
   <bookinfo>
@@ -17,8 +18,8 @@
   </author>
   </bookinfo>
 
-  <!-- Nb: because these are all text files, we have to wrap them in suitable
-       XML.  Hence the chapter/title stuff -->
+  <!-- Nb: because these are all text files, we have to wrap -->
+  <!-- them in suitable XML.  Hence the chapter/title stuff  -->
 
   <chapter id="dist.acknowledge" xreflabel="Acknowledgements">
     <title>ACKNOWLEDGEMENTS</title>
diff --git a/docs/xml/index.xml b/docs/xml/index.xml
index 1a240df..0feec65 100644
--- a/docs/xml/index.xml
+++ b/docs/xml/index.xml
@@ -1,12 +1,10 @@
 <?xml version="1.0"?> <!-- -*- sgml -*- -->
 <!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
-[
- <!-- various strings, dates etc. common to all docs -->
- <!ENTITY % vg-entities SYSTEM "vg-entities.xml"> %vg-entities;
-]>
+[ <!ENTITY % vg-entities SYSTEM "vg-entities.xml"> %vg-entities; ]>
 
-<set id="index" lang="en">
+
+<set lang="en" id="set-index" xreflabel="Valgrind Documentation">
 
   <setinfo>
     <title>Valgrind Documentation</title>
@@ -19,13 +17,12 @@
     </copyright>
 
     <legalnotice>
-      <para>Permission is granted to copy, distribute and/or
-      modify this document under the terms of the GNU Free
-      Documentation License, Version 1.2 or any later version
-      published by the Free Software Foundation; with no
-      Invariant Sections, with no Front-Cover Texts, and with no
-      Back-Cover Texts.  A copy of the license is included in the
-      section entitled <xref linkend="license.gfdl"/>.</para>
+      <para>Permission is granted to copy, distribute and/or 
+      modify this document under the terms of the GNU Free Documentation License,
+      Version 1.2 or any later version published by the Free Software Foundation; 
+      with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+      Texts.  A copy of the license is included in the section entitled 
+      <xref linkend="license.gfdl"/>.</para>
     </legalnotice>
 
   </setinfo>
diff --git a/docs/xml/licenses.xml b/docs/xml/licenses.xml
index 2b31e9a..e9c4ef6 100644
--- a/docs/xml/licenses.xml
+++ b/docs/xml/licenses.xml
@@ -11,8 +11,7 @@
   <chapter id="license.gpl" xreflabel=" The GNU General Public License">
     <title>The GNU General Public License</title>
       <literallayout>
-      <xi:include href="../../COPYING" 
-          parse="text"  
+      <xi:include href="../../COPYING" parse="text"  
           xmlns:xi="http://www.w3.org/2001/XInclude" />
       </literallayout>
   </chapter>
@@ -20,8 +19,7 @@
   <chapter id="license.gfdl" xreflabel="The GNU Free Documentation License">
     <title>The GNU Free Documentation License</title>
       <literallayout>
-      <xi:include href="../../COPYING.DOCS" 
-          parse="text"  
+      <xi:include href="../../COPYING.DOCS" parse="text"  
           xmlns:xi="http://www.w3.org/2001/XInclude" />
       </literallayout>
   </chapter>
diff --git a/docs/xml/manual-core.xml b/docs/xml/manual-core.xml
index 64d28f7..4585812 100644
--- a/docs/xml/manual-core.xml
+++ b/docs/xml/manual-core.xml
@@ -1,6 +1,8 @@
 <?xml version="1.0"?> <!-- -*- sgml -*- -->
 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[ <!ENTITY % vg-entities SYSTEM "vg-entities.xml"> %vg-entities; ]>
+
 
 <chapter id="manual-core" xreflabel="Valgrind's core">
 <title>Using and understanding the Valgrind core</title>
@@ -1558,7 +1560,7 @@
 <sect1 id="manual-core.problems" xreflabel="If You Have Problems">
 <title>If You Have Problems</title>
 
-<para>Contact us at <ulink url="http://www.valgrind.org">http://www.valgrind.org</ulink>.</para>
+<para>Contact us at <ulink url="&vg-url;">&vg-url;</ulink>.</para>
 
 <para>See <xref linkend="manual-core.limits"/> for the known
 limitations of Valgrind, and for a list of programs which are
@@ -1577,9 +1579,8 @@
 effect before dying in this way.  This is a known problem which
 we should fix.</para>
 
-<para>Read the 
-<ulink url="http://www.valgrind.org/docs/FAQ/">FAQ</ulink> for
-more advice about common problems, crashes, etc.</para>
+<para>Read the <xref linkend="FAQ"/> for more advice about common problems, 
+crashes, etc.</para>
 
 </sect1>
 
diff --git a/docs/xml/manual-intro.xml b/docs/xml/manual-intro.xml
index e7c716c..c7080d0 100644
--- a/docs/xml/manual-intro.xml
+++ b/docs/xml/manual-intro.xml
@@ -114,7 +114,7 @@
 
     <para>Cachegrind is nicely complemented by Josef
     Weidendorfer's amazing KCacheGrind visualisation tool 
-    (<ulink url="http://kcachegrind.sourceforge.net">http://kcachegrind.sourceforge.net</ulink>),
+    (<ulink url="http://kcachegrind.sourceforge.net/cgi-bin/show.cgi/KcacheGrindIndex">http://kcachegrind.sourceforge.net</ulink>),
     a KDE application which presents these profiling results in a
     graphical and easier-to-understand form.</para>
    </listitem>
diff --git a/docs/xml/manual.xml b/docs/xml/manual.xml
index 39fc83c..aa2f8c1 100644
--- a/docs/xml/manual.xml
+++ b/docs/xml/manual.xml
@@ -29,7 +29,7 @@
   <xi:include href="../../cachegrind/docs/cg-manual.xml" parse="xml"  
       xmlns:xi="http://www.w3.org/2001/XInclude" />
   <xi:include href="../../massif/docs/ms-manual.xml" parse="xml"  
-       xmlns:xi="http://www.w3.org/2001/XInclude" />
+      xmlns:xi="http://www.w3.org/2001/XInclude" />
   <xi:include href="../../helgrind/docs/hg-manual.xml" parse="xml"  
       xmlns:xi="http://www.w3.org/2001/XInclude" />
   <xi:include href="../../none/docs/nl-manual.xml" parse="xml"  
diff --git a/docs/xml/quick-start-guide.xml b/docs/xml/quick-start-guide.xml
index 6616cd0..d4daf27 100644
--- a/docs/xml/quick-start-guide.xml
+++ b/docs/xml/quick-start-guide.xml
@@ -3,7 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
 [ <!ENTITY % vg-entities SYSTEM "vg-entities.xml"> %vg-entities; ]>
 
-<book id="quick-start" xreflabel="Valgrind Quick Start Guide">
+<book id="QuickStart" xreflabel="Valgrind Quick Start Guide">
 
 <bookinfo>
   <title>The Valgrind Quick Start Guide</title>
@@ -18,7 +18,7 @@
 </bookinfo>
 
 
-<article>
+<article id="quick-start">
 <title>The Valgrind Quick Start Guide</title>
 
 
diff --git a/docs/xml/vg-entities.xml b/docs/xml/vg-entities.xml
index d072a46..8448053 100644
--- a/docs/xml/vg-entities.xml
+++ b/docs/xml/vg-entities.xml
@@ -1,13 +1,18 @@
 <!-- misc. strings -->
-<!ENTITY vg-url      "http://www.valgrind.org">
-<!ENTITY vg-jemail   "julian@valgrind.org">
-<!ENTITY vg-vemail   "valgrind@valgrind.org">
-<!ENTITY vg-lifespan "2000-2005">
+<!ENTITY vg-url        "http://www.valgrind.org/">
+<!ENTITY vg-jemail     "julian@valgrind.org">
+<!ENTITY vg-vemail     "valgrind@valgrind.org">
+<!ENTITY vg-lifespan   "2000-2005">
 <!ENTITY vg-users-list "http://lists.sourceforge.net/lists/listinfo/valgrind-users">
 <!ENTITY vg-developers "http://www.valgrind.org/info/developers.html">
+<!ENTITY vg-svn-repo   "http://www.valgrind.org/downloads/repository.html">
+
 
 <!-- valgrind release + version stuff -->
 <!ENTITY rel-type    "Release">
 <!ENTITY rel-version "3.1.0">
 <!ENTITY rel-date    "November 25 2005">
 
+<!-- valgrind website links used in lots of places in the docs  -->
+<!-- kept in here 'cos everytime the website gets changed, it`s -->
+<!-- a real pain tracking the links down in the docs            -->
diff --git a/docs/xml/writing-tools.xml b/docs/xml/writing-tools.xml
index ee6d335..22318d9 100644
--- a/docs/xml/writing-tools.xml
+++ b/docs/xml/writing-tools.xml
@@ -1,8 +1,7 @@
 <?xml version="1.0"?> <!-- -*- sgml -*- -->
 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"[
-<!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities;
-]>
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[ <!ENTITY % vg-entities SYSTEM "vg-entities.xml"> %vg-entities; ]>
 
 <chapter id="writing-tools" xreflabel="Writing a New Valgrind Tool">
 <title>Writing a New Valgrind Tool</title>
@@ -302,9 +301,8 @@
 <para>To write your own tool, you'll need the Valgrind source code.
 A normal source distribution should do, although you might want to
 check out the latest code from the Subversion repository.  See the
-information about how to do so at
-<ulink url="http://www.valgrind.org/downloads/repository.html">the
-Valgrind website</ulink>.</para>
+information about how to do so at 
+<ulink url="&vg-svn-repo;">the Valgrind website</ulink>.</para>
 
 </sect2>
 
@@ -761,7 +759,7 @@
 <para>If you aren't confident using XML, or you have problems
 with the toolchain, then write your documentation in text format,
 email it to
-<computeroutput>valgrind@valgrind.org</computeroutput>, and
+<computeroutput>&vg-vemail;</computeroutput>, and
 someone will convert it to XML for you.  Otherwise, follow these
 steps (using <computeroutput>foobar</computeroutput> as the
 example tool name again):</para>
@@ -862,7 +860,7 @@
 ]]></programlisting>
 
   <para>Send a patch for this to
-  <computeroutput>valgrind@valgrind.org</computeroutput>.</para>
+  <computeroutput>&vg-vemail;</computeroutput>.</para>
 
   <para>To achieve true anality, try for a full doc-set build:</para>
 <screen><![CDATA[