bibliography.collection.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <refentry xmlns="http://docbook.org/ns/docbook"
  2. xmlns:xlink="http://www.w3.org/1999/xlink"
  3. xmlns:xi="http://www.w3.org/2001/XInclude"
  4. xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
  5. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  6. version="5.0" xml:id="bibliography.collection">
  7. <refmeta>
  8. <refentrytitle>bibliography.collection</refentrytitle>
  9. <refmiscinfo class="other" otherclass="datatype">string</refmiscinfo>
  10. </refmeta>
  11. <refnamediv>
  12. <refname>bibliography.collection</refname>
  13. <refpurpose>Name of the bibliography collection file</refpurpose>
  14. </refnamediv>
  15. <refsynopsisdiv>
  16. <src:fragment xml:id="bibliography.collection.frag">
  17. <xsl:param name="bibliography.collection">http://docbook.sourceforge.net/release/bibliography/bibliography.xml</xsl:param>
  18. </src:fragment>
  19. </refsynopsisdiv>
  20. <refsection><info><title>Description</title></info>
  21. <para>Maintaining bibliography entries across a set of documents is tedious, time
  22. consuming, and error prone. It makes much more sense, usually, to store all of
  23. the bibliography entries in a single place and simply <quote>extract</quote>
  24. the ones you need in each document.</para>
  25. <para>That's the purpose of the
  26. <parameter>bibliography.collection</parameter> parameter. To setup a global
  27. bibliography <quote>database</quote>, follow these steps:</para>
  28. <para>First, create a stand-alone bibliography document that contains all of
  29. the documents that you wish to reference. Make sure that each bibliography
  30. entry (whether you use <tag>biblioentry</tag> or <tag>bibliomixed</tag>)
  31. has an ID.</para>
  32. <para>My global bibliography, <filename>~/bibliography.xml</filename> begins
  33. like this:</para>
  34. <informalexample>
  35. <programlisting>&lt;!DOCTYPE bibliography
  36. PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
  37. "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"&gt;
  38. &lt;bibliography&gt;&lt;title&gt;References&lt;/title&gt;
  39. &lt;bibliomixed id="xml-rec"&gt;&lt;abbrev&gt;XML 1.0&lt;/abbrev&gt;Tim Bray,
  40. Jean Paoli, C. M. Sperberg-McQueen, and Eve Maler, editors.
  41. &lt;citetitle&gt;&lt;ulink url="http://www.w3.org/TR/REC-xml"&gt;Extensible Markup
  42. Language (XML) 1.0 Second Edition&lt;/ulink&gt;&lt;/citetitle&gt;.
  43. World Wide Web Consortium, 2000.
  44. &lt;/bibliomixed&gt;
  45. &lt;bibliomixed id="xml-names"&gt;&lt;abbrev&gt;Namespaces&lt;/abbrev&gt;Tim Bray,
  46. Dave Hollander,
  47. and Andrew Layman, editors.
  48. &lt;citetitle&gt;&lt;ulink url="http://www.w3.org/TR/REC-xml-names/"&gt;Namespaces in
  49. XML&lt;/ulink&gt;&lt;/citetitle&gt;.
  50. World Wide Web Consortium, 1999.
  51. &lt;/bibliomixed&gt;
  52. &lt;!-- ... --&gt;
  53. &lt;/bibliography&gt;
  54. </programlisting>
  55. </informalexample>
  56. <para>When you create a bibliography in your document, simply
  57. provide <emphasis>empty</emphasis> <tag>bibliomixed</tag>
  58. entries for each document that you wish to cite. Make sure that these
  59. elements have the same ID as the corresponding <quote>real</quote>
  60. entry in your global bibliography.</para>
  61. <para>For example:</para>
  62. <informalexample>
  63. <programlisting>&lt;bibliography&gt;&lt;title&gt;Bibliography&lt;/title&gt;
  64. &lt;bibliomixed id="xml-rec"/&gt;
  65. &lt;bibliomixed id="xml-names"/&gt;
  66. &lt;bibliomixed id="DKnuth86"&gt;Donald E. Knuth. &lt;citetitle&gt;Computers and
  67. Typesetting: Volume B, TeX: The Program&lt;/citetitle&gt;. Addison-Wesley,
  68. 1986. ISBN 0-201-13437-3.
  69. &lt;/bibliomixed&gt;
  70. &lt;bibliomixed id="relaxng"/&gt;
  71. &lt;/bibliography&gt;</programlisting>
  72. </informalexample>
  73. <para>Note that it's perfectly acceptable to mix entries from your
  74. global bibliography with <quote>normal</quote> entries. You can use
  75. <tag>xref</tag> or other elements to cross-reference your
  76. bibliography entries in exactly the same way you do now.</para>
  77. <para>Finally, when you are ready to format your document, simply set the
  78. <parameter>bibliography.collection</parameter> parameter (in either a
  79. customization layer or directly through your processor's interface) to
  80. point to your global bibliography.</para>
  81. <para>A relative path in the parameter is interpreted in one
  82. of two ways:</para>
  83. <orderedlist numeration="loweralpha">
  84. <listitem>
  85. <para>If your document contains no links to empty bibliographic elements,
  86. then the path is relative to the file containing
  87. the first <tag>bibliomixed</tag> element in the document.</para>
  88. </listitem>
  89. <listitem>
  90. <para>If your document does contain links to empty bibliographic elements,
  91. then the path is relative to the file containing
  92. the first such link element in the document.</para>
  93. </listitem>
  94. </orderedlist>
  95. <para>Once the collection file is opened by the first instance described
  96. above, it stays open for the current document
  97. and the relative path is not reinterpreted again.</para>
  98. <para>The stylesheets will format the bibliography in your document as if
  99. all of the entries referenced appeared there literally.</para>
  100. </refsection>
  101. </refentry>