diff options
| author | Ralph Amissah <ralph@amissah.com> | 2011-02-15 20:44:41 -0500 | 
|---|---|---|
| committer | Ralph Amissah <ralph@amissah.com> | 2011-02-15 20:47:57 -0500 | 
| commit | 9a2448e9a3ba42bd9e84828908c0517379517d6d (patch) | |
| tree | ebc2c99c449846bd9e335ff2698066ae29fa15ac | |
| parent | sysenv, sisurc.yml & elsewhere as affected, output_dir_structure (conf & tests) (diff) | |
css, fix css paths for xhtml, xml dom & xml sax
| -rw-r--r-- | CHANGELOG_v3 | 2 | ||||
| -rw-r--r-- | data/doc/sisu/v3/CHANGELOG | 2 | ||||
| -rw-r--r-- | lib/sisu/v3/sysenv.rb | 23 | ||||
| -rw-r--r-- | lib/sisu/v3/xhtml.rb | 4 | ||||
| -rw-r--r-- | lib/sisu/v3/xml.rb | 4 | ||||
| -rw-r--r-- | lib/sisu/v3/xml_dom.rb | 4 | 
6 files changed, 32 insertions, 7 deletions
| diff --git a/CHANGELOG_v3 b/CHANGELOG_v3 index 29b944c3..35f511ad 100644 --- a/CHANGELOG_v3 +++ b/CHANGELOG_v3 @@ -22,6 +22,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.1.orig.tar.gz    * sysenv, sisurc.yml and elsewhere as affected, output_dir_structure:      by_language_code; by_filetype; by_filename +  * css, fix css paths for xhtml, xml dom & xml sax +    * console feedback on selected files being processed, updates & fixes    * sysenv & sisurc.yml: libreoffice, default odf reader diff --git a/data/doc/sisu/v3/CHANGELOG b/data/doc/sisu/v3/CHANGELOG index 268733fe..57ff8869 100644 --- a/data/doc/sisu/v3/CHANGELOG +++ b/data/doc/sisu/v3/CHANGELOG @@ -22,6 +22,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.1.orig.tar.gz    * sysenv, sisurc.yml and elsewhere as affected, output_dir_structure:      by_language_code; by_filetype; by_filename +  * css, fix css paths for xhtml, xml dom & xml sax +    * console feedback on selected files being processed, updates & fixes    * sysenv & sisurc.yml: libreoffice, default odf reader diff --git a/lib/sisu/v3/sysenv.rb b/lib/sisu/v3/sysenv.rb index c3d16778..a7105d69 100644 --- a/lib/sisu/v3/sysenv.rb +++ b/lib/sisu/v3/sysenv.rb @@ -2911,7 +2911,7 @@ WOK            '/'          end        end -      def html_scroll_css +      def default_output_css          if @env.output_dir_structure.by_language_code?            '../../'          elsif @env.output_dir_structure.by_filetype? @@ -2920,6 +2920,15 @@ WOK            '../'          end        end +      def html_scroll_css +        default_output_css +      end +      def xhtml_css +        default_output_css +      end +      def xml_css +        default_output_css +      end        def html_seg_css          if @env.output_dir_structure.by_language_code?            '../../../' @@ -3877,6 +3886,18 @@ WOK      def xhtml_epub        %{  <link rel="stylesheet" href="css/xhtml.css" type="text/css" />}      end +    def epub +      xhtml_epub +    end +    def xhtml +      %{<?xml-stylesheet type="text/css" href="#{@file.path_rel_links.xhtml_css}#{@env.path.style}/#{@css.xhtml}"?>} +    end +    def xml_sax +      %{<?xml-stylesheet type="text/css" href="#{@file.path_rel_links.xml_css}#{@env.path.style}/#{@css.xml_sax}"?>} +    end +    def xml_dom +      %{<?xml-stylesheet type="text/css" href="#{@file.path_rel_links.xml_css}#{@env.path.style}/#{@css.xml_dom}"?>} +    end    end    class Create_site < Info_env      require "#{SiSU_lib}/css"                              # css.rb diff --git a/lib/sisu/v3/xhtml.rb b/lib/sisu/v3/xhtml.rb index 8710f2da..b1855653 100644 --- a/lib/sisu/v3/xhtml.rb +++ b/lib/sisu/v3/xhtml.rb @@ -353,11 +353,11 @@ WOK          rdf=SiSU_XML_tags::RDF.new(@md)          dir=SiSU_Env::Info_env.new          @@xml[:head],@@xml[:body]=[],[] -        css=SiSU_Env::CSS_select.new(@md).xhtml +        css=SiSU_Env::CSS_stylesheet.new(@md)          encoding=(@sys.locale =~/utf-?8/i) ? '<?xml version="1.0" encoding="UTF-8" standalone="no"?>' : '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>'          @@xml[:open] =<<WOK  #{encoding} -<?xml-stylesheet type="text/css" href="../#{@env.path.style}/#{css}"?> +#{css.xhtml}  #{rdf.comment_xml}  <document>  WOK diff --git a/lib/sisu/v3/xml.rb b/lib/sisu/v3/xml.rb index 5dfd6e7b..a3767177 100644 --- a/lib/sisu/v3/xml.rb +++ b/lib/sisu/v3/xml.rb @@ -392,13 +392,13 @@ WOK          rdf=SiSU_XML_tags::RDF.new(@md)          dir=SiSU_Env::Info_env.new          @@xml[:head],@@xml[:body]=[],[] -        css=SiSU_Env::CSS_select.new(@md).xml_sax +        css=SiSU_Env::CSS_stylesheet.new(@md)          encoding=if @sys.locale =~/utf-?8/i; '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'          else                                 '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>'          end          @@xml[:open] =<<WOK  #{encoding} -<?xml-stylesheet type="text/css" href="../#{dir.path.style}/#{css}"?> +#{css.xml_sax}  #{rdf.comment_xml}  <document>  WOK diff --git a/lib/sisu/v3/xml_dom.rb b/lib/sisu/v3/xml_dom.rb index 0fe44836..726e48d5 100644 --- a/lib/sisu/v3/xml_dom.rb +++ b/lib/sisu/v3/xml_dom.rb @@ -467,13 +467,13 @@ WOK        def pre          rdf=SiSU_XML_tags::RDF.new(@md)          dir=SiSU_Env::Info_env.new -        css=SiSU_Env::CSS_select.new(@md).xml_dom +        css=SiSU_Env::CSS_stylesheet.new(@md)          encoding=if @sys.locale =~/utf-?8/i; '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'          else                                 '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>'          end          @@xml[:open] =<<WOK  #{encoding} -<?xml-stylesheet type="text/css" href="../#{dir.path.style}/#{css}"?> +#{css.xml_dom}  #{rdf.comment_xml}  <document>  WOK | 
