aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v1/sst_to_s_xml_node.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v1/sst_to_s_xml_node.rb')
-rw-r--r--lib/sisu/v1/sst_to_s_xml_node.rb33
1 files changed, 16 insertions, 17 deletions
diff --git a/lib/sisu/v1/sst_to_s_xml_node.rb b/lib/sisu/v1/sst_to_s_xml_node.rb
index 09e9f740..3cbd1156 100644
--- a/lib/sisu/v1/sst_to_s_xml_node.rb
+++ b/lib/sisu/v1/sst_to_s_xml_node.rb
@@ -22,7 +22,7 @@
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along with
@@ -203,10 +203,10 @@ WOK
@@parent[:ocn]
end
def prt_node
- parent.node.each_with_index { |a,n| puts "n.#{n} a.#{a}" unless n == 0 } #x == node
+ parent.node.each_with_index { |a,n| puts "n.#{n} a.#{a}" unless n==0 } #x==node
end
def prt_ocn
- parent.ocn.each_with_index { |a,n| puts "n.#{n} a.#{a}" unless n == 0 } #x == node
+ parent.ocn.each_with_index { |a,n| puts "n.#{n} a.#{a}" unless n==0 } #x==node
end
self
end
@@ -233,10 +233,10 @@ WOK
end
if lv.inspect =~/^[1-6]/; @@current=lv
end
- if o.node == 1 \
- or lv == 1
+ if o.node==1 \
+ or lv==1
@@parent[:node][o.node]=0
- elsif @@current == lv \
+ elsif @@current==lv \
and @@current !=nil
if @node[:no][lv-1] != nil
@@parent[:node][o.node]=@node[:no][lv-1]
@@ -246,14 +246,14 @@ WOK
@@parent[:node][o.node]=@node[:no][lv-3]
else puts 'error'
end
- elsif lv == nil
- if o.ocn.class == Fixnum \
+ elsif lv==nil
+ if o.ocn.class==Fixnum \
and @@current
@@parent[:node][o.node]=@node[:no][@@current]
end
else puts 'error'
end
- if @@current == lv \
+ if @@current==lv \
and @@current !=nil
if @node[:ocn][lv-1] != nil
@@parent[:ocn][o.ocn]=@node[:ocn][lv-1]
@@ -263,8 +263,8 @@ WOK
@@parent[:ocn][o.ocn]=@node[:ocn][lv-3]
else puts 'error'
end
- elsif lv == nil
- if o.ocn.class == Fixnum \
+ elsif lv==nil
+ if o.ocn.class==Fixnum \
and @@current
@@parent[:ocn][o.ocn]=@node[:ocn][@@current]
end
@@ -274,7 +274,7 @@ WOK
#def node_structure(o='',para='',lv='',hname='') #extracted endnotes
# if o.ocn
# lv=lv.to_i
- # lv=nil if lv == 0
+ # lv=nil if lv==0
# build_relationships(o,lv)
# end
#end
@@ -284,7 +284,7 @@ WOK
lv=lv.to_i
n=lv - 1
n3=lv + 2
- lv=nil if lv == 0
+ lv=nil if lv==0
embedded_endnotes(para)
if para[@regx]
paragraph="#{para[@regx,2]}"
@@ -533,13 +533,12 @@ WOK
end
6.downto(4) do |x|
y=x - 1; v=x - 3
- @@xml[:body] << "#{@tab*5}</content>\n#{@tab*y}</contents#{v}>\n" if @level[x] == true
+ @@xml[:body] << "#{@tab*5}</content>\n#{@tab*y}</contents#{v}>\n" if @level[x]==true
end
3.downto(1) do |x|
y=x - 1
- @@xml[:body] << "#{@tab*y}</heading#{x}>\n" if @level[x] == true
+ @@xml[:body] << "#{@tab*y}</heading#{x}>\n" if @level[x]==true
end
- #6.downto(1) { |x| y=x - 1; @@xml[:body] << "#{@tab*y}</level #{x}>\n" if @level[x] == true }
end
def pre
rdf=SiSU_XML_tags::RDF.new(@md)
@@ -591,7 +590,7 @@ WOK
@sisu=new_file_data.scan(/.+/)
SiSU_Env::SiSU_file.new(@md).mkdir
filename_sxm=SiSU_Env::SiSU_file.new(@md,@md.fn[:sxn]).mkfile_pwd
- if filename_sxm.class == File
+ if filename_sxm.class==File
@sisu.each {|para| filename_sxm.puts para}
filename_sxm.close
else puts 'file not created, is directory writable?'