Re: DOCBOOK-APPS: Re: Open ebook conversions

2003-02-18 Thread Baráth Gábor


Norman Walsh írta:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

/ Bill Lawrence [EMAIL PROTECTED] 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=isbnxsl:value-of 
select=bookinfo/isbn//dc:Identifier
   dc:Titlexsl: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=idxsl:value-of select=@id//xsl:attribute
xsl:attribute name=hrefxsl: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




Re: DOCBOOK-APPS: Re: Open ebook conversions

2003-02-18 Thread Jirka Kosek
Barth Gbor wrote:

 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.

You can look into htmlhelp/htmlhelp-common.xsl to templates in
mode=enumerate-images. They can extract all image filenames used in
document.

Similary html/manifest.xsl contains code that is able to produce list of
filenames of all generated HTML pages. 

If there is a real need of eBook generation I can make templates more
general, so they can create input for both current use and also for
eBook manifest file.

In that case, could you point me to some documentation for eBook and
pleae also fill RFE, so request is not lost.

Jirka

-- 
-
  Jirka Kosek
  e-mail: [EMAIL PROTECTED]
  http://www.kosek.cz



DOCBOOK-APPS: Re: Open ebook conversions

2003-02-17 Thread Norman Walsh
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

/ Bill Lawrence [EMAIL PROTECTED] 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? The XHTML stylesheets will
probably get you most of the way there. If you have suggestions for
improvements, please let us know.


Be seeing you,
  norm

- -- 
Norman Walsh [EMAIL PROTECTED]  | When we reduce our own liberties
http://www.oasis-open.org/docbook/ | to stop terrorism, the terrorists
Chair, DocBook Technical Committee | have already won.--Reverius
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 http://mailcrypt.sourceforge.net/

iD8DBQE+UVsIOyltUcwYWjsRAvm1AJ4h8A1hLjY8/7cKtQMwjgB3ZJqi5QCfSTy5
AnCY1PjFXANL+bCE6wzBY68=
=T64g
-END PGP SIGNATURE-