Class | XTemplate::XMLListener |
In: |
lib/xtemplate/xml.rb
|
Parent: | Object |
# File lib/xtemplate/xml.rb, line 298 def attlistdecl(content) push_content("<!ATTLIST #{content}>") end
# File lib/xtemplate/xml.rb, line 287 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
# File lib/xtemplate/xml.rb, line 302 def elementdecl(content) push_content("<!ELEMENT #{content}>") end
# File lib/xtemplate/xml.rb, line 306 def entitydecl(contents) push_content("<!ENTITY #{contents.join(' ')}>") end
# File lib/xtemplate/xml.rb, line 310 def notationdecl(content) push_content("<!NOTATION #{content}>") end
# File lib/xtemplate/xml.rb, line 263 def tag_start(name, attrs) push_tag(name) attrs.each{|attr,val| push_attr(attr) push_attrval(val) } end
# File lib/xtemplate/xml.rb, line 322 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