[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Re: Open ebook conversions
Norman Walsh írta: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > / Bill Lawrence <scribe@matrixplus.com> was heard to say: > | Does anyone know of existing conversion scripts to transform Docbook > | into Open eBook? > > No. Open eBook is a subset of XHTML, right? This is not correct. OEB has two parts: 1. opf: meta information (dublincore, reading order, manifest, etc) 2. content: this is an xhtml webpage or pages with pictures and css. With the docbook stylesheets you can create second one. > The XHTML stylesheets will > probably get you most of the way there. If you have suggestions for > improvements, please let us know. Here is very simple stylesheet that demonstrates, how can you create the opf file. You have to add the filename and ids for pictures after the transformation. I'm sorry but i wrote this file only for proove the possibility creating microsoft reader file (lit) from the same source. Maybe it can be good for start. Gabor --------------------------------------------------------------- <?xml version="1.0"?> <!-- Open e-book package file generator xsl very early version --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes" doctype-system="http://openebook.org/dtds/oeb-1.2/oebpkg12.dtd" doctype-public="+//ISBN 0-9673008-1-9//DTD OEB 1.2 Package//EN" encoding="utf-8"/> <!-- fixme!! this must be the root element --> <xsl:template match="book"> <package> <!-- dublin core metadata add more dc:... author date etc. --> <metadata> <dc-metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oebpackage="http://openebook.org/namespaces/oeb-package/1.0/"> <!-- fixme!! this must be the root element's info --> <dc:Identifier scheme="isbn"><xsl:value-of select="bookinfo/isbn"/></dc:Identifier> <dc:Title><xsl:value-of select="bookinfo/title"/></dc:Title> </dc-metadata> </metadata> <manifest> <!-- i have no idea to decide what is the name of the single xhtml file, but in the other hand chunk.xsl knows ... maybe someone can write another xsl based on xhtml/chunk.xsl... --> <item id="book" href=".xhtml" media-type="text/x-oeb1-document"/> <xsl:apply-templates mode="manifest"/> </manifest> <spine> <itemref idref="book"/> </spine> </package> </xsl:template> <!-- manifest --> <xsl:template match="graphic|imagedata" mode="manifest"> <item> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="href"><xsl:value-of select="@fileref"/></xsl:attribute> <xsl:attribute name="media-type">.</xsl:attribute> </item> </xsl:template> <xsl:template match="text()" mode="manifest"> </xsl:template> </xsl:stylesheet>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC