bookshop 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. data/CHANGELOG +11 -0
  2. data/MIT-LICENSE +1 -1
  3. data/README.rdoc +47 -14
  4. data/bookshop.gemspec +7 -8
  5. data/lib/bookshop/commands/build.rb +66 -3
  6. data/lib/bookshop/generators/bookshop/app/app_generator.rb +12 -1
  7. data/lib/bookshop/generators/bookshop/app/templates/README.rdoc +94 -18
  8. data/lib/bookshop/generators/bookshop/app/templates/book/book.xml +17 -0
  9. data/lib/bookshop/generators/bookshop/app/templates/book/bookinfo.xml +22 -0
  10. data/lib/bookshop/generators/bookshop/app/templates/book/ch00.xml +112 -0
  11. data/lib/bookshop/generators/bookshop/app/templates/book/ch01.xml +194 -0
  12. data/lib/bookshop/generators/bookshop/app/templates/book/ch02.xml +707 -0
  13. data/lib/bookshop/generators/bookshop/app/templates/book/ch03.xml +2224 -0
  14. data/lib/bookshop/generators/bookshop/app/templates/book/covers/.svn/all-wcprops +11 -0
  15. data/lib/bookshop/generators/bookshop/app/templates/book/covers/.svn/entries +62 -0
  16. data/lib/bookshop/generators/bookshop/app/templates/book/covers/.svn/prop-base/cover.jpg.svn-base +9 -0
  17. data/lib/bookshop/generators/bookshop/app/templates/book/covers/.svn/text-base/cover.jpg.svn-base +0 -0
  18. data/lib/bookshop/generators/bookshop/app/templates/book/covers/cover.jpg +0 -0
  19. data/lib/bookshop/generators/bookshop/app/templates/book/covers/cover.pdf +4310 -13
  20. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/all-wcprops +197 -0
  21. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/entries +1116 -0
  22. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/callouts.png.svn-base +9 -0
  23. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/characterTool.png.svn-base +9 -0
  24. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/commentview.png.svn-base +9 -0
  25. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/docbook_duck.png.svn-base +9 -0
  26. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/editReferenced.png.svn-base +9 -0
  27. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/elementbar.png.svn-base +9 -0
  28. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/figureInsert.png.svn-base +9 -0
  29. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/figurePickFile2.png.svn-base +9 -0
  30. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/fileref.png.svn-base +9 -0
  31. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/hyperlink_print.png.svn-base +9 -0
  32. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/hyperlink_web.png.svn-base +9 -0
  33. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/insertcomment.png.svn-base +9 -0
  34. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/keyCapWrap.png.svn-base +9 -0
  35. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/lineannotations.png.svn-base +9 -0
  36. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/linkFlow.png.svn-base +9 -0
  37. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/linkend.png.svn-base +9 -0
  38. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/promotedemote.png.svn-base +9 -0
  39. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/search.png.svn-base +9 -0
  40. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/secMenu.png.svn-base +9 -0
  41. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/spell.png.svn-base +9 -0
  42. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/svn_workflow_ongoing.png.svn-base +9 -0
  43. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/svn_workflow_setup.png.svn-base +9 -0
  44. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/tableID.png.svn-base +9 -0
  45. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/tableInsert.png.svn-base +9 -0
  46. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/treeView.png.svn-base +9 -0
  47. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/ulink.png.svn-base +9 -0
  48. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/universal_design_for_web_applications_cover.png.svn-base +5 -0
  49. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/untitled.png.svn-base +9 -0
  50. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/urlAttribute.png.svn-base +9 -0
  51. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/validation.png.svn-base +9 -0
  52. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/viewMenu.png.svn-base +9 -0
  53. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/prop-base/windowPrefs.png.svn-base +9 -0
  54. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/callouts.png.svn-base +0 -0
  55. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/characterTool.png.svn-base +0 -0
  56. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/commentview.png.svn-base +0 -0
  57. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/docbook_duck.png.svn-base +0 -0
  58. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/editReferenced.png.svn-base +0 -0
  59. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/elementbar.png.svn-base +0 -0
  60. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/figureInsert.png.svn-base +0 -0
  61. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/figurePickFile2.png.svn-base +0 -0
  62. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/fileref.png.svn-base +0 -0
  63. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/hyperlink_print.png.svn-base +0 -0
  64. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/hyperlink_web.png.svn-base +0 -0
  65. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/insertcomment.png.svn-base +0 -0
  66. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/keyCapWrap.png.svn-base +0 -0
  67. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/lineannotations.png.svn-base +0 -0
  68. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/linkFlow.png.svn-base +0 -0
  69. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/linkend.png.svn-base +0 -0
  70. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/promotedemote.png.svn-base +0 -0
  71. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/search.png.svn-base +0 -0
  72. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/secMenu.png.svn-base +0 -0
  73. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/spell.png.svn-base +0 -0
  74. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/svn_workflow_ongoing.png.svn-base +0 -0
  75. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/svn_workflow_setup.png.svn-base +0 -0
  76. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/tableID.png.svn-base +0 -0
  77. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/tableInsert.png.svn-base +0 -0
  78. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/treeView.png.svn-base +0 -0
  79. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/ulink.png.svn-base +0 -0
  80. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/universal_design_for_web_applications_cover.png.svn-base +0 -0
  81. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/untitled.png.svn-base +0 -0
  82. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/urlAttribute.png.svn-base +0 -0
  83. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/validation.png.svn-base +0 -0
  84. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/viewMenu.png.svn-base +0 -0
  85. data/lib/bookshop/generators/bookshop/app/templates/book/figs/.svn/text-base/windowPrefs.png.svn-base +0 -0
  86. data/lib/bookshop/generators/bookshop/app/templates/book/{images → figs}/bluehead_logo.gif +0 -0
  87. data/lib/bookshop/generators/bookshop/app/templates/book/figs/callouts.png +0 -0
  88. data/lib/bookshop/generators/bookshop/app/templates/book/figs/characterTool.png +0 -0
  89. data/lib/bookshop/generators/bookshop/app/templates/book/figs/commentview.png +0 -0
  90. data/lib/bookshop/generators/bookshop/app/templates/book/figs/docbook_duck.png +0 -0
  91. data/lib/bookshop/generators/bookshop/app/templates/book/{images → figs}/draft.png +0 -0
  92. data/lib/bookshop/generators/bookshop/app/templates/book/figs/editReferenced.png +0 -0
  93. data/lib/bookshop/generators/bookshop/app/templates/book/figs/elementbar.png +0 -0
  94. data/lib/bookshop/generators/bookshop/app/templates/book/figs/figureInsert.png +0 -0
  95. data/lib/bookshop/generators/bookshop/app/templates/book/figs/figurePickFile2.png +0 -0
  96. data/lib/bookshop/generators/bookshop/app/templates/book/figs/fileref.png +0 -0
  97. data/lib/bookshop/generators/bookshop/app/templates/book/figs/hyperlink_print.png +0 -0
  98. data/lib/bookshop/generators/bookshop/app/templates/book/figs/hyperlink_web.png +0 -0
  99. data/lib/bookshop/generators/bookshop/app/templates/book/figs/insertcomment.png +0 -0
  100. data/lib/bookshop/generators/bookshop/app/templates/book/figs/keyCapWrap.png +0 -0
  101. data/lib/bookshop/generators/bookshop/app/templates/book/figs/lineannotations.png +0 -0
  102. data/lib/bookshop/generators/bookshop/app/templates/book/figs/linkFlow.png +0 -0
  103. data/lib/bookshop/generators/bookshop/app/templates/book/figs/linkend.png +0 -0
  104. data/lib/bookshop/generators/bookshop/app/templates/book/figs/promotedemote.png +0 -0
  105. data/lib/bookshop/generators/bookshop/app/templates/book/figs/search.png +0 -0
  106. data/lib/bookshop/generators/bookshop/app/templates/book/figs/secMenu.png +0 -0
  107. data/lib/bookshop/generators/bookshop/app/templates/book/figs/spell.png +0 -0
  108. data/lib/bookshop/generators/bookshop/app/templates/book/figs/svn_workflow_ongoing.png +0 -0
  109. data/lib/bookshop/generators/bookshop/app/templates/book/figs/svn_workflow_setup.png +0 -0
  110. data/lib/bookshop/generators/bookshop/app/templates/book/figs/tableID.png +0 -0
  111. data/lib/bookshop/generators/bookshop/app/templates/book/figs/tableInsert.png +0 -0
  112. data/lib/bookshop/generators/bookshop/app/templates/book/figs/treeView.png +0 -0
  113. data/lib/bookshop/generators/bookshop/app/templates/book/figs/ulink.png +0 -0
  114. data/lib/bookshop/generators/bookshop/app/templates/book/figs/universal_design_for_web_applications_cover.png +0 -0
  115. data/lib/bookshop/generators/bookshop/app/templates/book/figs/untitled.png +0 -0
  116. data/lib/bookshop/generators/bookshop/app/templates/book/figs/urlAttribute.png +0 -0
  117. data/lib/bookshop/generators/bookshop/app/templates/book/figs/validation.png +0 -0
  118. data/lib/bookshop/generators/bookshop/app/templates/book/figs/viewMenu.png +0 -0
  119. data/lib/bookshop/generators/bookshop/app/templates/book/figs/windowPrefs.png +0 -0
  120. data/lib/bookshop/generators/bookshop/app/templates/stylesheets/html-stylesheet.xsl.tt +1 -1
  121. data/lib/bookshop/generators/bookshop/app/tools/java/epubcheck-1.2.jar +0 -0
  122. data/lib/bookshop/generators/bookshop/app/tools/java/lib/jing.jar +0 -0
  123. data/lib/bookshop/generators/bookshop/app/tools/java/lib/saxon.jar +0 -0
  124. data/lib/bookshop/generators/bookshop/app/tools/java/serializer.jar +0 -0
  125. data/lib/bookshop/generators/bookshop/app/tools/java/xalan.jar +0 -0
  126. data/lib/bookshop/generators/bookshop/app/tools/java/xercesImpl.jar +0 -0
  127. data/lib/bookshop/generators/bookshop/app/tools/java/{xml-apis-1.3.04.jar → xml-apis.jar} +0 -0
  128. data/lib/bookshop/generators/bookshop/app/tools/java/xsltc.jar +0 -0
  129. data/lib/bookshop/generators/bookshop/app/tools/kindle/kindlegen +0 -0
  130. data/lib/bookshop/version.rb +1 -1
  131. metadata +134 -26
  132. data/lib/bookshop/generators/bookshop/app/templates/book/book.xml.tt +0 -93
  133. data/lib/bookshop/generators/bookshop/app/templates/book/ch01_put_short_title_here.xml +0 -28
  134. data/lib/bookshop/generators/bookshop/app/templates/book/dedication.xml +0 -10
  135. data/lib/bookshop/generators/bookshop/app/templates/builds/html/.empty_directory +0 -0
  136. data/lib/bookshop/generators/bookshop/app/tools/java/serializer-2.7.0.jar +0 -0
  137. data/lib/bookshop/generators/bookshop/app/tools/java/xalan-2.7.0.jar +0 -0
  138. data/lib/bookshop/generators/bookshop/app/tools/java/xercesImpl-2.7.1.jar +0 -0
@@ -0,0 +1,707 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4
+ <chapter id="setting_up_your_xml_files">
5
+ <title>Setting Up Your XML Files</title>
6
+
7
+ <para>This chapter covers the basics of getting you set up to write in
8
+ DocBook using O’Reilly’s toolchain. It covers how to use O’Reilly’s
9
+ Subversion (SVN) repository to maintain your book files, how to organize
10
+ your XML files, and how to validate your XML files.</para>
11
+
12
+ <sect1 id="docbook_and_subversion">
13
+ <title>DocBook and Subversion</title>
14
+
15
+ <para>One of the benefits of working in DocBook is that you can take
16
+ advantage of O’Reilly’s Subversion repositories to maintain your files.
17
+ Subversion is an open source version control system that keeps track of
18
+ the changes you make to your book. Throughout the writing process, you can
19
+ “commit” revised versions of the book files to the repository with a log
20
+ message, which will be associated with a revision number. Among other
21
+ features, Subversion allows you to revert back to any revision of your
22
+ book, as well as run a diff to compare two different versions of a
23
+ file.</para>
24
+
25
+ <para>Subversion also supports multiple working copies of the same
26
+ project, which means you can have multiple authors collaborating and
27
+ making changes to the same set of files simultaneously, and Subversion
28
+ provides the functionality to merge, diff, or revert the revisions you
29
+ make when you commit the files to the repository.</para>
30
+
31
+ <sidebar id="gui_svn_clients">
32
+ <title>I Don’t Like SVN—Can I Use Something Else?</title>
33
+
34
+ <para>While we realize that some of the software development world now
35
+ favors distributed version control systems like Git and Mercurial, in
36
+ order to make the most of our <phrase
37
+ role="keep-together">DocBook</phrase> tools, you need to use SVN. You
38
+ can, however, choose your preferred SVN <phrase
39
+ role="keep-together">client—</phrase>whether command-line or GUI. Here
40
+ are some available GUI clients:</para>
41
+
42
+ <itemizedlist>
43
+ <listitem>
44
+ <para><ulink url="http://tortoisesvn.tigris.org/">TortoiseSVN
45
+ (Windows)</ulink></para>
46
+ </listitem>
47
+
48
+ <listitem>
49
+ <para><ulink
50
+ url="http://www.lachoseinteractive.net/en/community/subversion/svnx/features/">svnX
51
+ (Mac)</ulink></para>
52
+ </listitem>
53
+
54
+ <listitem>
55
+ <para><ulink url="http://scplugin.tigris.org/">SCPlugin
56
+ (Mac)</ulink></para>
57
+ </listitem>
58
+
59
+ <listitem>
60
+ <para><ulink url="http://versionsapp.com/">Versions
61
+ (Mac)</ulink></para>
62
+ </listitem>
63
+
64
+ <listitem>
65
+ <para><ulink url="http://rapidsvn.tigris.org/">RapidSVN
66
+ (multiplatform)</ulink></para>
67
+ </listitem>
68
+
69
+ <listitem>
70
+ <para><ulink url="http://subcommander.tigris.org/">Subcommander
71
+ (multiplatform)</ulink></para>
72
+ </listitem>
73
+ </itemizedlist>
74
+
75
+ <para>A more comprehensive list can be found <ulink
76
+ url="http://en.wikipedia.org/wiki/Comparison_of_Subversion_clients">here</ulink>.</para>
77
+
78
+ <para>O’Reilly’s documentation generally refers to the command-line SVN
79
+ client, but the concepts—and much of the vocabulary—are the same in
80
+ GUIs. For example, running <literal>svn update</literal> on the command
81
+ line is analogous to right-clicking in an <phrase
82
+ role="keep-together">SCPlugin</phrase> project directory and selecting
83
+ <filename>More</filename><phrase
84
+ role="unicode">→</phrase><filename>Subversion Update</filename>.</para>
85
+ </sidebar>
86
+
87
+ <sect2 id="using_an_oreilly_svn_repo">
88
+ <title>Using an O’Reilly Subversion Repository</title>
89
+
90
+ <para>Once you have spoken with your editor and decided that you will
91
+ write in DocBook, email the O’Reilly Tools team at
92
+ <email>toolsreq@oreilly.com</email>; we will create a Subversion
93
+ repository for you on an O’Reilly server that contains <filename
94
+ moreinfo="none">book.xml</filename> and other files to use as a template
95
+ for getting started. We will also set you up with a username and
96
+ password. There are several benefits to using an O’Reilly SVN
97
+ repository:</para>
98
+
99
+ <itemizedlist>
100
+ <listitem>
101
+ <para>It is easier to exchange files with your editor and coauthors
102
+ for review.</para>
103
+ </listitem>
104
+
105
+ <listitem>
106
+ <para>It is easier for the O’Reilly Tools team to help you with any
107
+ DocBook questions you may have along the way.</para>
108
+ </listitem>
109
+
110
+ <listitem>
111
+ <para>You can create PDF builds of your book every time you commit
112
+ changes.</para>
113
+ </listitem>
114
+
115
+ <listitem>
116
+ <para>The files are stored in a safe and secure location that is
117
+ backed up regularly.</para>
118
+ </listitem>
119
+
120
+ <listitem>
121
+ <para>You have the ability to view and merge changes from earlier
122
+ versions of your book.</para>
123
+ </listitem>
124
+ </itemizedlist>
125
+
126
+ <note>
127
+ <para>The author/manuscript repository URL for a standard O’Reilly
128
+ book follows this structure:
129
+ <emphasis>https://prod.oreilly.com/external/authors/books/<replaceable>ISBN13</replaceable>/current/</emphasis>.</para>
130
+ </note>
131
+ </sect2>
132
+
133
+ <sect2>
134
+ <title>Subversion Primer</title>
135
+
136
+ <para>For in-depth information on the Subversion workflow and a command
137
+ reference, see O’Reilly’s <ulink
138
+ url="http://svnbook.red-bean.com/nightly/en/svn-book.html?"><citetitle>Version
139
+ Control with Subversion</citetitle></ulink> (free to read
140
+ online).</para>
141
+
142
+ <para>First, set up a directory on your local machine to serve as your
143
+ local workspace for the project. You can name it anything you want. For
144
+ example: <filename>~/projects/my_book</filename>. Your working copy (or
145
+ checkout) is your own private work area: Subversion will never
146
+ incorporate other people’s changes, nor make your own changes available
147
+ to others, until you explicitly tell it to do so.</para>
148
+
149
+ <para>The following steps outline a typical SVN workflow. Again, the
150
+ examples refer to the command line, but you can run equivalent commands
151
+ using any of the GUI clients.</para>
152
+
153
+ <sect3>
154
+ <title>Checkout (<ulink role="orm:hideurl"
155
+ url="http://svnbook.red-bean.com/en/1.0/re04.html">svn
156
+ co</ulink>)</title>
157
+
158
+ <para>Check out the files from the repository as follows (substituting
159
+ the <replaceable>ISBN13</replaceable> and your workspace
160
+ filepath):</para>
161
+
162
+ <programlisting>$ <userinput>svn co https://prod.oreilly.com/external/authors/books/<replaceable>ISBN13</replaceable>/current
163
+ <replaceable>~/projects/my_book</replaceable></userinput></programlisting>
164
+
165
+ <para>You need to run this command only once, when you first start a
166
+ project. It will copy the <filename>book.xml</filename> and template
167
+ files from the repo into your checkout. See <xref
168
+ linkend="organizing_files" /> for more information about the files you
169
+ receive when you make your initial checkout.</para>
170
+ </sect3>
171
+
172
+ <sect3>
173
+ <title>Commit (<ulink role="orm:hideurl"
174
+ url="http://svnbook.red-bean.com/en/1.0/re06.html">svn commit -m'log
175
+ message'</ulink>)</title>
176
+
177
+ <para>After you do some amount of work that you want to preserve or
178
+ share with <phrase role="keep-together">others—</phrase>say, you
179
+ finish a chapter—commit those changes along with a short, descriptive
180
+ log message. For example:</para>
181
+
182
+ <programlisting>$ <userinput>svn commit -m'<replaceable>finished draft of Chapter 1</replaceable>' ch01.xml</userinput></programlisting>
183
+
184
+ <para>You don’t have to include the filename
185
+ (<filename>ch01.xml</filename> here). If you leave it off, running
186
+ <literal>svn commit</literal> will commit <emphasis>all</emphasis> the
187
+ local modifications in your checkout—so make sure you really want to
188
+ publish those changes. (If you make a mistake, previous versions can
189
+ of course be recovered.) To find out which local files have
190
+ modifications compared to the repo, run <literal>svn status
191
+ -u</literal>. Here’s an example of the output:</para>
192
+
193
+ <programlisting>$ <userinput>svn status -u</userinput>
194
+ M 245835 ch01.xml
195
+ * 232767 ch04.xml
196
+ ? images</programlisting>
197
+
198
+ <para>The “M” means <filename>ch01.xml</filename> has local
199
+ modifications; the “*” means a newer revision of
200
+ <filename>ch04.xml</filename> exists on the server; and the “?” means
201
+ <filename>images</filename> is not under version control. These are
202
+ just a few of the possible indicators; <ulink
203
+ url="http://svnbook.red-bean.com/en/1.0/re26.html">http://svnbook.red-bean.com/en/1.0/re26.html</ulink>
204
+ has a complete list.</para>
205
+
206
+ <note>
207
+ <para>You can decide how frequently you want to commit. The more
208
+ often you do, the easier it is to roll back to or recover specific
209
+ previous <phrase role="keep-together">versions</phrase>.</para>
210
+ </note>
211
+ </sect3>
212
+
213
+ <sect3>
214
+ <title>Update (<ulink role="orm:hideurl"
215
+ url="http://svnbook.red-bean.com/en/1.0/re28.html">svn
216
+ up</ulink>)</title>
217
+
218
+ <para>Running <literal>svn up</literal> (aka <literal>svn
219
+ update</literal>) brings changes from the repository into your working
220
+ copy. You may first want to run <literal>svn status -u</literal> to
221
+ see what kinds of changes will be incorporated (rather than blindly
222
+ merging in changes), and then run <literal>svn up</literal> before
223
+ starting to work on the files. This will ensure that your copies of
224
+ the files reflect the most recent version in the repo.</para>
225
+
226
+ <para>It’s also good practice to run <literal>svn up</literal> again
227
+ before you commit. This should prevent any conflicts that could occur
228
+ if other files have been added to the repo since you last
229
+ updated.</para>
230
+
231
+ <para><xref linkend="svn_workflow_setup" /> and <xref
232
+ linkend="svn_workflow_ongoing" /> provide a visual overview of the
233
+ workflow just described (where “me” is you, the author).</para>
234
+
235
+ <figure float="none" id="svn_workflow_setup">
236
+ <title>Setting up your workspace for a new project: checkout</title>
237
+
238
+ <mediaobject>
239
+ <imageobject role="web">
240
+ <imagedata fileref="figs/svn_workflow_setup.png" format="PNG"
241
+ width="4.8in" />
242
+ </imageobject>
243
+ </mediaobject>
244
+ </figure>
245
+
246
+ <figure id="svn_workflow_ongoing">
247
+ <title>Ongoing SVN workflow: update and commit</title>
248
+
249
+ <mediaobject>
250
+ <imageobject role="web">
251
+ <imagedata fileref="figs/svn_workflow_ongoing.png" format="PNG"
252
+ width="4.8in" />
253
+ </imageobject>
254
+ </mediaobject>
255
+ </figure>
256
+ </sect3>
257
+
258
+ <sect3>
259
+ <title>Add/delete/move/copy (<ulink role="orm:hideurl"
260
+ url="http://svnbook.red-bean.com/en/1.0/re01.html">svn
261
+ add</ulink>/<ulink role="orm:hideurl"
262
+ url="http://svnbook.red-bean.com/en/1.0/re08.html">svn
263
+ rm</ulink>/<ulink role="orm:hideurl"
264
+ url="http://svnbook.red-bean.com/en/1.0/re18.html">svn
265
+ mv</ulink>/<ulink role="orm:hideurl"
266
+ url="http://svnbook.red-bean.com/en/1.1/re07.html">svn
267
+ cp</ulink>)</title>
268
+
269
+ <para>These commands are useful for organizing files and directories
270
+ in the repo. If you run them locally, they take effect only after you
271
+ commit. For example:</para>
272
+
273
+ <programlisting>$ <userinput>svn add ch01.xml ch02.xml</userinput>
274
+ A ch01.xml
275
+ A ch02.xml</programlisting>
276
+
277
+ <para>The “A” output on the left indicates that the files have been
278
+ scheduled for addition. If you’ve deleted files, you’ll see a “D”
279
+ there; if you’ve modified files, you’ll see an “M”. (These letters are
280
+ the same ones shown when you run <literal>svn status
281
+ -u</literal>.)</para>
282
+
283
+ <note>
284
+ <para>If you decide, for example, that you don’t want to add
285
+ <filename>ch01.xml</filename> after all, don’t commit—run
286
+ <userinput>svn revert ch01.xml</userinput> to discard the scheduled
287
+ <phrase role="keep-together">addition</phrase>.</para>
288
+ </note>
289
+
290
+ <?dbfo-need height=”1in”
291
+ ?>
292
+
293
+ <para>Here’s an example of what happens when you commit after adding
294
+ files:</para>
295
+
296
+ <programlisting>$ <userinput>svn commit -m'Adding Chapters 1 and 2 to the repo'</userinput>
297
+ Adding ch01.xml
298
+ Adding ch02.xml
299
+ Committed revision 245451.</programlisting>
300
+
301
+ <para>where “245451” is the revision number. You can find out the
302
+ current revision number at any time using <literal>svn
303
+ info</literal>.</para>
304
+
305
+ <para>Many SVN commands can be run server-side if you include
306
+ repository URLs. Doing so results in an immediate commit (rather than
307
+ scheduling an action for a later commit) and requires a commit
308
+ message. Here’s an example of using a server-side <literal>svn
309
+ mv</literal> to rename a chapter file:</para>
310
+
311
+ <programlisting>$ <userinput>svn mv -m'Renaming chapter2.xml to chapter3.xml' </userinput>
312
+ <userinput>https://prod.oreilly.com/external/authors/books/ISBN13/current/chapter2.xml </userinput>
313
+ <userinput>https://prod.oreilly.com/external/authors/books/ISBN13/current/chapter3.xml</userinput>
314
+ Committed revision 245458.</programlisting>
315
+
316
+ <para>Then <literal>svn up</literal> to see the change in your working
317
+ copy. This command is equivalent to an <literal>svn cp</literal>
318
+ followed by an <literal>svn rm</literal>.</para>
319
+
320
+ <note>
321
+ <para>If you try to <literal>svn rm</literal>, <literal>svn
322
+ mv</literal>, or <literal>svn cp</literal> a file that exists in
323
+ your checkout but was never added to the repo, you’ll get an error
324
+ message like “svn: 'file' is not under version control”.</para>
325
+ </note>
326
+ </sect3>
327
+
328
+ <sect3>
329
+ <title>Other useful commands</title>
330
+
331
+ <variablelist>
332
+ <varlistentry>
333
+ <term><literal><ulink
334
+ url="http://svnbook.red-bean.com/en/1.1/re13.html">svn
335
+ info</ulink></literal></term>
336
+
337
+ <listitem>
338
+ <para>Print information about your working copy, including the
339
+ repo URL.</para>
340
+ </listitem>
341
+ </varlistentry>
342
+
343
+ <varlistentry>
344
+ <term><literal><ulink
345
+ url="http://svnbook.red-bean.com/en/1.0/re15.html">svn
346
+ log</ulink></literal></term>
347
+
348
+ <listitem>
349
+ <para>See all commit log messages. Use with <literal>--limit
350
+ </literal><replaceable>#</replaceable> to limit the number of
351
+ results.</para>
352
+ </listitem>
353
+ </varlistentry>
354
+
355
+ <varlistentry>
356
+ <term><literal><ulink
357
+ url="http://svnbook.red-bean.com/en/1.0/re09.html">svn
358
+ diff</ulink></literal></term>
359
+
360
+ <listitem>
361
+ <para>View changes in a file.</para>
362
+ </listitem>
363
+ </varlistentry>
364
+
365
+ <varlistentry>
366
+ <term><literal><ulink
367
+ url="http://svnbook.red-bean.com/en/1.0/re25.html">svn
368
+ revert</ulink></literal></term>
369
+
370
+ <listitem>
371
+ <para>Undo local edits.</para>
372
+ </listitem>
373
+ </varlistentry>
374
+ </variablelist>
375
+
376
+ <para>The complete list of SVN commands is available <ulink
377
+ url="http://svnbook.red-bean.com/en/1.2/svn.ref.html">here</ulink>.</para>
378
+ </sect3>
379
+
380
+ <sect3>
381
+ <title>Conflicts</title>
382
+
383
+ <para>Because Subversion does not use a “locking” model of version
384
+ control by default, it is possible for many people (such as coauthors
385
+ and other collaborators) to have checkouts of the same repo and to
386
+ work on them in parallel—which means is possible to have conflicts.
387
+ For this reason, communicating with your collaborators is extremely
388
+ important, as is remembering to commit and update your files.
389
+ Conflicts can be resolved, but dealing with them can take time away
390
+ from the writing of your book. It’s better to avoid them.</para>
391
+
392
+ <para>See <ulink
393
+ url="http://svnbook.red-bean.com/en/1.2/svn.tour.cycle.html#svn.tour.cycle.resolve"><citetitle>Version
394
+ Control with Subversion</citetitle></ulink> for more on resolving
395
+ conflicts.</para>
396
+ </sect3>
397
+ </sect2>
398
+ </sect1>
399
+
400
+ <sect1 id="triggering_pdf_builds">
401
+ <title>Triggering PDF Builds of Your Book</title>
402
+
403
+ <para>The PDF builds are created with the same XSL-FO stylesheets that we
404
+ use to typeset the final product that we send to the printer and sell as
405
+ an online PDF. The build process for DocBook books creates PDFs from a
406
+ valid <filename>book.xml</filename> file when commit messages include the
407
+ right string (<literal>orm:commitpdf</literal>).</para>
408
+
409
+ <para>You can generate a fresh PDF of your book every time you commit
410
+ changes to the SVN repository. To do so, run the following command
411
+ (substituting your own message <phrase
412
+ role="keep-together">before</phrase> the semicolon):</para>
413
+
414
+ <programlisting format="linespecific">$ <userinput>svn commit -m'<replaceable>Made some really important changes to Chapter 3</replaceable>; orm:commitpdf'</userinput></programlisting>
415
+
416
+ <para>To get the PDF, just run <literal moreinfo="none">svn up</literal>
417
+ on your working copy about 5–10 minutes after committing your files. The
418
+ PDF will be downloaded as <filename
419
+ moreinfo="none">pdf/book.xml.pdf</filename> in your working copy. If there
420
+ are any problems in generating the PDF, you’ll instead get a <filename
421
+ moreinfo="none">.buildlog</filename> file in the <filename
422
+ moreinfo="none">pdf/</filename> directory that lists the errors.</para>
423
+
424
+ <para>For PDF builds to work, the <filename>book.xml</filename> must be
425
+ valid. If it is not valid, the PDF will fail to build. See <xref
426
+ linkend="validating_your_xml" />.</para>
427
+
428
+ <note>
429
+ <para>Some users have reported that the <literal>svn up</literal> will
430
+ fail if the old <filename>book.xml.pdf</filename> is still open. Close
431
+ the file and then <literal>svn up</literal>. Please contact
432
+ <email>toolsreq@oreilly.com</email> with problems.</para>
433
+ </note>
434
+
435
+ <para>If you’re using a GUI client (see <xref
436
+ linkend="gui_svn_clients" />), the process is the same as on the command
437
+ line. You just need to add <literal>orm:commitpdf</literal> somewhere in
438
+ your log message.</para>
439
+
440
+ <para>The text <literal moreinfo="none">orm:commitpdf</literal> triggers
441
+ the PDF build, and it can be used with any commit from your working copy,
442
+ not just the <filename moreinfo="none">book.xml</filename> file or a
443
+ chapter file. So if you would like to generate a fresh PDF without making
444
+ any changes to your book files, you can add a separate scratch file to the
445
+ <filename moreinfo="none">current</filename> directory (or a subdirectory)
446
+ and just make modifications and commit the changes to it with the <literal
447
+ moreinfo="none">orm:commitpdf</literal> string.</para>
448
+
449
+ <sect2>
450
+ <title>Triggering PDF Builds of a Single Chapter</title>
451
+
452
+ <para>If instead of generating a PDF of the whole book when you commit
453
+ changes, you’d prefer to generate a PDF of a single chapter, you can use
454
+ the following command:</para>
455
+
456
+ <programlisting format="linespecific">$ <userinput>svn commit -m'<replaceable>Committing changes to Chapter 4</replaceable>; orm:chapterpdf <replaceable>@id_for_chapter</replaceable>'</userinput></programlisting>
457
+
458
+ <para>Here, the magic commit hook is <literal
459
+ moreinfo="none">orm:chapterpdf</literal> instead of <literal
460
+ moreinfo="none">orm:commitpdf</literal>. You’ll also need to include
461
+ <replaceable>@id_for_chapter</replaceable>, which is the value of the
462
+ <literal moreinfo="none">id</literal> attribute of the <literal
463
+ moreinfo="none">chapter</literal> in the XML file you want to create a
464
+ PDF of.</para>
465
+
466
+ <note>
467
+ <para>A quick way to retrieve the <literal
468
+ moreinfo="none">id</literal> via the command line is:</para>
469
+
470
+ <programlisting>$ <userinput>grep "&lt;chapter" ch04.xml</userinput>
471
+ &lt;chapter id="practice_1_automated_testing"&gt;
472
+ &lt;chapterinfo&gt;</programlisting>
473
+ </note>
474
+
475
+ <para>The string “<literal moreinfo="none">orm:chapterpdf</literal>
476
+ <replaceable>@id_for_chapter</replaceable>” must appear at the
477
+ <emphasis>end</emphasis> of your commit message for the commit hook to
478
+ work.</para>
479
+ </sect2>
480
+
481
+ <sect2>
482
+ <title>Receiving Email Notifications When Committing</title>
483
+
484
+ <para>You can set up your O’Reilly SVN repository to send a notification
485
+ anytime you or someone else (another author, your editor, the O’Reilly
486
+ Tools team, etc.) commits. Email notifications are activated with an SVN
487
+ property. You can request that the <phrase
488
+ role="keep-together">notification</phrase> property be added by writing
489
+ to <email>toolsreq@oreilly.com</email>, or you can just add it
490
+ yourself:</para>
491
+
492
+ <orderedlist>
493
+ <listitem>
494
+ <para>Navigate to the directory in your working copy that you want
495
+ to add email <phrase role="keep-together">notifications</phrase>
496
+ to:</para>
497
+
498
+ <programlisting>$ <userinput>cd <replaceable>~/projects/my_book</replaceable></userinput></programlisting>
499
+ </listitem>
500
+
501
+ <listitem>
502
+ <para>Add the <literal>orm:commitemails</literal> property,
503
+ specifying the email addresses to which you’d like notifications to
504
+ be sent (substitute in your email addresses for
505
+ <replaceable>email_1@domain.com</replaceable>, etc.):</para>
506
+
507
+ <programlisting>$ <userinput>svn pset orm:commitemails </userinput>
508
+ <userinput>'<replaceable>email_1@domain.com</replaceable>,<replaceable>email_2@domain.com</replaceable>,<replaceable>email_3@domain.com</replaceable>' .</userinput></programlisting>
509
+ </listitem>
510
+
511
+ <listitem>
512
+ <para>Do an <literal>svn up</literal> to make sure you’re in sync
513
+ with the repo, and then commit the change to enable
514
+ notifications:</para>
515
+
516
+ <programlisting>$ <userinput>svn up</userinput>
517
+ $ <userinput>svn commit -m'<replaceable>Adding email notifications for current/ directory.</replaceable>'</userinput></programlisting>
518
+ </listitem>
519
+ </orderedlist>
520
+
521
+ <para>That’s it. Notifications will now be sent to the addresses set in
522
+ the <literal>orm:commitemails</literal> property every time a change is
523
+ committed to the specified directory.</para>
524
+
525
+ <note>
526
+ <para>The <literal>orm:commitemails</literal> property is not
527
+ recursive—i.e., it will apply only to the directory to which it’s
528
+ applied, and not any subdirectories. So if you want email
529
+ notifications on subdirectories (e.g., the <filename>pdf/</filename>
530
+ directory in <filename>current/</filename>), you’ll need to add the
531
+ <literal>orm:commitemails</literal> property to those directories as
532
+ well, using the steps above.</para>
533
+ </note>
534
+
535
+ <para>To turn off notifications, you can remove the
536
+ <literal>orm:commitemails</literal> property as follows, and then
537
+ commit:</para>
538
+
539
+ <programlisting>$ <userinput>svn pdel orm:commitemails</userinput></programlisting>
540
+ </sect2>
541
+
542
+ <sect2 id="web_pdfs">
543
+ <title>Web PDFs (Parallel PDF Builds)</title>
544
+
545
+ <para>By default, when you trigger a PDF build on your SVN repo with the
546
+ <literal moreinfo="none">orm:commitpdf</literal> string, our toolchain
547
+ applies the XSL-FO stylesheets that we use for the print PDF. We use a
548
+ separate set of stylesheets for the PDFs that we sell online (as part of
549
+ the ebook bundles on <ulink
550
+ url="http://www.oreilly.com/">oreilly.com</ulink> and elsewhere), but
551
+ you can trigger a build of that “web-friendly” PDF, too. Some of the
552
+ features of these web-friendly PDFs include:</para>
553
+
554
+ <itemizedlist>
555
+ <listitem>
556
+ <para>Page size is the trim size; no crop marks</para>
557
+ </listitem>
558
+
559
+ <listitem>
560
+ <para>Different hyperlink handling (see <xref
561
+ linkend="inserting_hyperlinks" />)</para>
562
+ </listitem>
563
+
564
+ <listitem>
565
+ <para>Colorized and clickable cross-references (see <xref
566
+ linkend="creating_xrefs" />)</para>
567
+ </listitem>
568
+ </itemizedlist>
569
+
570
+ <warning>
571
+ <para>By enabling web-friendly PDF builds, you will be triggering the
572
+ creation of two PDFs each time you use the <literal
573
+ moreinfo="none">orm:commitpdf</literal> string. Double the PDFs means
574
+ double the time it will take for you to see your new PDFs. But even if
575
+ you have a lot of content, you usually won’t have to wait longer than
576
+ 15 minutes to receive both PDFs.</para>
577
+ </warning>
578
+
579
+ <para>Adding the web PDF build is just a matter of adding an SVN
580
+ property (similar to enabling email notifications). You can request that
581
+ the property be added by writing to <email>toolsreq@oreilly.com</email>,
582
+ or you can add it on your book directory yourself, as follows:</para>
583
+
584
+ <programlisting>$ <userinput>svn pset orm:parallel true .</userinput></programlisting>
585
+
586
+ <para>Then commit. Once the SVN property is in place, you will receive a
587
+ second PDF in your <filename>pdf/</filename> directory (named
588
+ <filename>book.xml.web.pdf</filename>) when you trigger a build using
589
+ the <literal role="keep-together">orm:commitpdf</literal> string.</para>
590
+
591
+ <para>To turn off parallel PDF builds, you can remove the
592
+ <literal>orm:parallel</literal> property as follows, and then
593
+ commit:</para>
594
+
595
+ <programlisting>$ <userinput>svn pdel orm:parallel</userinput></programlisting>
596
+ </sect2>
597
+
598
+ <sect2 id="displaying_comments_in_pdfs">
599
+ <title>Displaying Comments in Your PDF Builds</title>
600
+
601
+ <para>By default, text contained within XML comments
602
+ (<literal>&lt;!--</literal> <literal>--&gt;</literal>) or
603
+ <literal>remark</literal> elements (see <xref
604
+ linkend="adding_comments" />) will not be rendered in PDF builds.
605
+ However, if you’d like to have this text displayed in your PDFs—for
606
+ example, if you have comments for reviewers that you’d like to display
607
+ in your PDFs during tech review—you can do so by setting the
608
+ <literal>orm:draft</literal> SVN property on your book directory, as
609
+ follows:</para>
610
+
611
+ <programlisting>$ <userinput>svn pset orm:draft remarks .</userinput></programlisting>
612
+
613
+ <para>Then commit. Once the SVN property is in place, comments and
614
+ remarks will be displayed in red for easy visibility.</para>
615
+
616
+ <para>To turn off this feature in PDF builds, you can remove the
617
+ <literal>orm:draft</literal> property as follows, and then
618
+ commit:</para>
619
+
620
+ <programlisting>$ <userinput>svn pdel orm:draft</userinput></programlisting>
621
+ </sect2>
622
+
623
+ <sect2>
624
+ <title>Generating Timestamps in Your PDF Builds</title>
625
+
626
+ <para>To display a per-page, user-friendly timestamp on your PDFs, you
627
+ can set the <literal>orm:timestamp</literal> SVN property on your book
628
+ directory, as follows:</para>
629
+
630
+ <programlisting>$ <userinput>svn pset orm:timestamp true .</userinput></programlisting>
631
+
632
+ <para>Then commit. Once the SVN property is in place, a timestamp will
633
+ appear in the top-left corner of the PDFs you create. It looks something
634
+ like this:</para>
635
+
636
+ <screen>--------------
637
+ | 2010—03-05 |
638
+ | 11:05:43 |
639
+ --------------</screen>
640
+
641
+ <para>To turn off the timestamp in PDF builds, just remove the
642
+ <literal>orm:timestamp</literal> property, and then commit:</para>
643
+
644
+ <programlisting>$ <userinput>svn pdel orm:timestamp</userinput></programlisting>
645
+ </sect2>
646
+ </sect1>
647
+
648
+ <sect1 id="validating_your_xml">
649
+ <title>Validating Your XML Files</title>
650
+
651
+ <para>We require that XML files submitted to Production are valid DocBook
652
+ 4.5. Many XML editors (like XXE or oXygen) will validate your XML for you
653
+ on the fly. You can also use our PDF build toolchain (see <xref
654
+ linkend="triggering_pdf_builds" />) to do a validity check, as the PDF
655
+ won’t build if the files aren’t valid.</para>
656
+
657
+ <para>Another option for validating on the command line is <literal
658
+ moreinfo="none">xmllint</literal>. This tool is preinstalled on Mac OS X
659
+ and is available for a wide range of operating systems as part of the
660
+ <filename moreinfo="none">libxml2</filename> package from <ulink
661
+ url="http://xmlsoft.org/downloads.html">xmlsoft</ulink>.</para>
662
+
663
+ <para>To validate your <filename>book.xml</filename> file using <literal
664
+ moreinfo="none">xmllint</literal>, run the following command:</para>
665
+
666
+ <programlisting format="linespecific">$ <userinput moreinfo="none">xmllint --postvalid --xinclude --noout book.xml</userinput></programlisting>
667
+
668
+ <para>Any validity errors will be printed to standard output. If the book
669
+ files are valid, no output will be produced.</para>
670
+
671
+ <sect2>
672
+ <title>Validating Locally Using an XML Catalog</title>
673
+
674
+ <para>By default, <literal>xmllint</literal> validates over the Internet
675
+ against the DTD located at the URL listed in the XML file’s DOCTYPE
676
+ declaration. But if validating over the Internet is undesirable, you can
677
+ set up a local copy of the DocBook 4.5 DTD and a local XML catalog for
678
+ validation purposes.</para>
679
+
680
+ <para>The easiest way to install a copy of the <ulink
681
+ url="http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">DocBook 4.5
682
+ DTD</ulink> is via your favorite package manager. It is available via
683
+ <ulink
684
+ url="http://trac.macports.org/browser/trunk/dports/textproc/docbook-xml-4.4/Portfile">MacPorts</ulink>
685
+ and <ulink
686
+ url="http://cygwin.com/packages/docbook-xml44/docbook-xml44-4.4-2">Cygwin</ulink>,
687
+ among other packaging systems.</para>
688
+
689
+ <para>Many packaging systems will create the necessary <filename
690
+ moreinfo="none">catalog</filename> file for you, but if you need to
691
+ write one yourself, you can find more details on doing so at <ulink
692
+ url="http://www.sagehill.net/docbookxsl/WriteCatalog.html"></ulink> and
693
+ a sample catalog file at <ulink
694
+ url="http://www.sagehill.net/docbookxsl/ExampleCatalog.html"></ulink>.</para>
695
+
696
+ <para>The default location where <literal
697
+ moreinfo="none">xmllint</literal> will look for the catalog file is
698
+ <filename moreinfo="none">/etc/xml/catalog</filename>. Alternatively,
699
+ you can set the environment variable <literal
700
+ moreinfo="none">XML_CATALOG_FILES</literal> to define another default
701
+ location for catalog files. Once you’ve got the DTD and catalog set up
702
+ locally, you can validate as before:</para>
703
+
704
+ <programlisting format="linespecific">$ <userinput moreinfo="none">xmllint --postvalid --xinclude --noout book.xml</userinput></programlisting>
705
+ </sect2>
706
+ </sect1>
707
+ </chapter>