Class | XTemplate::XMLVisitor |
In: |
lib/xtemplate/xml.rb
|
Parent: | Object |
# File lib/xtemplate/xml.rb, line 206 def on_attr_charref_hex(code) push_attrval("&\#x#{'%x' % code};") end
# File lib/xtemplate/xml.rb, line 178 def on_charref_hex(code) push_content("&\#x#{'%x' % code};") end
# File lib/xtemplate/xml.rb, line 133 def on_doctype(root,pubid,sysid) if( pubid ) if( sysid ) push_content("<!DOCTYPE #{root} PUBLIC \"#{pubid}\" \"#{sysid}\">") else push_content("<!DOCTYPE #{root} PUBLIC \"#{pubid}\">") end else if( sysid ) push_content("<!DOCTYPE #{root} SYSTEM \"#{sysid}\">") else push_content("<!DOCTYPE #{root}>") end end push_content(NEWLINE) end
# File lib/xtemplate/xml.rb, line 185 def on_end_document #@root.add_child(NEWLINE) #$KCODE = @orig_kcode end
# File lib/xtemplate/xml.rb, line 217 def on_stag_end_empty(name) on_stag_end(name) on_etag(name) end
# File lib/xtemplate/xml.rb, line 116 def on_xmldecl_encoding(str) #$KCODE = str push_content(" encoding=\"#{str}\"") end
# File lib/xtemplate/xml.rb, line 125 def on_xmldecl_other(name,value) push_content(" #{name}=\"#{value}\"") end
# File lib/xtemplate/xml.rb, line 121 def on_xmldecl_standalone(str) push_content(" standalone=\"#{str}\"") end
# File lib/xtemplate/xml.rb, line 112 def on_xmldecl_version(str) push_content(" version=\"#{str}\"") end
# File lib/xtemplate/xml.rb, line 93 def parse_error(msg) raise(RuntimeError, "%s:%d:%s" % [@parser.path, @parser.lineno, msg]) end
# File lib/xtemplate/xml.rb, line 101 def valid_error(msg) raise(RuntimeError, "%s:%d:%s" % [@parser.path, @parser.lineno, msg]) end