Why We Occupy: Liberty Plaza 2011 (electronic edition)
Interviews by Olivia Schanzer

Copyright  2012 by Olivia Schanzer and Gene Yu
See distro.xml for copying conditions.

ISBN: 978-1-939333-01-8

Published by Matchlock Press
PO Box 90606
Brooklyn, NY 11209
matchlock.com

This is a "transparent" version of the book, as defined by the GNU
Free Documentation License (see fdl.xml).  A transparent copy is
machine-readable and suitable for editing.  It is "source code," as
opposed to the online version or the trade paperback, both of which
could be described as "compiled" in the sense that a compiled
version can be derived from a transparent copy, but not vice versa.

The encoding used in these files is TEI Lite, an Extensible Markup
Language (XML) schema produced by the Text Encoding Initiative (TEI).
The top-level TEI.2 element is contained in "main.xml."


Verifying the signature
=======================

The source code package is accompanied by a signature file which can
be used to verify that the code contained in the package is free of
tampering.  The signature was created using GnuPG, a command-line
program that is freely available on various operating systems.

The first step in verifying the signature is to retrieve the public
key for Matchlock Press by running the following command on the
command line:

	$ gpg --recv-keys 6537BD0C

You should receive a response like the following:

	gpg: requesting key 6537BD0C from hkp server keys.gnupg.net
	gpg: key 6537BD0C: public key "Keymaster <keymaster@matchlock.com>" imported
	gpg: Total number processed: 1
	gpg:               imported: 1  (RSA: 1)

The next step is to verify the signature.  Run

	$ gpg --verify wwo.tar.bz2.sig wwo.tar.bz2

The response should contain a line like

	Good signature from "Keymaster <keymaster@matchlock.com>"

In the example, keys.gnupg.net is the default keyserver for gnupg
keys.  To download a copy of the key from the World Wide Web, visit
the MIT PGP Public Key Sever <http://pgp.mit.edu> and search for
"matchlock."


XML Validation
==============

To validate the XML code, you will need both an XML parser and a
Document Type Definition (DTD).  Here we show a bare-bones validation
using the command-line tool "xmllint."  There are many other tools;
TEI is widely supported.

The DTD is available from the TEI Consortium:

	http://www.tei-c.org/Guidelines/Customization/Lite/DTD/teixlite.dtd

This is the address pointed to by the document type definition; your
XML parser may be able to download it automatically.  You can also
download the file and access it locally.

To tell xmllint where to find the DTD, first add the name of the
directory where you placed the file to the environment variable
XML_CATALOG_FILES:

	$ XML_CATALOG_FILES=/usr/share/xml/tei/catalog.xml
	$ export XML_CATALOG_FILES

In the same directory as the DTD, create a catalog file called
"catalog.xml" containing the following XML element:

	<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
	    <public publicId="-//TEI P4//ELEMENTS TEI Lite XML ver. 1//EN"
		uri="teixlite.dtd"/>
	    <system systemId="http://www.tei-c.org/Guidelines/Customization/Lite/DTD/teixlite.dtd"
		uri="teixlite.dtd"/>
	</catalog>

This will cause xmllint to replace the URL with the local reference
before retrieving the DTD.

Now run

	$ xmllint --valid --noent --noout wwo.xml

The "noent" option tells xmllint to substitute entity references,
causing it to expand each chapter in turn.  If something has gone
wrong, you will know at this point.  xmllint will complain loudly
and, let us hope, succinctly.

To generate a copy of the entire document in one XML file, omit the
"noout" option.


--
Gene Yu <gene@matchlock.com>
Last modified 21 Feb. 2013
