diff options
author | Ralph Amissah <ralph@amissah.com> | 2008-02-24 22:24:00 +0000 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2008-02-24 22:24:00 +0000 |
commit | 936201557bdd924cf2748570becae1574b1e2866 (patch) | |
tree | 3b070d9cb8e6440c4a3264073a6d280043b6e1ca /lib/sisu/v0/sst_from_xml.rb | |
parent | Updated sisu-0.65.0 (diff) | |
parent | clean screen output (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v0/sst_from_xml.rb')
-rw-r--r-- | lib/sisu/v0/sst_from_xml.rb | 7 |
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? |