diff options
author | Ralph Amissah <ralph@amissah.com> | 2009-07-04 08:49:10 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2009-07-04 08:49:10 -0400 |
commit | 387104a1f0c41f616ad5abd57c558f26cd18f48f (patch) | |
tree | 0d506ad11e2845db5806b54c4d312eb0994c59c9 /lib | |
parent | texpdf mostly minor cleaning (diff) |
xml related minor touches
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v0/shared_xml.rb | 8 | ||||
-rw-r--r-- | lib/sisu/v0/sst_to_s_xml_node.rb | 18 | ||||
-rw-r--r-- | lib/sisu/v0/xml_format.rb | 2 |
3 files changed, 18 insertions, 10 deletions
diff --git a/lib/sisu/v0/shared_xml.rb b/lib/sisu/v0/shared_xml.rb index 25a0a7a9..05161c41 100644 --- a/lib/sisu/v0/shared_xml.rb +++ b/lib/sisu/v0/shared_xml.rb @@ -95,9 +95,12 @@ module SiSU_text_parts @format="#@format:#{segname}" # #follow this search beneath for heading_body1-6 @lev_para_ocn=if @para =~/.+#{Mx[:id_o]}~\d+;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/ - SiSU_XML_format::Format_scroll.new(@md,@format,@text,@ocn) + t_o={:format=>@format,:txt=>@text,:ocn=>@ocn} #(@format,@text,@ocn) + SiSU_XML_format::Format_scroll.new(@md,t_o) else - SiSU_XML_format::Format_scroll.new(@md,@format,@text,"#{Mx[:id_o]}~0;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}") + t_o={:format=>@format,:txt=>@text,:ocn=>0} #(@format,@text,@ocn) + SiSU_XML_format::Format_scroll.new(@md,t_o) + #SiSU_XML_format::Format_scroll.new(@md,@format,@text,"#{Mx[:id_o]}~0;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}") end self end @@ -543,7 +546,6 @@ module SiSU_XML_tags #Format @full_title=@subtitle=@author=@subject=@description=@publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@copyright=@owner=@keywords='' #seg_name=%{#{@@seg_name[@@tracker]} - } if @@seg_name[@@tracker] @md=md - @sfx,@pdf=@md.sfx,@md.pdf @rdfurl=%{ rdf:about="http://www.jus.uio.no/lm/toc"\n} if @md.full_title # DublinCore 1 - title @rdf_title=%{ dc.title="#{seg_name}#{@md.full_title}"\n} diff --git a/lib/sisu/v0/sst_to_s_xml_node.rb b/lib/sisu/v0/sst_to_s_xml_node.rb index 5c341956..09e9f740 100644 --- a/lib/sisu/v0/sst_to_s_xml_node.rb +++ b/lib/sisu/v0/sst_to_s_xml_node.rb @@ -458,27 +458,33 @@ WOK case @sto.format when /^(1):(\S*)/ xml_clean(para) - xml_structure(o,para,$1,$2) + t_o={:txt =>para,:ocn =>o.ocn,:format =>$1,:segname =>$2} # o,para,$1,$2 + xml_structure(@md,t_o) para=@sto.lev_para_ocn.heading_body1 when /^(2):(\S*)/ xml_clean(para) - xml_structure(o,para,$1,$2) + t_o={:txt =>para,:ocn =>o.ocn,:format =>$1,:segname =>$2} + xml_structure(@md,t_o) para=@sto.lev_para_ocn.heading_body2 when /^(3):(\S*)/ xml_clean(para) - xml_structure(o,para,$1,$2) + t_o={:txt =>para,:ocn =>o.ocn,:format =>$1,:segname =>$2} + xml_structure(@md,t_o) para=@sto.lev_para_ocn.heading_body3 when /^(4):(\S*)/ # work on see Split_text_object xml_clean(para) - xml_structure(o,para,$1,$2) + t_o={:txt =>para,:ocn =>o.ocn,:format =>$1,:segname =>$2} + xml_structure(@md,t_o) para=@sto.lev_para_ocn.heading_body4 when /^(5):(\S*)/ xml_clean(para) - xml_structure(o,para,$1,$2) + t_o={:txt =>para,:ocn =>o.ocn,:format =>$1,:segname =>$2} + xml_structure(@md,t_o) para=@sto.lev_para_ocn.heading_body5 when /^(6):(\S*)/ xml_clean(para) - xml_structure(o,para,$1,$2) + t_o={:txt =>para,:ocn =>o.ocn,:format =>$1,:segname =>$2} + xml_structure(@md,t_o) para=@sto.lev_para_ocn.heading_body6 else if para =~ /<:verse>/ diff --git a/lib/sisu/v0/xml_format.rb b/lib/sisu/v0/xml_format.rb index bf75ae15..c636ba2d 100644 --- a/lib/sisu/v0/xml_format.rb +++ b/lib/sisu/v0/xml_format.rb @@ -84,7 +84,7 @@ module SiSU_XML_format class Head_information def initialize #dc rdf @full_title=@subtitle=@author=@subject=@description=@publisher=@contributor=@date=@type=@format=@identifier=@source=@language=@relation=@coverage=@rights=@copyright=@owner=@keywords='' - @sfx,@pdf,@md=@@md.sfx,@@md.pdf,@@md + @md=@@md # DublinCore 1 - title @rdfurl=%{ rdf:about="http://www.jus.uio.no/lm/toc"\n} if @md.full_title |