From: Keith Fahlgren Date: Sat, 10 Oct 2009 02:45:47 +0000 (+0000) Subject: Remove and elements "discouraged in favor of style sheets" from X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13e0661e2263f4a7df34111fe3644996b6f99339;p=docbook-dsssl Remove and elements "discouraged in favor of style sheets" from XHTML, XHTML 1.1 (and therefore EPUB) outputs by changing html2xhtml.xsl. Fixes bug #2873153: No and tags in XHTML/EPUB Added regression to EPUB specs: --- diff --git a/xsl/epub/bin/spec/epub_regressions_spec.rb b/xsl/epub/bin/spec/epub_regressions_spec.rb index 512f85bcf..2be252200 100755 --- a/xsl/epub/bin/spec/epub_regressions_spec.rb +++ b/xsl/epub/bin/spec/epub_regressions_spec.rb @@ -190,6 +190,31 @@ describe DocBook::Epub do opf_lns.to_s.should =~ /]*[^<]*]*>[^<]* or " do + begin + tmpdir = File.join(Dir::tmpdir(), "epubbtest"); Dir.mkdir(tmpdir) rescue Errno::EEXIST + + epub = DocBook::Epub.new(File.join(@testdocsdir, "book.002.xml"), @tmpdir) + epubfile = File.join(tmpdir, "bcount.epub") + epub.render_to_file(epubfile, $DEBUG) + FileUtils.copy(epubfile, ".b.epub") if $DEBUG + + success = system("unzip -q -d #{File.expand_path(tmpdir)} -o #{epubfile}") + raise "Could not unzip #{epubfile}" unless success + glob = Dir.glob(File.join(tmpdir, "**", "*.html")) + glob.each {|html_file| + bs = File.open(html_file).readlines.to_s.scan(//) + bs.should be_empty + is = File.open(html_file).readlines.to_s.scan(//) + is.should be_empty + } + rescue => e + raise e + ensure + FileUtils.rm_r(tmpdir, :force => true) + end + end + after(:all) do FileUtils.rm_r(@tmpdir, :force => true) end diff --git a/xsl/html/inline.xsl b/xsl/html/inline.xsl index dca5d188f..2a946cb7a 100644 --- a/xsl/html/inline.xsl +++ b/xsl/html/inline.xsl @@ -1331,7 +1331,7 @@ -

+

diff --git a/xsl/html/lists.xsl b/xsl/html/lists.xsl index 0ac08a55c..81558a916 100644 --- a/xsl/html/lists.xsl +++ b/xsl/html/lists.xsl @@ -426,24 +426,24 @@ - + - + - + - + - - + + - - + + diff --git a/xsl/xhtml-1_1/html2xhtml.xsl b/xsl/xhtml-1_1/html2xhtml.xsl index d12560504..050f33cac 100644 --- a/xsl/xhtml-1_1/html2xhtml.xsl +++ b/xsl/xhtml-1_1/html2xhtml.xsl @@ -232,6 +232,11 @@ + + + diff --git a/xsl/xhtml/html2xhtml.xsl b/xsl/xhtml/html2xhtml.xsl index 0de1517cb..135021027 100644 --- a/xsl/xhtml/html2xhtml.xsl +++ b/xsl/xhtml/html2xhtml.xsl @@ -164,6 +164,11 @@ + + +