From: <abd...@us...> - 2009-08-20 05:02:51
|
Revision: 8517 http://docbook.svn.sourceforge.net/docbook/?rev=8517&view=rev Author: abdelazer Date: 2009-08-20 05:02:22 +0000 (Thu, 20 Aug 2009) Log Message: ----------- Add more careful handling of refentries to ensure that they always appear in the opf:spine. This was only a problem when refentries were pushed deep into the hierarchy (like inside a sect2), but presented navigational problems for many reading systems (despite the correct NCX references). This may *not* be the best solution, but attacking a better chunking strategy for refentries was too big a nut to crack at this time. Modified Paths: -------------- trunk/xsl/epub/bin/spec/epub_regressions_spec.rb trunk/xsl/epub/bin/spec/files/orm.book.001.xml trunk/xsl/epub/docbook.xsl Modified: trunk/xsl/epub/bin/spec/epub_regressions_spec.rb =================================================================== --- trunk/xsl/epub/bin/spec/epub_regressions_spec.rb 2009-08-12 02:54:56 UTC (rev 8516) +++ trunk/xsl/epub/bin/spec/epub_regressions_spec.rb 2009-08-20 05:02:22 UTC (rev 8517) @@ -176,6 +176,12 @@ typed_index_epubfile.should be_valid_epub end + it "should include chunked refentries in the spine even when they're deeply nested" do + opf_lns = opf_lines('orm.book.001.xml', @filedir) + re01_id = opf_lns.to_s.sub(/.+<item id="([^"]+)" href="re01.html".+/m, '\1') + opf_lns.to_s.should =~ /<itemref idref="#{re01_id}"/ + end + after(:all) do FileUtils.rm_r(@tmpdir, :force => true) end Modified: trunk/xsl/epub/bin/spec/files/orm.book.001.xml =================================================================== --- trunk/xsl/epub/bin/spec/files/orm.book.001.xml 2009-08-12 02:54:56 UTC (rev 8516) +++ trunk/xsl/epub/bin/spec/files/orm.book.001.xml 2009-08-20 05:02:22 UTC (rev 8517) @@ -988,6 +988,8 @@ Txxxx xxx x xxxxxxx xxxxxx xxxx xxxxx xxx xxxxxxx xxxxxxx. Sxxxxx xxxx xxxxx xxx xxxx-xxxxxxxxx. Sx xxxxxxxxx xxx xxxxxxxxx xxxxxxx xxxxxx xxxxxxxxx xxxx xxxxxx xx xxxxxxxxx. Fxx x xxx xx xxx xxxxxx xxxx xxxxx, x xxxxxxx xxxxxx xxxxx xxx xx xxxxxxxxx. Ix x xxxxxx xx xxxxxxx xx x xxxxxx xxxx xxxxxxx xxx xxxxx xxx xxx xxx xxxxxx, xxx xxxxxx xxxx xx xxxxx-xxxxxxxxx xxxx xxxxxx. Bxxxxx xxxxxxx xxx xxxx-xxxxxxxxx. </para> <para>Bxxxx xx x xxxx xx xxxxxx xxxx xxxxx, xxxx’xx xxx xxxxxxxxx xxxxxxxxxxxxxx. Ixxxxxx, xxxx’xx xxxxxxxxx xx xxxxxxxxx xxxxx xxxxx xx xxx xxxx xx xxxxxx xxxxxx xxxx xxx xxxxxxx. Txx xxxx xxxx xxxxxxxx xxx xxxxx xx xxxxxxxxxx xx xxxxx xxx xxxx xxxx xxxx.</para> + <sect2> + <title>More wrapping</title> <refentry id="appa-77011"> <refmeta> <refentrytitle>CHAR</refentrytitle> @@ -1282,6 +1284,7 @@ </para> </refsect1> </refentry> + </sect2> </sect1> </appendix> <appendix id="mysqlian-APP-B"> Modified: trunk/xsl/epub/docbook.xsl =================================================================== --- trunk/xsl/epub/docbook.xsl 2009-08-12 02:54:56 UTC (rev 8516) +++ trunk/xsl/epub/docbook.xsl 2009-08-20 05:02:22 UTC (rev 8517) @@ -761,10 +761,10 @@ <!-- TODO: be nice to have a idref="titlepage" here --> <xsl:choose> <xsl:when test="$root.is.a.chunk != '0'"> - <xsl:apply-templates select="/*" mode="opf.spine"/> + <xsl:apply-templates select="/*|//refentry" mode="opf.spine"/> </xsl:when> <xsl:otherwise> - <xsl:apply-templates select="/*/*" mode="opf.spine"/> + <xsl:apply-templates select="/*/*|//refentry" mode="opf.spine"/> </xsl:otherwise> </xsl:choose> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |