class XTemplate::XMLListener
Public Class Methods
Public Instance Methods
Source
# File lib/xtemplate/xml.rb, line 297 def attlistdecl(content) push_content("<!ATTLIST #{content}>") end
Source
# File lib/xtemplate/xml.rb, line 317 def cdata(s) push_content("<![CDATA[#{s}]]>") end
Source
# File lib/xtemplate/xml.rb, line 282 def comment(str) push_content("<!--#{str}-->") end
Source
# File lib/xtemplate/xml.rb, line 286 def doctype(root, pub_sys, long_name, uri) if( root && pub_sys && uri ) push_content("<!DOCTYPE #{root} #{pub_sys} \"#{long_name}\" \"#{uri}\">") elsif( root && pub_sys && !uri ) push_content("<!DOCTYPE #{root} #{pub_sys} \"#{long_name}\">") elsif( root && !pubid && !uri ) push_content("<!DOCTYPE #{root}>") end push_content(NEWLINE) end
Source
# File lib/xtemplate/xml.rb, line 301 def elementdecl(content) push_content("<!ELEMENT #{content}>") end
Source
# File lib/xtemplate/xml.rb, line 305 def entitydecl(contents) push_content("<!ENTITY #{contents.join(' ')}>") end
Source
# File lib/xtemplate/xml.rb, line 278 def instruction(target, pi) push_pi(target, pi) end
Source
# File lib/xtemplate/xml.rb, line 309 def notationdecl(content) push_content("<!NOTATION #{content}>") end
Source
# File lib/xtemplate/xml.rb, line 262 def tag_start(name, attrs) push_tag(name) attrs.each{|attr,val| push_attr(attr) push_attrval(val) } end
Source
# File lib/xtemplate/xml.rb, line 274 def text(str) push_content(REXML::Text::normalize(str)) end
Source
# File lib/xtemplate/xml.rb, line 321 def xmldecl(version, encoding, standalone) content = [] if( version ) content.push("version=\"#{version}\"") end if( encoding ) content.push("encoding=\"#{encoding}\"") end if( standalone ) content.push("standalone=\"#{standalone}\"") end push_content("<?xml #{content.join(' ')}?>", NEWLINE) end