Sample library.xml file: Difference between revisions

From OLPC
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 10: Line 10:
<date>1949</date>
<date>1949</date>
<publisher>Argentina</publisher>
<publisher>Argentina</publisher>
<icon></icon>
<icon>argentina-pdfs/borges_elaleph-thumb.svg</icon>
<description>La candente mañana de febrero en que Beatriz Viterbo murió, después de una imperiosa agonía que no se rebajó un solo instante ni al sentimentalismo ni al miedo, noté que las carteleras de fierro de la Plaza Constitución habían renovado no sé qué aviso de cigarrillos rubios</description>
<description>La candente mañana de febrero en que Beatriz Viterbo murió, después de una imperiosa agonía que no se rebajó un solo instante ni al sentimentalismo ni al miedo, noté que las carteleras de fierro de la Plaza Constitución habían renovado no sé qué aviso de cigarrillos rubios</description>
</entry>
</entry>
Line 19: Line 19:
<date>1949</date>
<date>1949</date>
<publisher>Argentina</publisher>
<publisher>Argentina</publisher>
<icon></icon>
<icon>BorgesJorgeLuis-LacasadelAsterion-thumb.svg</icon>
<description>Sé que me acusan de soberia, y tal vez de misantropía, y tal vez de locura. Tales acusaciones (que yo casticaré a su debido tiempo) son irrisorias.</description>
<description>Sé que me acusan de soberia, y tal vez de misantropía, y tal vez de locura. Tales acusaciones (que yo casticaré a su debido tiempo) son irrisorias.</description>
</entry>
</entry>
</library>
</library>
</pre>
</pre>

==Elements and Attributes==
The <tt>library.xml</tt> file contains the following elements and attributes:

; <tt><library name=""></tt> : <tt>library</tt> is the root element that defines the collection. <tt>name</tt> refers to the name of the collection-- in this case, "Cuentos de Argentina."

; <tt><entry url=""></tt> : The <tt>entry</tt> element contains the metadata for a single item in a collection. <tt>url</tt> refers to the url for that item.

; <tt>title</tt> ''(optional)'': The <tt>title</tt> element contains the item's title.

; <tt>author</tt> ''(optional)'': The <tt>author</tt> element contains the item's author.

; <tt>language</tt> ''(optional)'': The <tt>language</tt> element contains the item's language.

; <tt>date</tt> ''(optional)'': The <tt>date</tt> element contains the item's date of composition/creation or publication/release.

; <tt>publisher</tt> ''(optional)'': The <tt>publisher</tt> element contains the item's publisher.

; <tt>icon</tt> ''(optional)'': The <tt>icon</tt> element contains the filename of the thumbnail image that is displayed next to the item's library listing.

; <tt>description</tt> ''(optional)'': The <tt>description</tt> element contains the item's description.

Revision as of 19:45, 17 July 2007

Here is a sample library.xml file for a 2-book collection, "Curentos de Argentina":

<?xml version="1.0" encoding="ISO-8859-1"?>
<library name="Cuentos de Argentina">
	<entry url="argentina-pdfs/borges_elaleph.pdf">
		<title>El Aleph [PDF]</title>
		<author>Jorge Luis Borges</author>
		<language>Español</language>
		<date>1949</date>
		<publisher>Argentina</publisher>
		<icon>argentina-pdfs/borges_elaleph-thumb.svg</icon>
		<description>La candente mañana de febrero en que Beatriz Viterbo murió, después de una imperiosa agonía que no se rebajó un solo instante ni al sentimentalismo ni al miedo, noté que las carteleras de fierro de la Plaza Constitución habían renovado no sé qué aviso de cigarrillos rubios</description>
	</entry>
	<entry url="argentina-pdfs/BorgesJorgeLuis-LacasadelAsterion.pdf">
		<title>La Casa de Asterión [PDF]</title>
		<author>Jorge Luis Borges</author>
		<language>Español</language>
		<date>1949</date>
		<publisher>Argentina</publisher>
		<icon>BorgesJorgeLuis-LacasadelAsterion-thumb.svg</icon>
		<description>Sé que me acusan de soberia, y tal vez de misantropía, y tal vez de locura.  Tales acusaciones (que yo casticaré a su debido tiempo) son irrisorias.</description>
	</entry>
</library>

Elements and Attributes

The library.xml file contains the following elements and attributes:

<library name="">
library is the root element that defines the collection. name refers to the name of the collection-- in this case, "Cuentos de Argentina."
<entry url="">
The entry element contains the metadata for a single item in a collection. url refers to the url for that item.
title (optional)
The title element contains the item's title.
author (optional)
The author element contains the item's author.
language (optional)
The language element contains the item's language.
date (optional)
The date element contains the item's date of composition/creation or publication/release.
publisher (optional)
The publisher element contains the item's publisher.
icon (optional)
The icon element contains the filename of the thumbnail image that is displayed next to the item's library listing.
description (optional)
The description element contains the item's description.