aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/xml_shared.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-10-12 10:52:35 -0400
committerRalph Amissah <ralph@amissah.com>2014-10-12 10:52:35 -0400
commit32fd8f3908bc8632e2d8ab4d872f6e4362fe031b (patch)
tree8094371a7fd511409992200f4b7c1cb4c33582d6 /lib/sisu/v5/xml_shared.rb
parentv6: '*_parts', remove defaults.rb & some relics related to sisu skins, long gone (diff)
v5: merge v6: remove defaults.rb & some relics related to sisu skinssisu_5.7.0
Diffstat (limited to 'lib/sisu/v5/xml_shared.rb')
-rw-r--r--lib/sisu/v5/xml_shared.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/sisu/v5/xml_shared.rb b/lib/sisu/v5/xml_shared.rb
index 2a8ac27e..a5f5e114 100644
--- a/lib/sisu/v5/xml_shared.rb
+++ b/lib/sisu/v5/xml_shared.rb
@@ -57,13 +57,13 @@
** Description: common file for xml generation
=end
module SiSU_XML_Munge
+ require_relative 'xml_parts' # xml_parts.rb
class Trans
- require_relative 'defaults' # defaults.rb
+ include SiSU_Parts_XML
def initialize(md)
@md=md
@sys=SiSU_Env::SystemCall.new
@dir=SiSU_Env::InfoEnv.new(@md.fns)
- @brace_url=SiSU_Viz::Defaults.new.url_decoration
if @md.sem_tag
@ab ||=semantic_tags.default
end
@@ -297,7 +297,7 @@ module SiSU_XML_Munge
gsub(/#{Mx[:lnk_o]}(.+?)#{Mx[:lnk_c]}#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,
'<link xmlns:xl="http://www.w3.org/1999/xlink" xl:type="simple" xl:href="\2">\1</link>'). #watch, compare html_tune
gsub(/#{Mx[:url_o]}(\S+?)#{Mx[:url_c]}/,
- %{#{@brace_url.xml_open}<link xmlns:xl="http://www.w3.org/1999/xlink" xl:type="simple" xl:href="\\1">\\1</link>#{@brace_url.xml_close}}).
+ %{#{the_url_decoration.xml_open}<link xmlns:xl="http://www.w3.org/1999/xlink" xl:type="simple" xl:href="\\1">\\1</link>#{the_url_decoration.xml_close}}).
gsub(/#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,
'<link xmlns:xl="http://www.w3.org/1999/xlink" xl:type="simple" xl:href="\1">\1</link>') #escaped urls not linked, deal with later
else
@@ -307,7 +307,7 @@ module SiSU_XML_Munge
dob.obj=dob.obj.gsub(/#{Mx[:gl_bullet]}/,'● ')
end
dob.obj=dob.obj.gsub(/#{Mx[:url_o]}([a-zA-Z0-9._-]+\@\S+?\.[a-zA-Z0-9._-]+)#{Mx[:url_c]}/,
- %{#{@brace_url.xml_open}\\1#{@brace_url.xml_close}}).
+ %{#{the_url_decoration.xml_open}\\1#{the_url_decoration.xml_close}}).
gsub(/#{Dx[:url_o]}/,"#{Dx[:url_o_xml]}").
gsub(/#{Dx[:url_c]}/,"#{Dx[:url_c_xml]}").
gsub(/&nbsp;|#{Mx[:nbsp]}/m,'&#160;').
@@ -470,8 +470,8 @@ end
module SiSU_XML_Tags #Format
require_relative 'dp' # dp.rb
include SiSU_Param
- include SiSU_Viz
class RDF
+ include SiSU_Parts_XML
def initialize(md='',seg_name=[],tracker=0)
@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=''
@md=md
@@ -595,7 +595,6 @@ module SiSU_XML_Tags #Format
end
content=meta_content_clean(@md.keywords)
@keywords=%{ <meta name="keywords" content="#{content}" />\n} if @md.keywords
- @vz=SiSU_Viz::Defaults.new
end
def meta_content_clean(content='')
content=if not content.nil?
@@ -654,8 +653,8 @@ WOK
def metatag_html #values strung together, because some empty, and resulting output (line breaks) is much better
<<WOK
#{@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}
-#{@vz.txt_generator}
-#{@vz.png_ico}
+#{SiSU_Proj_XML::Bits.new.txt_generator}
+#{the_png.ico}
WOK
end
end