From bdc8fb1810ad1295ebedca29926bc58481e1dd24 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 26 Jul 2011 20:10:12 -0400 Subject: v3: xmls (sax, dom, xhtml) use of tidy, correct output location --- data/doc/sisu/CHANGELOG_v3 | 2 ++ lib/sisu/v3/xhtml.rb | 8 ++++---- lib/sisu/v3/xml.rb | 8 ++++---- lib/sisu/v3/xml_dom.rb | 8 ++++---- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index ff837c06..db069a13 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -25,6 +25,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.14.orig.tar.gz * param, cleanup setting of auto endnotes + * xmls (sax, dom, xhtml) use of xml tidy, correct output file location + * urls, --concordance %% 3.0.13.orig.tar.gz (2011-06-26:25/7) diff --git a/lib/sisu/v3/xhtml.rb b/lib/sisu/v3/xhtml.rb index ba8238d2..03415280 100644 --- a/lib/sisu/v3/xhtml.rb +++ b/lib/sisu/v3/xhtml.rb @@ -107,7 +107,7 @@ module SiSU_XHTML def song begin SiSU_XHTML::Source::Scroll.new(@particulars).songsheet - SiSU_XHTML::Source::Tidy.new(@md,@env).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use + SiSU_XHTML::Source::Tidy.new(@md,@file.place_file.xhtml.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use SiSU_Rexml::Rexml.new(@md,@file.place_file.xhtml.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error ensure @@ -395,8 +395,8 @@ WOK end end class Tidy - def initialize(md,dir) - @md,@env=md,dir + def initialize(md,file) + @md,@file=md,file @prog=SiSU_Env::Info_program.new end def xml @@ -408,7 +408,7 @@ WOK tell.grey_open end tidyfile='/dev/null' #don't want one or screen output, check for alternative flags - tidy=SiSU_Env::System_call.new("#{@env.path.output}/#{@md.fnb}/#{@md.fn[:xhtml]}",tidyfile) + tidy=SiSU_Env::System_call.new(@file,tidyfile) tidy.well_formed? tell.p_off unless @md.opt.cmd =~/q/ end diff --git a/lib/sisu/v3/xml.rb b/lib/sisu/v3/xml.rb index 23cfb5bc..f2751da1 100644 --- a/lib/sisu/v3/xml.rb +++ b/lib/sisu/v3/xml.rb @@ -107,7 +107,7 @@ module SiSU_XML_SAX def song begin SiSU_XML_SAX::Source::Scroll.new(@particulars).songsheet - SiSU_XML_SAX::Source::Tidy.new(@md,@env).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use + SiSU_XML_SAX::Source::Tidy.new(@md,@file.place_file.xml_sax.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_sax.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error ensure @@ -437,8 +437,8 @@ WOK end end class Tidy - def initialize(md,dir) - @md,@env=md,dir + def initialize(md,file) + @md,@file=md,file @prog=SiSU_Env::Info_program.new end def xml @@ -450,7 +450,7 @@ WOK tell.grey_open end tidyfile='/dev/null' #don't want one or screen output, check for alternative flags - tidy=SiSU_Env::System_call.new("#{@env.path.output}/#{@md.fnb}/#{@md.fn[:sax]}",tidyfile) + tidy=SiSU_Env::System_call.new(@file,tidyfile) tidy.well_formed? tell.p_off unless @md.opt.cmd =~/q/ end diff --git a/lib/sisu/v3/xml_dom.rb b/lib/sisu/v3/xml_dom.rb index 22b11ebc..7a0d55f3 100644 --- a/lib/sisu/v3/xml_dom.rb +++ b/lib/sisu/v3/xml_dom.rb @@ -104,7 +104,7 @@ module SiSU_XML_DOM def songsheet begin SiSU_XML_DOM::Source::Scroll.new(@particulars).songsheet - SiSU_XML_DOM::Source::Tidy.new(@md,@env).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use + SiSU_XML_DOM::Source::Tidy.new(@md,@file.place_file.xml_dom.dir).xml if @md.opt.cmd =~/[vVM]/ # test wellformedness, comment out when not in use SiSU_Rexml::Rexml.new(@md,@file.place_file.xml_dom.dir).xml if @md.opt.cmd =~/M/ # test rexml parsing, comment out when not in use #debug rescue; SiSU_Errors::Info_error.new($!,$@,@md.opt.cmd,@md.fns).error ensure @@ -513,8 +513,8 @@ WOK end end class Tidy - def initialize(md,dir) - @md,@env=md,dir + def initialize(md,file) + @md,@file=md,file @prog=SiSU_Env::Info_program.new end def xml @@ -524,7 +524,7 @@ WOK tell=SiSU_Screen::Ansi.new(@md.opt.cmd,'invert','','') tell.grey_open unless @md.opt.cmd =~/q/ tidyfile='/dev/null' #don't want one or screen output, check for alternative flags - tidy=SiSU_Env::System_call.new("#{@env.path.output}/#{@md.fnb}/#{@md.fn[:dom]}",tidyfile) + tidy=SiSU_Env::System_call.new(@file,tidyfile) tidy.well_formed? tell.p_off unless @md.opt.cmd =~/q/ end -- cgit v1.2.3