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 --- 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 ++++ 6 files changed, 52 insertions(+), 8 deletions(-) (limited to 'lib') 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