## 6. Real-World OEB: Charter of the United Nations

At this point you should be able to create a fairly complex real-world OEB publication. We could demonstrate creating an OEB publication from the ground up by writing a book-length work from scratch, but it will probably be more illustrative to take a publication that already exists and convert it to OEB.

Here, we'll take the Charter of the United Nations — available on the Internet at http://www.un.org/aboutun/charter/ — and convert it into an OEB publication in the same step-by-step manner you would use with your own publication, or one you are converting. You can find the finished product at http://www.globalmentor.com/bookstore/search?text=un+charter.

It's best to first take a broad look of how the work is organized, so that we can correctly model its structure using OEB elements. In general, the UN Charter is organized in the following hierarchy:

- Charter of the United Nations
  - Chapters
    - Articles

Since OEB, being modeled so closely after HTML, has no concept of hierarchical divisions, we'll divide the UN Charter using whatever method we feel appropriate. While we could certainly put the entire Charter into one OEB document, it will probably be easier for us to keep track of things if we use several OEB document files. We'll place each chapter and all its article into a separate OEB document file, and do the same with the Introductory Note and the Preamble.

Without specific elements to represent hierarchical divisions, we'll use own arbitrary method of representing headings within each division. There are a number of ways the division headings could be represented, none really being any better than the others, so we'll choose the following representation:

- `<h1>` Title of entire UN Charter.
- `<h2>` Title of each chapter.
- `<h3>` Title of each article.

### UN Charter Chapter 2: `chapter2.html`

Since we're using separate document files for each chapter, this makes it easy to analyze different parts of the Charter separately. Although it might seem strange that we're not starting from the beginning, it's probably best to first jump into the midst of the document and see how the "mundane" structures will be implemented; we can look at the "Introductory Note", "Preamble", and trimmings such as a table of contents later, after you're comfortable with producing more common OEB elements.

The second chapter of the UN charter begins with the chapter name and title, then proceeds with each separate article title and the article's contents:

> CHAPTER II

> MEMBERSHIP

> Article 3

> The original Members of the United Nations shall be the states which, having participated in the United Nations Conference on International Organization at San Francisco, or having previously signed the Declaration by United Nations of 1 January 1942, sign the present Charter and ratify it in accordance with Article 110.

> Article 4

> 1. Membership in the United Nations is open to all other peace-loving states which accept the obligations contained in the present Charter and, in the judgment of the Organization, are able and willing to carry out these obligations.

> 2. The admission of any such state to membership in the United Nations will be effected by a decision of the General Assembly upon the recommendation of the Security Council.

> . . .

We've already decided to represent the chapter title using the `<h2>` element, and the title for each article using the `<h3>` element. After this is done, the first part of our converted text looks like this:

> `<h2>`Chapter II: Membership`</h2>`
> `<h3>`Article 3`</h3>`

The text of "Article 3", being a simple paragraph, will simply go inside a `<p>` element:

> `<h2>`Chapter II: Membership`</h2>`
> `<h3>`Article 3`</h3>`
> `<p>`The original Members of the United Nations shall be the states which, having participated in the United Nations Conference on International Organization at San Francisco, or having previously signed the Declaration by United Nations of 1 January 1942, sign the present Charter and ratify it in accordance with Article 110.`</p>`

The title of "Article 4" can obviously be placed inside a `<h3>` element, as was "Article 3", but what about the article's contents? While we could simply use two `<p>` elements, these two paragraphs are numbered; it would be more appropriate to use an ordered list, with each paragraph appearing inside one of the items in the list:

> . . .

> `<h3>`Article 4`</h3>`
> `<ol>`
> `<li><p>`Membership in the United Nations is open to all other peace-loving states which accept the obligations contained in the present Charter and, in the judgment of the Organization, are able and willing to carry out these obligations.`</p></li>`
> `<li><p>`The admission of any such state to membership in the United Nations will be effected by a decision of the General Assembly upon the recommendation of the Security Council.`</p></li>`
> `</ol>`

Note that we remove the literal numbers in each paragraph; the `<ol>` element combined with the `<li>` elements will add the correct numbers automatically when the book is displayed.

Markup added to articles five and six will be identical to that added to the first article. The last step is even more important than the others: add the `<body>` element and the other required OEB document markup. The resulting document file `chapter2.html` appears below:

> `<?xml version='1.0'?>`
> `<!DOCTYPE html PUBLIC "+//ISBN 0-9673008-1-9//DTD OEB 1.0.1 Document//EN" "http://openebook.org/dtds/oeb-1.0.1/oebdoc101.dtd">`
> `<html>`
> `<body>`
> `<h2>`Chapter II: Membership`</h2>`
> `<h3>`Article 3`</h3>`
> `<p>`The original Members of the United Nations shall be the states which, having participated in the United Nations Conference on International Organization at San Francisco, or having previously signed the Declaration by United Nations of 1 January 1942, sign the present Charter and ratify it in accordance with Article 110.`</p>`
> `<h3>`Article 4`</h3>`
> `<ol>`
> `<li><p>`Membership in the United Nations is open to all other peace-loving states which accept the obligations contained in the present Charter and, in the judgment of the Organization, are able and willing to carry out these obligations.`</p></li>`
> `<li><p>`The admission of any such state to membership in the United Nations will be effected by a decision of the General Assembly upon the recommendation of the Security Council.`</p></li>`
> `</ol>` `<h3>`Article 5`</h3>`
> `<p>`A Member of the United Nations against which preventive or enforcement action has been taken by the Security Council may be suspended from the exercise of the rights and privileges of membership by the General Assembly upon the recommendation of the Security Council. The exercise of these rights and privileges may be restored by the Security Council.`</p>`
> `<h3>`Article 6`</h3>`
> `<p>`A Member of the United Nations which has persistently violated the Principles contained in the present Charter may be expelled from the Organization by the General Assembly upon the recommendation of the Security Council.`</p>`
> `</body>`
> `</html>`

When this chapter is displayed, here's how it will appear:

> ## Chapter II: Membership

> ### Article 3

> The original Members of the United Nations shall be the states which, having participated in the United Nations Conference on International Organization at San Francisco, or having previously signed the Declaration by United Nations of 1 January 1942, sign the present Charter and ratify it in accordance with Article 110.

> ### Article 4

> 1. Membership in the United Nations is open to all other peace-loving states which accept the obligations contained in the present Charter and, in the judgment of the Organization, are able and willing to carry out these obligations.

> 2. The admission of any such state to membership in the United Nations will be effected by a decision of the General Assembly upon the recommendation of the Security Council.

> ### Article 5

> A Member of the United Nations against which preventive or enforcement action has been taken by the Security Council may be suspended from the exercise of the rights and privileges of membership by the General Assembly upon the recommendation of the Security Council. The exercise of these rights and privileges may be restored by the Security Council.

> ### Article 6

> A Member of the United Nations which has persistently violated the Principles contained in the present Charter may be expelled from the Organization by the General Assembly upon the recommendation of the Security Council.

### UN Charter Chapter 3: `chapter3.html`

After applying markup to the second chapter of the UN Charter, doing the same for the first chapter is straightforward; we'll therefore examine the following chapter, chapter three:

> CHAPTER III

> ORGANS

> Article 7

> 1. There are established as the principal organs of the United Nations:
> a General Assembly
> a Security Council
> an Economic and Social Council
> a Trusteeship Council
> an International Court of Justice
> and a Secretariat.

> 2. Such subsidiary organs as may be found necessary may be established in accordance with the present Charter.

> Article 8

> The United Nations shall place no restrictions on the eligibility of men and women to participate in any capacity and under conditions of equality in its principal and subsidiary organs.

Since we've already established a consistent way to use heading elements, the chapter and article titles can be converted as before:

> `<h2>`Chapter III: Organs`</h2>`
> `<h3>`Article 7`</h3>`

> . . .

Similar to Chapter II, Article 4, the individual items in Chapter II, Article 7 are numbered (ordered) items in a list. We'll therefore begin the text as follows:

> . . .

> `<ol>`
> `<li><p>`There are established as the principal organs of the United Nations:`</p></li>`

> . . .

At this point there seems to be a problem: The first listed item, beginning with "There are established...," itself contains a list of items, including "a General Assembly," "a Security Council," etc. These items are unordered (that is, they have no number beside them), but they represent a list nonetheless. It seems as if the first list item itself contains a list.

These nested lists present no problem any more than common nested elements. They do require that you take special care in making sure which list elements appear in which other elements. We should first decide which type of list element to use for the list of "principal organs." As before, we'll present each of these items using the `<li>` tag. Together, these tags go inside an enclosing list element, but these particular items shouldn't be listed in any particular order; more precisely, we don't want these items to be represented with numbers beside them. We'll therefore use an unordered list `<ul>` instead of an ordered list `<ul>`.

We'll therefore put the `<li>` list items of the unordered list `<ui>` inside the first `<li>` list item of the ordered list `<ol>`. Looking at the finished product should help to understand how this works:

> `<h2>`Chapter III: Organs`</h2>`
> `<h3>`Article 7`</h3>`
> `<ol>`
> `<li><p>`There are established as the principal organs of the United Nations:`</p>`

> > `<ul>`
> > `<li>`a General Assembly`</li>`
> > `<li>`a Security Council`</li>`
> > `<li>`an Economic and Social Council`</li>`
> > `<li>`a Trusteeship Council`</li>`
> > `<li>`an International Court of Justice`</li>`
> > `<li>`and a Secretariat.`</li>`
> > `</ul>`

> `</li>`

> . . .

Notice that the ending tag `</li>` of the first item in the ordered list comes after the end of the entire unordered list `<ul>`. This means that the entire unordered list `<ul>` is actually part of one list item element: the first list item in the ordered list `<ol>`

We're still not finished with Article 7; we still must add the second item, beginning with, "Such subsidiary organs...:"

> `<h2>`Chapter III: Organs`</h2>`
> `<h3>`Article 7`</h3>`
> `<ol>`
> `<li><p>`There are established as the principal organs of the United Nations:`</p>`

> > `<ul>` `<li>`a General Assembly`</li>`
> > `<li>`a Security Council`</li>`
> > `<li>`an Economic and Social Council`</li>`
> > `<li>`a Trusteeship Council`</li>`
> > `<li>`an International Court of Justice`</li>`
> > `<li>`and a Secretariat.`</li>`
> > `</ul>`

> `</li>`
> `<li><p>`Such subsidiary organs as may be found necessary may be established in accordance with the present Charter.`</p></li>`
> `</ol>`

The following article, Article 8, which ends this chapter of the UN Charter, is quite simple structurally. As with any OEB document file, we'll also need to add the enclosing `<html>` and `<body> elements:`

> `<?xml version='1.0'?>`
> `<!DOCTYPE html PUBLIC "+//ISBN 0-9673008-1-9//DTD OEB 1.0.1 Document//EN" "http://openebook.org/dtds/oeb-1.0.1/oebdoc101.dtd">`
> `<html>`
> `<body>`
> `<h2>`Chapter III: Organs`</h2>`
> `<h3>`Article 7`</h3>`
> `<ol>`
> `<li><p>`There are established as the principal organs of the United Nations:`</p>`

> > `<ul>` `<li>`a General Assembly`</li>`
> > `<li>`a Security Council`</li>`
> > `<li>`an Economic and Social Council`</li>`
> > `<li>`a Trusteeship Council`</li>`
> > `<li>`an International Court of Justice`</li>`
> > `<li>`and a Secretariat.`</li>`
> > `</ul>`

> `</li>`
> `<li><p>`Such subsidiary organs as may be found necessary may be established in accordance with the present Charter.`</p></li>`
> `</ol>`
> `<h3>`Article 8`</h3>`
> `<p>`The United Nations shall place no restrictions on the eligibility of men and women to participate in any capacity and under conditions of equality in its principal and subsidiary organs.`</p>`
> `</body>`
> `</html>`

The chapter will then appear like this when it's displayed:

> ## Chapter III: Organs

> ### Article 7

> 1. There are established as the principal organs of the United Nations:

>    - a General Assembly
>    - a Security Council
>    - an Economic and Social Council
>    - a Trusteeship Council
>    - an International Court of Justice
>    - and a Secretariat.

> 2. Such subsidiary organs as may be found necessary may be established in accordance with the present Charter.

> ### Article 8

> The United Nations shall place no restrictions on the eligibility of men and women to participate in any capacity and under conditions of equality in its principal and subsidiary organs.

### UN Charter Chapter 1: `chapter1.html`

Now that we've examined chapters two and three, we can return to Chapter One. At first the structure of the content looks relatively straightforward compared to the chapters we've already examined.

> CHAPTER I

> PURPOSES AND PRINCIPLES

> Article 1

> The Purposes of the United Nations are:

> . . .

> Article 2

> The Organization and its Members, in pursuit of the Purposes stated in Article 1, shall act in accordance with the following Principles.

> . . .

You should be able to easily mark up the information using the OEB publication structure, resulting in something similar to the following:

> `<h2>`Chapter I: Purposes and Principles`</h2>`
> `<h3>`Article 1`</h3>`
> `<p>`The Purposes of the United Nations are:`</p>`

> . . .

> `<h3>`Article 2`</h3>`
> `<p>`The Organization and its Members, in pursuit of the Purposes stated in Article 1, shall act in accordance with the following Principles.`</p>`

> . . .

It is at this point that the power of OEB can be put to use to store information within the document. Since these are the first places that the UN Purposes and Principles are being defined, we can make good use of the `<dfn>` element to indicate this:

> `<p>`The `<dfn>`Purposes`</dfn>` of the United Nations are:`</p>`

> . . .

> `<p>`The Organization and its Members, in pursuit of the Purposes stated in Article 1, shall act in accordance with the following `<dfn>`Principles`</dfn>`.`</p>`

> . . .

Adding the `<dfn>` tag encodes meaning into the document, explicitly stating that these two concepts are being defined for the first time. We can go one step further and mark these definitions with anchors, in case we want to refer to these specific definitions later in the document (remember that, instead of using actual `<a>` elements for anchors, we can simply add `id` attributes to the target elements):

> `<p>`The `<dfn id="purposesDefinition">`Purposes`</dfn>` of the United Nations are:`</p>`

> . . .

> `<p>`The Organization and its Members, in pursuit of the Purposes stated in Article 1, shall act in accordance with the following `<dfn id="principlesDefinition">`Principles`</dfn>`.`</p>`

> . . .

In fact, it's a good idea if we place anchors on every heading in the document so that the respective sections can be linked to later. For example, adding anchors to the sections of this chapter results in the markup below. (If we were to use actual anchor elements for anchors, we would place the anchor element, `<a>`, inside the heading element, `<h2>`. This order cannot be reversed, for the same reason that the `<p>` element cannot go inside an `<em>` element: inline elements must go inside block elements, and not vice-versa. Here we don't even use anchor elements at all, but simply add `id` attributes to the `<h2>` and `<h3>` elements.)

> `<h2 id="chapter1">`Chapter I: Purposes and Principles`</h2>`
> `<h3 id="article1">`Article 1`</h3>`
> `<p>`The Purposes of the United Nations are:`</p>`

> . . .

> `<h3 id="article2">`Article 2`</h3>`
> `<p>`The Organization and its Members, in pursuit of the Purposes stated in Article 1, shall act in accordance with the following Principles.`</p>`

> . . .

Assuming we add anchor elements to every division in the entire UN Charter, and assuming Chapter VII is placed in a file named `chapter7.html`, we can provide links from this chapter. The last principle in Article 2 states that "this principle shall not prejudice the application of enforcement measures under Chapter Vll."; with anchor tags appropriately placed throughout our documents, we can provide a direct hypertext link to the chapter by using the anchor element `<a>` like this:

> `<p>`...this principle shall not prejudice the application of enforcement measures under `<a href="chapter7.html#chapter7">`Chapter Vll`</a>`.`<p>`

Notice that we've not only linked to the file, `chapter7.html`, we've also provided the ID of the anchor, `#chapter7`, which marks the beginning of the actual chapter in the file. Since Chapter 7 is at the beginning of `chapter7.html`, we could have simply linked to the document file itself: `<a href="chapter7.html">`. However, in many cases the target anchor within the file will be important as well when the anchor is not at the beginning of the document — in the case of articles, for instance.

### UN Charter Introductory Note: `intro.html`

Moving back another step to the UN Charter's Introductory Note provides more examples of linking, provided the appropriate anchor elements have been placed at the start of every chapter and article:

> `<h2 id="chapter1">`Introductory Note`</h2>`
> `<p>`The Charter of the United Nations was signed on 26 June 1945, in San Francisco, at the conclusion of the United Nations Conference on International Organization, and came into force on 24 October 1945. The Statute of the International Court of Justice is an integral part of the Charter.`</p>`
> `<p>`Amendments to `<a href="chapter5.html#article23">`Articles 23`</a>`, `<a href="chapter5.html#article27">`27`</a>` and `<a href="chapter10.html#article61">`61`</a>` of the Charter were adopted by the General Assembly on 17 December 1963 and came into force on 31 August 1965. A further amendment to `<a href="chapter10.html#article61">`Article 61`</a>` was adopted by the General Assembly on 20 December 1971, and came into force on 24 September 1973. An amendment to `<a href="chapter18.html#article109">`Article 109`</a>`, adopted by the General Assembly on 20 December 1965, came into force on 12 June 1968.`</p>`

> . . .

Note that we had to first check and see in which document files the articles appear before we could link to them.

### Table of Contents: `toc.html`

The first version of the Open eBook Publication Structure has no specific elements for creating a table of contents; this means that, outside of creating a new set of elements specifically for a table of contents, we'll be forced to use generic elements to do the job. Here we'll use the standard elements to create a table of contents inside a normal OEB document.

A table of contents is usually one of the last things you'll add to your OEB publication, for good reason: not only does it provide a hierarchical view of the structure of the publication, it provides links to each one of publication sections. You may, however, elect to create a table of contents early and use it as a working design of your entire publication, if you are writing the work from scratch; you'd still have to wait until the document was finished to test all of the hyperlinks, though.

The table of contents therefore has two elements: its reflection of the publication's structure, as well as hyperlinks to parts of the publication. Reflecting the work's structure can be accomplished in several ways; here we'll use unordered list `<ol>` elements. An OEB document displaying the top-level UN Charter structure (that is, the level containing the Introductory Note, Preamble, and chapters), might be marked up like this:

> `<ul>`
> `<li>`Introductory Note`</li>`
> `<li>`Preamble`</li>`
> `<li>`Chapter I: Purposes and Principles`</li>`
> `<li>`Chapter II: Membership`</li>`
> . . .
> `</ul>`

This would appear something like this:

> - Introductory Note
> - Preamble
> - Chapter I: Purposes and Principles
> - Chapter II: Membership
> - . . .

Displaying the second level of organization, the level containing the articles, requires a bit more concentration on details. It's evident that each list of articles that appear within a chapter will be marked up using a separate list element, but it's important to remember that all of these lists are actually sub-lists of the chapter item in which they appear. Each chapter item is enclosed within a list item `<li>`...`</li>` beginning and ending tag pair. Each sub-list of articles must appear inside that list item's beginning and ending tags. OEB's content model does not allow lists to appear between list items; sub-lists must appear inside the list item to which they belong.

> `<ul>`
> `<li>`Introductory Note`</li>`
> `<li>`Preamble`</li>`
> `<li>`Chapter I: Purposes and Principles

> > `<ul>`
> > `<li>`Article 1`</li>`
> > `<li>`Article 2`</li>`
> > `</ul>`

> `</li>`
> `<li>`Chapter II: Membership

> > `<ul>`
> > `<li>`Article 3`</li>`
> > `<li>`Article 4`</li>`
> > `<li>`Article 5`</li>`
> > `<li>`Article 6`</li>`
> > `</ul>`

> `</li>`
> . . .
> `</ul>`

When displayed, the table of contents would now appear like this:

> - Introductory Note
> - Preamble
> - Chapter I: Purposes and Principles
>   - Article 1
>   - Article 2
> - Chapter II: Membership
>   - Article 3
>   - Article 4
>   - Article 5
>   - Article 6
> - . . .

That's all we need to do regarding structure, since the UN Charter has only these levels of hierarchy. The other issue to address is hyperlinking: each item in the table of contents must link to the respective section of the publication. If that section lies somewhere in the middle of the physical document file in which it appears, we must have first provided anchors with unique IDs for the table of contents to link to.

After adding hyperlinks, our table of contents is basically finished:

> `<ul>`
> `<li><a href="intro.html">`Introductory Note`</a></li>`
> `<li><a href="preamble.html">`Preamble`</a></li>`
> `<li><a href="chapter1.html">`Chapter I: Purposes and Principles</a>

> > `<ul>`
> > `<li><a href="chapter1.html#article1">`Article 1`</a></li>`
> > `<li><a href="chapter1.html#article2">`Article 2`</a></li>`
> > `</ul>`

> `</li>`
> `<li><a href="chapter2.html">`Chapter II: Membership</a>

> > `<ul>`
> > `<li><a href="chapter2.html#article3">`Article 3`</a></li>`
> > `<li><a href="chapter2.html#article4">`Article 4`</a></li>`
> > `<li><a href="chapter2.html#article5">`Article 5`</a></li>`
> > `<li><a href="chapter2.html#article6">`Article 6`</a></li>`
> > `</ul>`

> `</li>`
> . . .
> `</ul>`

### UN Charter Package File: `uncharter.opf`

From the examples covered so far, marking up the rest of the UN Charter should be a simple task. There's still one more file we need to create, however, to tie all the pieces together and make our series of OEB documents into a complete OEB publication: the OEB package file.

Creating the package file, as you know by now, requires less thinking and planning than cutting, pasting, and altering to match the particular publication you're working with. In this example, we'll simply start from the top of the file and work our way downwards — although we'll include ending tags when appropriate, which may occur at the end of the file. The first part should be familiar — it appears at the top of every package file:

> `<?xml version='1.0'?>`
> `<!DOCTYPE package PUBLIC "+//ISBN 0-9673008-1-9//DTD OEB 1.0.1 Package//EN" "http://openebook.org/dtds/oeb-1.0.1/oebpkg101.dtd">`
> `<package unique-identifier="uncharterpackage">`

> > . . .

> `</package>`

Inside the `<package>` element, we'll place the metadata. In particular, we'll include the title of the publication (Charter of the United Nations) and we'll create our own type of "charter", although this particular type of document has not been standardized.

The `<dc:Identifier>` element requires particular attention. Notice that we've given the `id` attribute the value `"uncharterpackage"` to match the `unique-identifier` attribute in the earlier `<package>` element. Furthermore, we've used a `scheme` of `"url"`, although this value is not standard. It would be better to include a `scheme` of `ISBN` or some other similar identifier more useful to third parties such as bookstores and libraries.

There are two `<dc:Creator>` elements; one specifies an author (`"aut"`) of `United Nations` and a book publisher (`"bkp"`) of `Mentor Publishing`. The `<dc:Date` element contains the date this package file was created, July 11, 2001.

Three arbitrary subjects have been added using the `<ds:Subject>` element: `United Nations`, `Historical Documents`, and `International Politics`. Lastly, a `<dc:Source>` element shows that we originally found the content at `http://www.un.org/aboutun/charter/`.

> `<dc-metadata xmlns:dc="http://purl.org/dc/elements/1.0/" xmlns:oebpackage="http://openebook.org/namespaces/oeb-package/1.0/">`
> `<dc:Title>`Charter of the United Nations`</dc:Title>`
> `<dc:Type>`charter`</dc:Type>`
> `<dc:Identifier id="uncharterpackage" scheme="url">`http://www.un.org/aboutun/charter/`</dc:Identifier>`
> `<dc:Creator role="aut">`United Nations`</dc:Creator>`
> `<dc:Creator role="bkp">`Mentor Publishing`</dc:Creator>`
> `<dc:Date>`2001-07-11`</dc:Date>`
> `<dc:Subject>`United Nations`</dc:Subject>`
> `<dc:Subject>`Historical Documents`</dc:Subject>`
> `<dc:Subject>`International Politics`</dc:Subject>`
> `<dc:Source>`http://www.un.org/aboutun/charter/`</dc:Source>`
> `</dc-metadata>`

We next need to specify the files which will be included in the publication; this information will appear inside the `<manifest>` element. Since our version of the the UN Charter has no images associated with it, each `<item>` element in the manifest will represent an OEB document file, with `media-type="text/x-oeb1-document"`. It doesn't matter what order we present the files, just so we include all the files used in the publication. This includes the table of contents, the introduction, the preamble, and all the chapters, including chapters we haven't listed here.

> `<manifest>`
> `<item id="toc" href="toc.html" media-type="text/x-oeb1-document" />`
> `<item id="intro" href="intro.html" media-type="text/x-oeb1-document" />`
> `<item id="preamble" href="preamble.html" media-type="text/x-oeb1-document" />`
> `<item id="chapter1" href="chapter1.html" media-type="text/x-oeb1-document" />`
> `<item id="chapter2" href="chapter2.html" media-type="text/x-oeb1-document" />`
> . . .
> `</manifest>`

It is inside the `<spine>` element that we specify the reading order of the documents we listed in the `<manifest>` section. The order here is all that's important; having already listed the essential information about each document, we simply reference the unique ID we've assigned each item earlier:

> `<spine>`
> `<itemref idref="toc" />`
> `<itemref idref="intro" />`
> `<itemref idref="preamble" />`
> `<itemref idref="chapter1" />`
> `<itemref idref="chapter2" />`
> . . .
> `</spine>`

That's all that OEB requires for a complete OEB publication, and we could at this point read the UN Charter on any OEB-compliant reading system. As an example of optional OEB functionality that we can add to allow future OEB reading systems to manipulate our work in various ways, we'll add a `<guide>` element and specify that our table of contents is one of the guide types recognized by OEB; specifically, it is a `"toc"`, a table of contents. In short, we're simply identifying a particular document as a table of contents; other types of guides may be found in the Open eBook Publication Structure 1.0.1 Specification.

There is currently no guarantee that a particular OEB reading system will recognize guides, but it's still a good idea to include at least the table of contents. More information on guides and a related concept, tours, can be found in the Open eBook Publication Structure 1.0 Specification, and will likely be covered in depth in a later edition of this book.

> `<guide>`
> `<reference type="toc" title="Table of Contents" href="toc.html" />`
> `</guide>`

At this point, we've finished the package file, completing our publication. Assuming the rest of the chapters have been marked up and included, the group of files can be presented to an OEB-compliant reading system and, based upon the function of the reading system, either be presented to a user or passed along the chain to another piece of software and/or hardware for further manipulation. The complete package file, `uncharter.opf`, is presented below:

> `<?xml version='1.0'?>`
> `<!DOCTYPE package PUBLIC "+//ISBN 0-9673008-1-9//DTD OEB 1.0.1 Package//EN" "http://openebook.org/dtds/oeb-1.0.1/oebpkg101.dtd">`
> `<package unique-identifier="uncharterpackage">`

> > `<dc-metadata xmlns:dc="http://purl.org/dc/elements/1.0/" xmlns:oebpackage="http://openebook.org/namespaces/oeb-package/1.0/">`
> > `<dc:Title>`Charter of the United Nations`</dc:Title>`
> > `<dc:Type>`charter`</dc:Type>`
> > `<dc:Identifier id="uncharterpackage" scheme="url">`http://www.un.org/aboutun/charter/`</dc:Identifier>`
> > `<dc:Creator role="aut">`United Nations`</dc:Creator>`
> > `<dc:Creator role="bkp">`Mentor Publishing`</dc:Creator>`
> > `<dc:Date>`2001-07-11`</dc:Date>`
> > `<dc:Subject>`United Nations`</dc:Subject>`
> > `<dc:Subject>`Historical Documents`</dc:Subject>`
> > `<dc:Subject>`International Politics`</dc:Subject>`
> > `<dc:Source>`http://www.un.org/aboutun/charter/`</dc:Source>`
> > `</dc-metadata>`

> > `<manifest>`
> > `<item id="toc" href="toc.html" media-type="text/x-oeb1-document" />`
> > `<item id="intro" href="intro.html" media-type="text/x-oeb1-document" />`
> > `<item id="preamble" href="preamble.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter1" href="chapter1.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter2" href="chapter2.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter3" href="chapter3.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter4" href="chapter4.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter5" href="chapter5.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter6" href="chapter6.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter7" href="chapter7.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter8" href="chapter8.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter9" href="chapter9.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter10" href="chapter10.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter11" href="chapter11.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter12" href="chapter12.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter13" href="chapter13.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter14" href="chapter14.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter15" href="chapter15.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter16" href="chapter16.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter17" href="chapter17.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter18" href="chapter18.html" media-type="text/x-oeb1-document" />`
> > `<item id="chapter19" href="chapter19.html" media-type="text/x-oeb1-document" />`
> > `</manifest>`

> > `<spine>`
> > `<itemref idref="toc" />`
> > `<itemref idref="intro" />`
> > `<itemref idref="preamble" />`
> > `<itemref idref="chapter1" />`
> > `<itemref idref="chapter2" />`
> > `<itemref idref="chapter3" />`
> > `<itemref idref="chapter4" />`
> > `<itemref idref="chapter5" />`
> > `<itemref idref="chapter6" />`
> > `<itemref idref="chapter7" />`
> > `<itemref idref="chapter8" />`
> > `<itemref idref="chapter9" />`
> > `<itemref idref="chapter10" />`
> > `<itemref idref="chapter11" />`
> > `<itemref idref="chapter12" />`
> > `<itemref idref="chapter13" />`
> > `<itemref idref="chapter14" />`
> > `<itemref idref="chapter15" />`
> > `<itemref idref="chapter16" />`
> > `<itemref idref="chapter17" />`
> > `<itemref idref="chapter18" />`
> > `<itemref idref="chapter19" />`
> > `</spine>`

> > `<guide>`
> > `<reference type="toc" title="Table of Contents" href="toc.html" />`
> > `</guide>`

> `</package>`