From d8917347b5dbadd17510c417bedd2fbf61dbf67c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 15 Jul 2014 18:48:40 -0400 Subject: v5 v6: docbook, css (needs work), also doc header, sisu processing info --- data/doc/sisu/CHANGELOG_v5 | 2 ++ data/doc/sisu/CHANGELOG_v6 | 2 ++ lib/sisu/v5/css.rb | 9 ++++++++- lib/sisu/v5/sysenv.rb | 17 ++++++++++++++--- lib/sisu/v5/xml_docbook5.rb | 4 ++++ lib/sisu/v6/css.rb | 9 ++++++++- lib/sisu/v6/sysenv.rb | 17 ++++++++++++++--- lib/sisu/v6/xml_docbook5.rb | 4 ++++ 8 files changed, 56 insertions(+), 8 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5 index f140442d..b797dc52 100644 --- a/data/doc/sisu/CHANGELOG_v5 +++ b/data/doc/sisu/CHANGELOG_v5 @@ -50,6 +50,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.5.1.orig.tar.xz * code & other block markup * url links, urls * images, an adjustment + * css (needs work) + * document header, sisu processing info %% 5.5.0.orig.tar.xz (2014-07-11:27/5) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_5.5.0 diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6 index 596e7afc..6c5da447 100644 --- a/data/doc/sisu/CHANGELOG_v6 +++ b/data/doc/sisu/CHANGELOG_v6 @@ -40,6 +40,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.1.1.orig.tar.xz * code & other block markup * url links, urls * images, an adjustment + * css (needs work) + * document header, sisu processing info %% 6.1.0.orig.tar.xz (2014-07-11:27/5) http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_6.1.0 diff --git a/lib/sisu/v5/css.rb b/lib/sisu/v5/css.rb index 676290d8..50e80f5b 100644 --- a/lib/sisu/v5/css.rb +++ b/lib/sisu/v5/css.rb @@ -104,6 +104,8 @@ module SiSU_Style css_path.xml_sax when 'xml_dom' css_path.xml_dom + when 'xml_docbook' + css_path.xml_docbook else css_embed_content.html end @@ -150,6 +152,11 @@ module SiSU_Style style << css.xml_dom style.close css_path.xml_dom + when 'xml_docbook' + style=File.new("#{css_pth}/#{@fn_css.xml_docbook}",'w') + style << css.xml_docbook + style.close + css_path.xml_docbook end end end @@ -3122,7 +3129,7 @@ WOK br { display: block; } WOK end - def docbook_xml #stylesheet for docbook + def xml_docbook #stylesheet for docbook <} end + def xml_docbook + stylesheet="#{@file.path_rel_links.xml_css}#{@env.path.style}/#{@css.xml_docbook}" + %{} + end end class CreateSite < InfoEnv require_relative 'css' # css.rb @@ -7187,6 +7191,13 @@ WOK style.close end if @cmd =~/C/ \ + or (@cmd =~/[xX]/ \ + and not FileTest.file?("#{path_style}/#{fn_css.xml_docbook}")) + style=File.new("#{path_style}/#{fn_css.xml_docbook}",'w') + style << css.xml_docbook + style.close + end + if @cmd =~/C/ \ or (@cmd =~/[b]/ \ and not FileTest.file?("#{path_style}/#{fn_css.xhtml}")) style=File.new("#{path_style}/#{fn_css.xhtml}",'w') diff --git a/lib/sisu/v5/xml_docbook5.rb b/lib/sisu/v5/xml_docbook5.rb index 7326c332..1ff3a96d 100644 --- a/lib/sisu/v5/xml_docbook5.rb +++ b/lib/sisu/v5/xml_docbook5.rb @@ -154,8 +154,12 @@ module SiSU_XML_Docbook_Book puts line if @md.opt.act[:verbose_plus][:set]==:on end def head + rdf=SiSU_XML_Tags::RDF.new(@md) + stylesheet=SiSU_Style::CSS_HeadInfo.new(@md,'xml_docbook').stylesheet <<-WOK +#{stylesheet.css_head_xml} +#{rdf.comment_xml} diff --git a/lib/sisu/v6/css.rb b/lib/sisu/v6/css.rb index 81cb115b..d4363306 100644 --- a/lib/sisu/v6/css.rb +++ b/lib/sisu/v6/css.rb @@ -104,6 +104,8 @@ module SiSU_Style css_path.xml_sax when 'xml_dom' css_path.xml_dom + when 'xml_docbook' + css_path.xml_docbook else css_embed_content.html end @@ -150,6 +152,11 @@ module SiSU_Style style << css.xml_dom style.close css_path.xml_dom + when 'xml_docbook' + style=File.new("#{css_pth}/#{@fn_css.xml_docbook}",'w') + style << css.xml_docbook + style.close + css_path.xml_docbook end end end @@ -3122,7 +3129,7 @@ WOK br { display: block; } WOK end - def docbook_xml #stylesheet for docbook + def xml_docbook #stylesheet for docbook <} end + def xml_docbook + stylesheet="#{@file.path_rel_links.xml_css}#{@env.path.style}/#{@css.xml_docbook}" + %{} + end end class CreateSite < InfoEnv require_relative 'css' # css.rb @@ -7187,6 +7191,13 @@ WOK style.close end if @cmd =~/C/ \ + or (@cmd =~/[xX]/ \ + and not FileTest.file?("#{path_style}/#{fn_css.xml_docbook}")) + style=File.new("#{path_style}/#{fn_css.xml_docbook}",'w') + style << css.xml_docbook + style.close + end + if @cmd =~/C/ \ or (@cmd =~/[b]/ \ and not FileTest.file?("#{path_style}/#{fn_css.xhtml}")) style=File.new("#{path_style}/#{fn_css.xhtml}",'w') diff --git a/lib/sisu/v6/xml_docbook5.rb b/lib/sisu/v6/xml_docbook5.rb index a1854cdb..fb1ec342 100644 --- a/lib/sisu/v6/xml_docbook5.rb +++ b/lib/sisu/v6/xml_docbook5.rb @@ -154,8 +154,12 @@ module SiSU_XML_Docbook_Book puts line if @md.opt.act[:verbose_plus][:set]==:on end def head + rdf=SiSU_XML_Tags::RDF.new(@md) + stylesheet=SiSU_Style::CSS_HeadInfo.new(@md,'xml_docbook').stylesheet <<-WOK +#{stylesheet.css_head_xml} +#{rdf.comment_xml} -- cgit v1.2.3