From 5787bd8ec03e93e90dd90d5fbcb66bdb49a07a84 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 18 Aug 2008 23:41:37 -0400 Subject: a bit of a cleanup, and change reference to null to ordinary --- lib/sisu/v0/xml_dom.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sisu/v0/xml_dom.rb') diff --git a/lib/sisu/v0/xml_dom.rb b/lib/sisu/v0/xml_dom.rb index 9bcb15ec..38ba0a87 100644 --- a/lib/sisu/v0/xml_dom.rb +++ b/lib/sisu/v0/xml_dom.rb @@ -371,7 +371,7 @@ WOK unless @rcdc m=/#{Mx[:id_o]}~(\d+);(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ if para =~m - format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[1-9]|null/ + format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[1-9]|ordinary/ case @sto.format when /^(1):(\S*)/ xml_markup(para) -- cgit v1.2.3 From 08c69d074001507d64cd5960c8679ec91a5a8353 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 23 Aug 2008 12:01:59 -0400 Subject: pass Hash to Format classes; some match tuning in dal --- lib/sisu/v0/xml_dom.rb | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'lib/sisu/v0/xml_dom.rb') diff --git a/lib/sisu/v0/xml_dom.rb b/lib/sisu/v0/xml_dom.rb index 38ba0a87..b2bc0de7 100644 --- a/lib/sisu/v0/xml_dom.rb +++ b/lib/sisu/v0/xml_dom.rb @@ -371,7 +371,8 @@ WOK unless @rcdc m=/#{Mx[:id_o]}~(\d+);(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ if para =~m - format_scroll=SiSU_XML_format::Format_scroll.new(@md,@sto.text) if @sto.format =~/i[1-9]|ordinary/ + txt_obj={:txt =>@sto.text} + format_scroll=SiSU_XML_format::Format_scroll.new(@md,txt_obj) if @sto.format =~/i[1-9]|ordinary/ case @sto.format when /^(1):(\S*)/ xml_markup(para) @@ -438,17 +439,19 @@ WOK #para=format_scroll.boldPara elsif para =~/(MetaData)/ \ and para =~/#{Mx[:id_o]}~\d+;[m]\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ #debug 2003w46 add rc info - format_scroll=Format_scroll.new(@md,'
MetaData') + txt_obj={:txt =>'
MetaData'} + format_scroll=Format_scroll.new(@md,txt_obj) para=format_scroll.bold_para elsif para =~/(Owner Details)/ \ and para !~/#{Mx[:id_o]}~\d+;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ - format_scroll=Format_scroll.new(@md,'
Owner Details') + txt_obj={:txt =>'
Owner Details'} + format_scroll=Format_scroll.new(@md,txt_obj) @@xml[:owner_details]=format_scroll.bold_para para='' - elsif para =~/(.*)<:#>(.*)/ - one,two=$1,$2 - format_text=Format_text_object.new(one,two) - para=format_text.seg_no_paranum + #elsif para =~/(.*)<:#>(.*)/ + # one,two=$1,$2 + # format_text=Format_text_object.new(one,two) + # para=format_text.seg_no_paranum end if para =~// \ and para =~/^(-\{{2}~\d+|)/ # -endnote @@ -456,18 +459,14 @@ WOK end if para =~/.*<:#>.*$/ para=if para =~ /#{Mx[:pa_o]}:i[1-9]#{Mx[:pa_c]}/ - format_text=Format_text_object.new(para,'') + txt_obj={:txt =>para} + format_text=Format_text_object.new(@md,txt_obj) format_text.scr_inden_ocn_e_no_paranum end end if para !~/#{@vz.margin_txt_0}|#{@vz.margin_txt_1}|#{@vz.margin_txt_2}/ # i don't get the condition for no paranum end - if para =~/<:center>/ - one,two=/(.*)<:center>(.*)/.match(para)[1,2] - format_text=Format_text_object.new(one,two) - para=format_text.center - end else # end para.gsub!(/#{Mx[:pa_o]}:\S+#{Mx[:pa_c]}/,'') if para -- cgit v1.2.3 From 2a738f528cb87793ff7f8312099666af1e21f44c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 3 Sep 2008 22:25:03 -0400 Subject: xml character encoding adjusted; xml image match; odf issue with '@' symbol in url --- lib/sisu/v0/xml_dom.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sisu/v0/xml_dom.rb') diff --git a/lib/sisu/v0/xml_dom.rb b/lib/sisu/v0/xml_dom.rb index b2bc0de7..13aed504 100644 --- a/lib/sisu/v0/xml_dom.rb +++ b/lib/sisu/v0/xml_dom.rb @@ -349,8 +349,8 @@ WOK (0..6).each { |x| @cont[x]=@level[x]=false } (4..6).each { |x| @xml_contents_close[x]='' } data.each do |para| - para=@trans.markup(para) @trans.char_enc.utf8(para) if @sys.locale =~/utf-?8/i #% utf8 + para=@trans.markup(para) if para =~/^#{Rx[:meta]}\s*(.+?)$/ # for headers d_meta=SiSU_text_utils::Header_scan.new(@md,para).meta if d_meta; xml_head(d_meta) -- cgit v1.2.3