aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/ao_doc_objects.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-07-01 00:45:40 -0400
committerRalph Amissah <ralph@amissah.com>2014-07-01 00:45:40 -0400
commit9347018753e818b49980651df3b77352c5f3792f (patch)
tree8393afd4fcb883b40228840a7c6acc5027f1a2f1 /lib/sisu/v5/ao_doc_objects.rb
parentv5 v6: files renamed: ao_composite.rb, html_concordance.rb (diff)
v5 v6: ao, code cosmetic rearrangement
Diffstat (limited to 'lib/sisu/v5/ao_doc_objects.rb')
-rw-r--r--lib/sisu/v5/ao_doc_objects.rb435
1 files changed, 229 insertions, 206 deletions
diff --git a/lib/sisu/v5/ao_doc_objects.rb b/lib/sisu/v5/ao_doc_objects.rb
index dd0a44cd..1357ee90 100644
--- a/lib/sisu/v5/ao_doc_objects.rb
+++ b/lib/sisu/v5/ao_doc_objects.rb
@@ -74,10 +74,10 @@ module SiSU_AO_DocumentStructure
@of=:meta
end
def metadata(tags)
- of= @of #Symbol, classification - group
- is= :meta #Symbol, classification - specific type
- tags= tags || ((defined? o.tags) ? o.tags : {}) #String, metadata type/tag
- obj= nil
+ of = @of #Symbol, classification - group
+ is = :meta #Symbol, classification - specific type
+ tags = tags || ((defined? o.tags) ? o.tags : {}) #String, metadata type/tag
+ obj = nil
@of,@is,@tags,@obj=of,is,tags,obj
self
end
@@ -89,12 +89,12 @@ module SiSU_AO_DocumentStructure
@of=:meta
end
def metadata(h,o=nil)
- of= @of #Symbol, classification - group
- is= :meta #Symbol, classification - specific type
- tag= h[:tag] || ((defined? o.tag) ? o.tag : nil) #String, metadata type/tag
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
+ of = @of #Symbol, classification - group
+ is = :meta #Symbol, classification - specific type
+ tag = h[:tag] || ((defined? o.tag) ? o.tag : nil) #String, metadata type/tag
+ obj = h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ tmp = h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ digest = h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
@of,@is,@tag,@obj,@digest,@tmp=of,is,tag,obj,digest,tmp
self
end
@@ -142,44 +142,47 @@ module SiSU_AO_DocumentStructure
and (h[:ln] and h[:ln].to_s=~/[0-9]/)
h[:lv]=heading_lv(h[:ln])
end
- of= @of #Symbol, classification - group
- is= :heading #Symbol, classification - specific type
- name= h[:name] || ((defined? o.name) ? o.name : nil) #String, named object?
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- node= h[:node] || ((defined? o.node) ? o.node : nil) #[Node relationship doc structure info]
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- lv= h[:lv] || ((defined? o.lv) ? o.lv : nil) #Alpha-numeric, document structure as used in markup, A-D then 1-6
- ln= h[:ln] || ((defined? o.ln) ? o.ln : nil) #Integer, document structure level, for convenience in processing 1-9
- lc= h[:lc] || ((defined? o.lc) ? o.lc : nil) #Integer, document structure collapsed level, convenience (collapse sisu's dual level document structure for markup with simple linear structure)
- use_=if lv \
- and lv == '1'
- h[:use_] || ((defined? o.use_) ? o.use_ : :ok)
- elsif not lv.empty? \
- and lv =~ /[A-D2-3]/
- :ok
- else
- h[:use_] || ((defined? o.use_) ? o.use_ : :ok)
- end
- ocn_=if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
- end
- autonum_= if h[:autonum_].nil? then ((defined? o.autonum_) ? o.autonum_ : true) #Bool? auto-numbering if requested default on, false suppresses
- else h[:autonum_]
- end
- note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@lv,@ln,@lc,@name,@tags,@obj,@idx,@ocn,@odv,@osp,@node,@parent,@use_,@ocn_,@note_,@autonum_,@digest,@tmp=of,is,lv,ln,lc,name,tags,obj,idx,ocn,odv,osp,node,parent,use_,ocn_,note_,autonum_,digest,tmp
+ of = @of #Symbol, classification - group
+ is = :heading #Symbol, classification - specific type
+ name = h[:name] || ((defined? o.name) ? o.name : nil) #String, named object?
+ tags = h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj = h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx = h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn = h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv = h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp = h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ node = h[:node] || ((defined? o.node) ? o.node : nil) #[Node relationship doc structure info]
+ parent = h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ lv = h[:lv] || ((defined? o.lv) ? o.lv : nil) #Alpha-numeric, document structure as used in markup, A-D then 1-6
+ ln = h[:ln] || ((defined? o.ln) ? o.ln : nil) #Integer, document structure level, for convenience in processing 1-9
+ lc = h[:lc] || ((defined? o.lc) ? o.lc : nil) #Integer, document structure collapsed level, convenience (collapse sisu's dual level document structure for markup with simple linear structure)
+ use_ = if lv \
+ and lv == '1'
+ h[:use_] || ((defined? o.use_) ? o.use_ : :ok)
+ elsif not lv.empty? \
+ and lv =~ /[A-D2-3]/
+ :ok
+ else
+ h[:use_] || ((defined? o.use_) ? o.use_ : :ok)
+ end
+ ocn_ = if h[:ocn_].nil?
+ ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
+ end
+ autonum_ = if h[:autonum_].nil?
+ ((defined? o.autonum_) ? o.autonum_ : true) #Bool? auto-numbering if requested default on, false suppresses
+ else h[:autonum_]
+ end
+ note_ = h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
+ digest = h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
+ tmp = h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ @of,@is,@lv,@ln,@lc,@name,@tags,@obj,@idx,@ocn,@odv,@osp,@node,@parent,@use_,@ocn_,@note_,@autonum_,@digest,@tmp=
+ of, is, lv, ln, lc, name, tags, obj, idx, ocn, odv, osp, node, parent, use_, ocn_, note_, autonum_, digest, tmp
self
end
def heading_insert(h,o=nil)
heading(h,o=nil)
- @is= :heading_insert #String, classification - specific type
+ @is = :heading_insert #String, classification - specific type
self
end
end
@@ -191,52 +194,56 @@ module SiSU_AO_DocumentStructure
@tags=[]
end
def paragraph(h,o=nil)
- of= @of #Symbol, classification - group
- is= :para #Symbol, classification - specific type
- name= h[:name] || ((defined? o.name) ? o.name : nil) #String, named object?
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- indent= h[:indent].to_s || ((defined? o.indent) ? o.indent.to_s : nil) #Integer, indent level
- hang= h[:hang].to_s || ((defined? o.hang) ? o.hang.to_s : nil) #Integer, hanging indent level
- bullet_=h[:bullet_] || ((defined? o.bullet_) ? o.bullet_ : false) #Bool, bulleted?
- quote_= h[:quote_] || ((defined? o.quote_) ? o.quote_ : false) #Bool, quote (blockquote)?
- note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- image_= h[:image_] || ((defined? o.image_) ? o.image_ : false) #Bool, images? (processing optimization)
- ocn_=if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of = @of #Symbol, classification - group
+ is = :para #Symbol, classification - specific type
+ name = h[:name] || ((defined? o.name) ? o.name : nil) #String, named object?
+ tags = h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj = h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx = h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn = h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv = h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp = h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent = h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ indent = h[:indent].to_s || ((defined? o.indent) ? o.indent.to_s : nil) #Integer, indent level
+ hang = h[:hang].to_s || ((defined? o.hang) ? o.hang.to_s : nil) #Integer, hanging indent level
+ bullet_ = h[:bullet_] || ((defined? o.bullet_) ? o.bullet_ : false) #Bool, bulleted?
+ quote_ = h[:quote_] || ((defined? o.quote_) ? o.quote_ : false) #Bool, quote (blockquote)?
+ note_ = h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
+ image_ = h[:image_] || ((defined? o.image_) ? o.image_ : false) #Bool, images? (processing optimization)
+ ocn_ = if h[:ocn_].nil?
+ ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
end
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@name,@tags,@obj,@indent,@hang,@bullet_,@quote_,@idx,@ocn,@odv,@osp,@parent,@image_,@note_,@ocn_,@digest,@tmp=of,is,name,tags,obj,indent,hang,bullet_,quote_,idx,ocn,odv,osp,parent,image_,note_,ocn_,digest,tmp
+ digest = h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
+ tmp = h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ @of,@is,@name,@tags,@obj,@indent,@hang,@bullet_,@quote_,@idx,@ocn,@odv,@osp,@parent,@image_,@note_,@ocn_,@digest,@tmp=
+ of, is, name, tags, obj, indent, hang, bullet_, quote_, idx, ocn, odv, osp, parent, image_, note_, ocn_, digest, tmp
self
end
def docinfo(h,o=nil)
- of= @of #String, classification - group
- is= :docinfo #String, classification - specific type
- name= h[:name] || ((defined? o.name) ? o.name : nil) #String, named object?
- tags= h[:tags] || ((defined? o.tags) ? o.tags : nil) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= nil #String, book index provided?
- ocn= nil #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- indent= nil #Integer, indent level
- hang= nil #Integer, indent level
- bullet_=false #Bool, bulleted?
- note_= false #Bool, endnotes/footnotes? (processing optimization)
- image_= h[:image_] || ((defined? o.image_) ? o.image_ : false) #Bool, images? (processing optimization)
- ocn_=if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of = @of #String, classification - group
+ is = :docinfo #String, classification - specific type
+ name = h[:name] || ((defined? o.name) ? o.name : nil) #String, named object?
+ tags = h[:tags] || ((defined? o.tags) ? o.tags : nil) #Array, associated object tags, names if any
+ obj = h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx = nil #String, book index provided?
+ ocn = nil #Integer, sequential on substantive-content objects
+ odv = h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp = h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent = h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ indent = nil #Integer, indent level
+ hang = nil #Integer, indent level
+ bullet_ = false #Bool, bulleted?
+ note_ = false #Bool, endnotes/footnotes? (processing optimization)
+ image_ = h[:image_] || ((defined? o.image_) ? o.image_ : false) #Bool, images? (processing optimization)
+ ocn_ = if h[:ocn_].nil?
+ ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
end
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@name,@tags,@obj,@indent,@hang,@bullet_,@idx,@ocn,@odv,@osp,@parent,@image_,@note_,@ocn_,@digest,@tmp=of,is,name,tags,obj,indent,hang,bullet_,idx,ocn,odv,osp,parent,image_,note_,ocn_,digest,tmp
+ digest = h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
+ tmp = h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ @of,@is,@name,@tags,@obj,@indent,@hang,@bullet_,@idx,@ocn,@odv,@osp,@parent,@image_,@note_,@ocn_,@digest,@tmp=
+ of, is, name, tags, obj, indent, hang, bullet_, idx, ocn, odv, osp, parent, image_, note_, ocn_, digest, tmp
self
end
end
@@ -248,124 +255,136 @@ module SiSU_AO_DocumentStructure
@tags=[]
end
def code(h,o=nil)
- of= @of #Symbol, classification - group #alt 'code'
- is= :code #Symbol, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- lngsyn= h[:lngsyn] || ((defined? o.lngsyn) ? o.lngsyn : :txt) #symbol, code lngsyn
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- number_= h[:number_] || ((defined? o.number_) ? o.number_ : false) #Bool, numbered or not?
- note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- ocn_= if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of = @of #Symbol, classification - group #alt 'code'
+ is = :code #Symbol, classification - specific type
+ tags = h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj = h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ lngsyn = h[:lngsyn] || ((defined? o.lngsyn) ? o.lngsyn : :txt) #symbol, code lngsyn
+ idx = h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn = h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv = h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp = h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent = h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ number_ = h[:number_] || ((defined? o.number_) ? o.number_ : false) #Bool, numbered or not?
+ note_ = h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
+ ocn_ = if h[:ocn_].nil?
+ ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
end
- num= h[:num] || ((defined? o.num) ? o.num : nil)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@tags,@obj,@lngsyn,@idx,@ocn,@odv,@osp,@parent,@number_,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,lngsyn,idx,ocn,odv,osp,parent,number_,note_,ocn_,num,digest,tmp
+ num = h[:num] || ((defined? o.num) ? o.num : nil)
+ digest = h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
+ tmp = h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ @of,@is,@tags,@obj,@lngsyn,@idx,@ocn,@odv,@osp,@parent,@number_,@note_,@ocn_,@num,@digest,@tmp=
+ of, is, tags, obj, lngsyn, idx, ocn, odv, osp, parent, number_, note_, ocn_, num, digest, tmp
self
end
def box(h,o=nil)
- of= @of #Symbol, classification - group
- is= :box #Symbol, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- ocn_= if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of = @of #Symbol, classification - group
+ is = :box #Symbol, classification - specific type
+ tags = h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj = h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx = h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn = h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv = h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp = h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent = h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ note_ = h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
+ ocn_ = if h[:ocn_].nil?
+ ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
end
- num= h[:num] || ((defined? o.num) ? o.num : nil)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,num,digest,tmp
+ num = h[:num] || ((defined? o.num) ? o.num : nil)
+ digest = h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
+ tmp = h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=
+ of, is, tags, obj, idx, ocn, odv, osp, parent, note_, ocn_, num, digest, tmp
self
end
def block(h,o=nil)
- of= @of #Symbol, classification - group
- is= :block #Symbol, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- ocn_= if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of = @of #Symbol, classification - group
+ is = :block #Symbol, classification - specific type
+ tags = h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj = h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx = h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn = h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv = h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp = h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent = h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ note_ = h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
+ ocn_ = if h[:ocn_].nil?
+ ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
end
- num= h[:num] || ((defined? o.num) ? o.num : nil)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,num,digest,tmp
+ num = h[:num] || ((defined? o.num) ? o.num : nil)
+ digest = h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
+ tmp = h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=
+ of, is, tags, obj, idx, ocn, odv, osp, parent, note_, ocn_, num, digest, tmp
self
end
def group(h,o=nil)
- of= @of #Symbol, classification - group
- is= :group #Symbol, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- ocn_= if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of = @of #Symbol, classification - group
+ is = :group #Symbol, classification - specific type
+ tags = h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj = h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx = h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn = h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv = h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp = h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent = h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ note_ = h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
+ ocn_ = if h[:ocn_].nil?
+ ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
end
- num= h[:num] || ((defined? o.num) ? o.num : nil)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,num,digest,tmp
+ num = h[:num] || ((defined? o.num) ? o.num : nil)
+ digest = h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
+ tmp = h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=
+ of, is, tags, obj, idx, ocn, odv, osp, parent, note_, ocn_, num, digest, tmp
self
end
- def alt(h,o=nil) #see block
- of= @of #Symbol, classification - group
- is= :alt #Symbol, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- ocn_= if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ def alt(h,o=nil) #see block
+ of = @of #Symbol, classification - group
+ is = :alt #Symbol, classification - specific type
+ tags = h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj = h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx = h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn = h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv = h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp = h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent = h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ note_ = h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
+ ocn_ = if h[:ocn_].nil?
+ ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
end
- num= h[:num] || ((defined? o.num) ? o.num : nil)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,num,digest,tmp
+ num = h[:num] || ((defined? o.num) ? o.num : nil)
+ digest = h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
+ tmp = h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=
+ of, is, tags, obj, idx, ocn, odv, osp, parent, note_, ocn_, num, digest, tmp
self
end
- def verse(h,o=nil) #part of poem decide how you deal with this
- of= @of #Symbol, classification - group
- is= :verse #Symbol, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- ocn_= if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ def verse(h,o=nil) #part of poem decide how you deal with this
+ of = @of #Symbol, classification - group
+ is = :verse #Symbol, classification - specific type
+ tags = h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj = h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx = h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn = h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv = h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp = h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent = h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ ocn_ = if h[:ocn_].nil?
+ ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
end
- num= h[:num] || ((defined? o.num) ? o.num : nil)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,num,digest,tmp
+ num = h[:num] || ((defined? o.num) ? o.num : nil)
+ digest = h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
+ tmp = h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=
+ of, is, tags, obj, idx, ocn, odv, osp, parent, note_, ocn_, num, digest, tmp
@h=nil
self
end
@@ -378,26 +397,28 @@ module SiSU_AO_DocumentStructure
@tags=[]
end
def table(h,o=nil)
- of= @of #Symbol, classification - group
- is= :table #Symbol, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- cols= h[:cols] || ((defined? o.cols) ? o.cols : nil)
- widths= h[:widths] || ((defined? o.widths) ? o.widths : nil)
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- head_= h[:head_] || ((defined? o.head_) ? o.head_ : false)
- note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- ocn_=if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of = @of #Symbol, classification - group
+ is = :table #Symbol, classification - specific type
+ tags = h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ cols = h[:cols] || ((defined? o.cols) ? o.cols : nil)
+ widths = h[:widths] || ((defined? o.widths) ? o.widths : nil)
+ obj = h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx = h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn = h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv = h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp = h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent = h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ head_ = h[:head_] || ((defined? o.head_) ? o.head_ : false)
+ note_ = h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
+ ocn_ = if h[:ocn_].nil?
+ ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
end
- num= h[:num] || ((defined? o.num) ? o.num : nil)
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@tags,@cols,@widths,@obj,@idx,@ocn,@odv,@osp,@parent,@head_,@note_,@ocn_,@num,@digest,@tmp=of,is,tags,cols,widths,obj,idx,ocn,odv,osp,parent,head_,note_,ocn_,num,digest,tmp
+ num = h[:num] || ((defined? o.num) ? o.num : nil)
+ digest = h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
+ tmp = h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ @of,@is,@tags,@cols,@widths,@obj,@idx,@ocn,@odv,@osp,@parent,@head_,@note_,@ocn_,@num,@digest,@tmp=
+ of, is, tags, cols, widths, obj, idx, ocn, odv, osp, parent, head_, note_, ocn_, num, digest, tmp
self
end
end
@@ -420,8 +441,9 @@ module SiSU_AO_DocumentStructure
osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- ocn_=if h[:ocn_].nil? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ ocn_=if h[:ocn_].nil?
+ ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
end
digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
@@ -507,7 +529,8 @@ module SiSU_AO_DocumentStructure
attr= h[:attr] || ((defined? o.attr) ? o.attr : nil) #String, text content
tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
num= h[:num] || ((defined? o.num) ? o.num : nil)
- @of,@is,@obj,@sym,@attr,@tmp,@num=of,is,obj,sym,attr,tmp,num
+ @of,@is,@obj,@sym,@attr,@tmp,@num=
+ of, is, obj, sym, attr, tmp, num
self
end
end