From ed54eec3e902583086b06b365f1809bce8fe06d8 Mon Sep 17 00:00:00 2001 From: Keith Fahlgren Date: Tue, 15 Apr 2008 03:19:23 +0000 Subject: [PATCH] == 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 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 Finished in 629.89194 seconds 224 examples, 15 failures 224 examples, 15 failures yields 6% failure rate --- xsl/common/l10n.xsl | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/xsl/common/l10n.xsl b/xsl/common/l10n.xsl index 9d9eb4073..7fc142936 100644 --- a/xsl/common/l10n.xsl +++ b/xsl/common/l10n.xsl @@ -160,6 +160,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.40.0