aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-07-15 18:48:40 -0400
committerRalph Amissah <ralph@amissah.com>2014-07-15 18:48:40 -0400
commitd8917347b5dbadd17510c417bedd2fbf61dbf67c (patch)
tree1f5073254e95f8e67c872cdb160e37b8871dffce /lib
parentv5 v6: docbook, images, and adjustment (diff)
v5 v6: docbook, css (needs work), also doc header, sisu processing info
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v5/css.rb9
-rw-r--r--lib/sisu/v5/sysenv.rb17
-rw-r--r--lib/sisu/v5/xml_docbook5.rb4
-rw-r--r--lib/sisu/v6/css.rb9
-rw-r--r--lib/sisu/v6/sysenv.rb17
-rw-r--r--lib/sisu/v6/xml_docbook5.rb4
6 files changed, 52 insertions, 8 deletions
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
<<WOK
/* SiSU css docbook.xml default style */
book {
diff --git a/lib/sisu/v5/sysenv.rb b/lib/sisu/v5/sysenv.rb
index 35d128f6..5c399564 100644
--- a/lib/sisu/v5/sysenv.rb
+++ b/lib/sisu/v5/sysenv.rb
@@ -6912,7 +6912,7 @@ WOK
def xml_dom
'dom.css'
end
- def docbook_xml
+ def xml_docbook
'docbook.css'
end
def homepage
@@ -6973,13 +6973,13 @@ WOK
else SiSU_Env::CSS_Default.new.xml_dom
end
end
- def docbook_xml
+ def xml_docbook
if @md.doc_css \
and FileTest.file?("#{@env.path.output}/#{@env.path.style}/#{@md.doc_css}_docbook.css")
"#{@md.doc_css}_xml_dom.css"
elsif FileTest.file?("#{@env.path.output}/#{@env.path.style}/#{@env.path.base_markup_dir_stub}_docbook.css")
"#{@env.path.base_markup_dir_stub}_docbook.css"
- else SiSU_Env::CSS_Default.new.docbook_xml
+ else SiSU_Env::CSS_Default.new.xml_docbook
end
end
def homepage
@@ -7029,6 +7029,10 @@ WOK
stylesheet="#{@file.path_rel_links.xml_css}#{@env.path.style}/#{@css.xml_dom}"
%{<?xml-stylesheet type="text/css" href="#{stylesheet}"?>}
end
+ def xml_docbook
+ stylesheet="#{@file.path_rel_links.xml_css}#{@env.path.style}/#{@css.xml_docbook}"
+ %{<?xml-stylesheet type="text/css" href="#{stylesheet}"?>}
+ 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
<?xml version="1.0" encoding="utf-8"?>
+#{stylesheet.css_head_xml}
+#{rdf.comment_xml}
<book xmlns="http://docbook.org/ns/docbook"
xmlns:xl="http://www.w3.org/1999/xlink"
version="5.0">
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
<<WOK
/* SiSU css docbook.xml default style */
book {
diff --git a/lib/sisu/v6/sysenv.rb b/lib/sisu/v6/sysenv.rb
index ec4dbb9e..27927edd 100644
--- a/lib/sisu/v6/sysenv.rb
+++ b/lib/sisu/v6/sysenv.rb
@@ -6912,7 +6912,7 @@ WOK
def xml_dom
'dom.css'
end
- def docbook_xml
+ def xml_docbook
'docbook.css'
end
def homepage
@@ -6973,13 +6973,13 @@ WOK
else SiSU_Env::CSS_Default.new.xml_dom
end
end
- def docbook_xml
+ def xml_docbook
if @md.doc_css \
and FileTest.file?("#{@env.path.output}/#{@env.path.style}/#{@md.doc_css}_docbook.css")
"#{@md.doc_css}_xml_dom.css"
elsif FileTest.file?("#{@env.path.output}/#{@env.path.style}/#{@env.path.base_markup_dir_stub}_docbook.css")
"#{@env.path.base_markup_dir_stub}_docbook.css"
- else SiSU_Env::CSS_Default.new.docbook_xml
+ else SiSU_Env::CSS_Default.new.xml_docbook
end
end
def homepage
@@ -7029,6 +7029,10 @@ WOK
stylesheet="#{@file.path_rel_links.xml_css}#{@env.path.style}/#{@css.xml_dom}"
%{<?xml-stylesheet type="text/css" href="#{stylesheet}"?>}
end
+ def xml_docbook
+ stylesheet="#{@file.path_rel_links.xml_css}#{@env.path.style}/#{@css.xml_docbook}"
+ %{<?xml-stylesheet type="text/css" href="#{stylesheet}"?>}
+ 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
<?xml version="1.0" encoding="utf-8"?>
+#{stylesheet.css_head_xml}
+#{rdf.comment_xml}
<book xmlns="http://docbook.org/ns/docbook"
xmlns:xl="http://www.w3.org/1999/xlink"
version="5.0">