Tool for XML to Mobipocket conversionNom del projecte
mobipoket (MyWay)
Tipo de projecte
Opensource
Client
UOCXML TO MOBIPOCKET
Conversion Tool XML in Mobipocket format, developed with XSLT 2.0.
mobiPocket sample: contes d'Andersen
Rename this file as .mobi and you can see it in a ebook device.
What is mobipocket?
It is an optimum format to be viewed on portable devices. There are players Mobipocket for Windows computers and devices with PalmOS and SymbianOS, Blackberry, plus books on electronic ink (iRex Iliad, Cybook, Bebook and Hanlin). Some of these players can adjust the font size to the needs of the reader, search, and even consult a dictionary. For a complete list of players you should consult the manufacturer's software download.
Introduction
This format is a bit special because after building all files that's part must be compiled with mobiepocket creator.
To get to build the materials used in this format and XSL mobiepocket creator.
Tools
Saxon 8.1
XSTL 2.0
How to create?
The creation process is very similar to Epub, unlike this once filtxers and created all the directories that form part mobipoket we compile everything with the software mobigen.exe (mobiepocket creator).
MobiPocket creation:
This format no need special directory structure. The files needed for build a mobipocket format are:
code_file.opf: The OPF (Open Publication Format) is a standard of the IDPF that defines how to make a publication for electronic reading devices. The .OPF file is an XML data file which describes two things: * The list of HTML content files in the publication ,The metadata of the eBook (Title, Author, Publisher, Cover, ...) in dublin core format.
This file is a part of the mobipocket format, which contains information about all elements that appear in the mobi format.
The file has the following structure:
<package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="assignaturaId">
<metadata xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/">
</metadata>
<manifest>
</manifest>
<spine>
</spine>
<guide>
</guide>
</package>
Within the metadata will tag metadata file that we created in Dublin Core format. Some of them are mandatory. To start working with these is enough:
<dc:title></dc:title>
<dc:publisher></dc:publisher>
<dc:language>ca</dc:language>
<dc:rights>OMAONK</dc:rights>
<dc:identifier id="assignaturaId">XX08_M2004_00603</dc:identifier>
<dc:creator>omaonk</dc:creator>
It is very important dc: identifier since it is the unique identifier mobipocket.
The Manifes tag contains a reference to anything that contains mobipocket, images and HTML files. Every file type that we should be associated with the media-type, the ID is also very important because each item must be identified with a unique value.
<manifest>
<item id="toc" href="mbp_toc.html" media-type="application/xhtml+xml"/>
<item id="main" href="main.html" media-type="application/xhtml+xml"/>
<item id="d28e1385" href="images/imatge1.gif" media-type="image/gif"/>
....
</manifest>
The tag spin refers to all the XHTML pages that are part of mobipocket, ie all XHTML pages that appeared to me the tag and want to be shown from within the linkables mobipocket.
<spine toc="ncx">
<itemref idref="main"/>
</spine>
The guide tag inside opf file, tells the divice how to read the mobipocket, for example:
<guide>
<reference type="toc" title="Table of Contents" href="mbp_toc.html"/>
<reference type="text" title="Informació" href="info.html"/>
<reference type="text" title="Introducció" href="introduccio.html"/>
<reference type="text" title="Objectius" href="objectius.html"/>
<reference type="text" title="Bibliografia" href="bibliografia.html"/>
<reference type="text" title="Modul 1" href="modul_1.html"/>
<reference type="text" title="Modul 2" href="modul_2.html"/>
<reference type="text" title="Modul 3" href="modul_3.html"/>
<reference type="text" title="Modul 4" href="modul_4.html"/>
<reference type="text" title="Modul 5" href="modul_5.html"/>
</guide>
The HTML files generated are in XHTML format, not oll the HTML tag are allowed. It's possible to add css files.
One optional file but very usefull is the mbp_toc.html: This file allow us to see the document structure is like the toc.ncx file in epub format.
<item id="toc" href="mbp_toc.html" media-type="application/xhtml+xml"/>
<reference type="toc" title="Table of Contents" href="mbp_toc.html"/>
After creating all files using XSLT 2.0 we have to compile with mobigen.exe, and thats all.
Contact ajuhe@omaonk.com.
Project customer
UOC
Interesting Links
Premis IMS Learning
MyWay
La Vanguardia - Los apuntes que se oyen