aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/sst_from_xml.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/sst_from_xml.rb')
-rw-r--r--lib/sisu/v0/sst_from_xml.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sisu/v0/sst_from_xml.rb b/lib/sisu/v0/sst_from_xml.rb
index d93e68b8..af43e611 100644
--- a/lib/sisu/v0/sst_from_xml.rb
+++ b/lib/sisu/v0/sst_from_xml.rb
@@ -1,3 +1,4 @@
+# coding: utf-8
=begin
* Name: SiSU
@@ -99,6 +100,10 @@ module SiSU_sst_from_xml
text.gsub!(/<i>(.+?)<\/i>/,'/{\1}/')
text.gsub!(/<b>(.+?)<\/b>/,'*{\1}*')
text.gsub!(/<u>(.+?)<\/u>/,'_{\1}_')
+ text.gsub!(/<sem:([a-z_]+)\s+depth=['"]zero['"]>(\s*.+?\s*)<\/sem:\1>/,';{ \2 };\1')
+ text.gsub!(/<sem:([a-z_]+)\s+depth=['"]one['"]>(\s*.+?\s*)<\/sem:\1>/,':{ \2 }:\1')
+ text.gsub!(/<sem:([a-z_]+)\s+depth=['"]many['"]>(\s*.+?\s*)<\/sem:\1>/,'\1:{ \2 }:\1')
+ text.gsub!(/<sem:([a-z_]+)>(\s*.+?\s*)<\/sem:\1>/,'\1:{ \2 }:\1')
text.gsub!(/\s +/,' ')
text.strip!
#text.gsub!(/<header>(.+?)<\/header/,"@#{x.name}: \\1\n\n")
@@ -126,7 +131,7 @@ module SiSU_sst_from_xml
sax
end
def dom
- raise "#{__FILE}::#{__LINE__} xml dom representation to sst not yet implemented (experimental simple xml representations sax and node to sst are in place)."
+ raise "#{__FILE__}::#{__LINE__} xml dom representation to sst not yet implemented (experimental simple xml representations sax and node to sst are in place)."
end
def xml_to_sisu
unless @opt.files.empty?