On Jun 11, 2012, at 12:21 AM, Hans Hagen wrote: >> The validator likes it, next is the hard part: generating a valid xhtml. Is >> the xhtml generator only for the epub, i.e. can it be changed or is another >> output file just for the epub appropriate? > > the only issue is that css has no method for mapping a link which is why the > exporter produces two files (xml and xhtml)
I get an error by the epub validator if I feed it the generated epub. The content file is: -START------------ <?xml version='1.0' encoding='UTF-8' standalone='yes' ?> <!-- input filename : test_00 --> <!-- processing date : Mon Jun 11 07:03:39 2012 --> <!-- context version : 2012.06.11 00:21 --> <!-- exporter version : 0.30 --> <document xmlns:m="http://www.w3.org/1998/Math/MathML" version="0.30" language="de" date="Mon Jun 11 07:03:39 2012" file="test_00" context="2012.06.11 00:21" xmlns:xhtml="http://www.w3.org/1999/xhtml"> Hello world! </document> -END------------ the error is: -START------------ Epubcheck Version 3.0b5 Validating against EPUB version 2.0 ERROR: test_00.epub/OEBPS/test_00.xhtml(9,202): elements from namespace "" are not allowed Check finished with warnings or errors -END------------ A possible validatable file would be -START------------ <?xml version="1.0" encoding="UTF-8" ?> <!-- input filename : test_00 --> <!-- processing date : Sat Jun 9 14:36:39 2012 --> <!-- context version : 2012.06.09 01:22 --> <!-- exporter version : 0.30 --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>TITLE</title> </head> <body> <div id="test_00"> Hello world! </div> </body> </html> -END------------ It just wraps the filename without extension in title plus head and the main part in body plus a div. However, I did not try, yet, how many or which devices can read it just fine. > >> Calibre is already happy with it and shows it just fine. Please note that >> some ebook readers (e.g. apple devices, calibre) have a nasty caching >> mechanism. If you want to see the new changes, I found that it is best to >> delete the old book before replacing it. >> >> Andy >> >> https://dl.dropbox.com/u/9089117/mtx-epub_4.lua > > xmlns + doctype is probably a bit over the top for the coverpage I slavishly follow the mandatory epub specification and then add some things to make common devices work. Calibre, Adobe Digital Editions and Apple devices want a xhtml cover page in a very special way and ignore the cover image otherwise. The next thing I would add is a toc.xhtml. Here, a Kindle ignores the toc.ncx and wants a html toc as well. Unfortunately, this blows up mtx-epub, but at least that is the last issue with reading devices that I know. Andy ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________