Keith Fahlgren [Sun, 1 Jun 2008 20:18:18 +0000 (20:18 +0000)]
Very primitive Windows support for dbtoepub reference implementation; README for running tests and for the .epub target in general; shorter realbook test document (still fails for now)
Keith Fahlgren [Tue, 15 Apr 2008 03:19:23 +0000 (03:19 +0000)]
== General epub test support
$ spec -O ~/.spec.opts spec/epub_spec.rb
DocBook::Epub
- should be able to be created
- should fail on a nonexistent file
- should be able to render to a file
- should create a file after rendering
- should have the correct mimetype after rendering
- should be valid .epub after rendering an article
- should be valid .epub after rendering an article without sections
- should be valid .epub after rendering a book
- should be valid .epub after rendering a book even if it has one graphic
- should be valid .epub after rendering a book even if it has many graphics
- should be valid .epub after rendering a book even if it has many duplicated graphics
- should report an empty file as invalid
- should confirm that a valid .epub file is valid
- should not include PDFs in rendered epub files as valid image inclusions
- should include a TOC link in rendered epub files for <book>s
Finished in 20.608395 seconds
15 examples, 0 failures
== Verbose epub test coverage against _all_ of the testdocs
Fails on only (errors truncated):
1)
'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/calloutlist.003.xml [30]' FAILED
expected .epub file to be valid, but validation produced these errors:
/tmp/epubspecsmoke/calloutlist.003.epub: could not parse OEBPS/index.html: duplicate id: dos
2)
'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/cmdsynopsis.001.xml [35]' FAILED
expected .epub file to be valid, but validation produced these errors:
/tmp/epubspecsmoke/cmdsynopsis.001.epub/OEBPS/re01.html(5): element "p" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context
3)
'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/cmdsynopsis.002.xml [36]' FAILED
expected .epub file to be valid, but validation produced these errors:
/tmp/epubspecsmoke/cmdsynopsis.002.epub/OEBPS/index.html(4): element "div" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context
4)
'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/extensions.002.xml [50]' FAILED
expected .epub file to be valid, but validation produced these errors:
/tmp/epubspecsmoke/extensions.002.epub/OEBPS/index.html(3): attribute "type" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
/tmp/epubspecsmoke/extensions.002.epub/OEBPS/index.html(3): attribute "show" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
/tmp/epubspecsmoke/extensions.002.epub/OEBPS/index.html(3): attribute "actuate" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
5)
'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/extensions.004.xml [52]' FAILED
expected .epub file to be valid, but validation produced these errors:
/tmp/epubspecsmoke/extensions.004.epub/OEBPS/index.html(5): attribute "type" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
/tmp/epubspecsmoke/extensions.004.epub/OEBPS/index.html(5): attribute "show" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
/tmp/epubspecsmoke/extensions.004.epub/OEBPS/index.html(5): attribute "actuate" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
6)
'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/funcsynopsis.001.xml [65]' FAILED
expected .epub file to be valid, but validation produced these errors:
/tmp/epubspecsmoke/funcsynopsis.001.epub/OEBPS/index.html(5): element "code" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context
7)
'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/imageobjectco.001.xml [70]' FAILED
expected .epub file to be valid, but validation produced these errors:
/tmp/epubspecsmoke/imageobjectco.001.epub/OEBPS/index.html(3): attribute "border" not allowed at this point; ignored
8)
'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/olink.001.xml [118]' FAILED
expected .epub file to be valid, but validation produced these errors:
/tmp/epubspecsmoke/olink.001.epub/OEBPS/index.html(3): 'OEBPS/file:///sourceforge/projects/docbook/testdocs/tests/olink.001.html': referenced resource missing in the package
9)
'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/programlisting.002.xml [129]' FAILED
expected .epub file to be valid, but validation produced these errors:
/tmp/epubspecsmoke/programlisting.002.epub/OEBPS/index.html(3): attribute "type" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
/tmp/epubspecsmoke/programlisting.002.epub/OEBPS/index.html(3): attribute "show" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
/tmp/epubspecsmoke/programlisting.002.epub/OEBPS/index.html(3): attribute "actuate" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
10)
RuntimeError in 'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/programlisting.006.xml [133]'
Could not render as .epub to /tmp/epubspecsmoke/programlisting.006.epub (xsltproc --xinclude --stringparam chunk.quietly 1 --stringparam callout.graphics.path images/callouts/ --stringparam callout.graphics.number.limit 15 --stringparam callout.graphics.extension .png --stringparam base.dir /tmp/epubspecsmoke/OEBPS/ --stringparam epub.metainf.dir /tmp/epubspecsmoke/META-INF/ --stringparam epub.oebps.dir /tmp/epubspecsmoke/OEBPS/ /Users/keith/work/docbook-dev/trunk/xsl/epub/docbook.xsl /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/programlisting.006.xml)
11)
RuntimeError in 'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/programlistingco.002.xml [135]'
Could not render as .epub to /tmp/epubspecsmoke/programlistingco.002.epub (xsltproc --xinclude --stringparam chunk.quietly 1 --stringparam callout.graphics.path images/callouts/ --stringparam callout.graphics.number.limit 15 --stringparam callout.graphics.extension .png --stringparam base.dir /tmp/epubspecsmoke/OEBPS/ --stringparam epub.metainf.dir /tmp/epubspecsmoke/META-INF/ --stringparam epub.oebps.dir /tmp/epubspecsmoke/OEBPS/ /Users/keith/work/docbook-dev/trunk/xsl/epub/docbook.xsl /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/programlistingco.002.xml)
12)
'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/refentry.007.xml [148]' FAILED
expected .epub file to be valid, but validation produced these errors:
/tmp/epubspecsmoke/refentry.007.epub/OEBPS/rn01re01.html(5): element "code" from namespace "http://www.w3.org/1999/xhtml" not allowed in this context
13)
'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/table.003.xml [191]' FAILED
expected .epub file to be valid, but validation produced these errors:
/tmp/epubspecsmoke/table.003.epub/OEBPS/index.html(4): 'ftn.id964170': fragment identifier is not defined in 'OEBPS/index.html'
14)
'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/textobject.001.xml [207]' FAILED
expected .epub file to be valid, but validation produced these errors:
/tmp/epubspecsmoke/textobject.001.epub/OEBPS/index.html(3): attribute "type" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
/tmp/epubspecsmoke/textobject.001.epub/OEBPS/index.html(3): attribute "show" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
/tmp/epubspecsmoke/textobject.001.epub/OEBPS/index.html(3): attribute "actuate" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
15)
'DocBook::Epub should be able to render a valid .epub for the test document /Users/keith/work/docbook-dev/trunk/xsl/epub/bin/spec/testdocs/textobject.002.xml [208]' FAILED
expected .epub file to be valid, but validation produced these errors:
/tmp/epubspecsmoke/textobject.002.epub/OEBPS/index.html(3): attribute "type" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
/tmp/epubspecsmoke/textobject.002.epub/OEBPS/index.html(3): attribute "show" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
/tmp/epubspecsmoke/textobject.002.epub/OEBPS/index.html(3): attribute "actuate" from namespace "http://www.w3.org/1999/xlink" not allowed at this point; ignored
Added a function that quotes parameter values (to ensure that they are interpreted as strings).
Replaced deprecated functions from the string module with string methods.
Norman Walsh [Tue, 1 Apr 2008 15:02:33 +0000 (15:02 +0000)]
Don't use xsl:copy because it forces the resulting element to be in the same namespace as the source element; in the XHTML stylesheets, that's wrong. But the HTML-to-XHTML converter does the right thing with literal result elements, so use one of them.
Michael Smith [Thu, 27 Mar 2008 12:07:43 +0000 (12:07 +0000)]
Changed handling of hanging indents for cmdsynopsis, funcsynopsis,
and synopfragment such that they now look correct in non-TTY/PS
output. We now use the groff \w escape to hang by the actual width
-- in the current font -- of the command, funcdef, or
synopfragment references number (as opposed to hanging by the
number of characters). This rendering in TTY output remains the
same, since the width in monospaced TTY output is the same as the
number of characters.
Also, created new synopsis-block-start and synopsis-block-end
templates to use for cmdsynopsis and funcsynopsis instead of the
corresponding verbatim-* templates.
Along with those changes, also corrected a problem that caused the
content of synopfragment to be dropped, and made a
vertical-spacing change to adjust spacing around table titles and
among sibling synopfragment instances.
Michael Smith [Thu, 27 Mar 2008 03:24:26 +0000 (03:24 +0000)]
Added new template "l10.language.name" for retrieving the
English-language name of the lang setting of the current document.
Closes #1916837. Thanks to Simon Kennedy.
Michael Smith [Wed, 26 Mar 2008 06:13:59 +0000 (06:13 +0000)]
Added checks and hacks to various makefiles to enable building
under Cygwin. This stuff is ugly and maybe not worth the mess and
trouble, but does seem to work as expected and not break anything
else.
Michael Smith [Sun, 23 Mar 2008 04:37:37 +0000 (04:37 +0000)]
use XSLT method to determine version number from VERSION file
(instead of grep hack); also, use w3m as the default browser for
generating plain-text output from HTML (with GC_NPROCS=1 to
prevent it from hanging under OSX/Darwin)
Michael Smith [Sun, 23 Mar 2008 04:32:34 +0000 (04:32 +0000)]
added "exslt" namespace binding to html/docbook.xsl file (in
addition to existing "exsl" binding. reason is because lack of it
seems to cause processing problems when using the profiled
version of the stylsheet
Michael Smith [Fri, 21 Mar 2008 05:12:40 +0000 (05:12 +0000)]
in install.sh, replaced use of non-portable "readlink -f" with
combination of cd/dirname/pwd that has the same effect. This is a
partial fix for #1735710. Thanks to Ivan Vilata i Balaguer.