on_attr_charref(code)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def on_attr_charref(code)
  @current_attr << [code].pack('U')
end
             
             
            
           
          
          
          
          
         
      
        
          
          
          
            on_attr_charref_hex(code)
            click to toggle source
          
          
          
  
            
            
            
            
          
          
          
          
          
         
      
        
          
          
          
            on_attr_entityref(ref)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def on_attr_entityref(ref)
  @current_attr << entity(ref)
end
             
             
            
           
          
          
         
      
        
          
          
          
            on_attr_value(str)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def on_attr_value(str)
  @current_attr << str
end
             
             
            
           
          
          
         
      
        
          
          
          
            on_attribute(name)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def on_attribute(name)
  @attrs[name] = @current_attr = ''
end
             
             
            
           
          
          
         
      
        
          
          
          
            on_charref(code)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def on_charref(code)
  text([code].pack('U'))
end
             
             
            
           
          
          
          
          
         
      
        
          
          
          
            on_charref_hex(code)
            click to toggle source
          
          
          
  
            
            
            
            
          
          
          
          
          
         
      
        
          
          
          
            on_entityref(ref)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def on_entityref(ref)
  text(entity(ref))
end
             
             
            
           
          
          
         
      
        
          
          
          
            on_etag(name)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def on_etag(name)
  tag_end(name)
end
             
             
            
           
          
          
         
      
        
          
          
          
            on_stag(name)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def on_stag(name)
  @attrs = {}
end
             
             
            
           
          
          
         
      
        
          
          
          
            on_stag_end(name)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def on_stag_end(name)
  tag_start(name, @attrs)
end
             
             
            
           
          
          
         
      
        
          
          
          
            on_stag_end_empty(name)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def on_stag_end_empty(name)
  tag_start(name, @attrs)
  tag_end(name)
end
             
             
            
           
          
          
         
      
        
          
          
          
            on_xmldecl_encoding(str)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def on_xmldecl_encoding(str)
  @encoding = str
end
             
             
            
           
          
          
         
      
        
          
          
          
            on_xmldecl_end()
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def on_xmldecl_end
  xmldecl(@version, @encoding, @standalone == "yes")
end
             
             
            
           
          
          
         
      
        
          
          
          
            on_xmldecl_standalone(str)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def on_xmldecl_standalone(str)
  @standalone = str
end
             
             
            
           
          
          
         
      
        
          
          
          
            on_xmldecl_version(str)
            click to toggle source
          
          
          
  
            
            
            
            
            
               
               
def on_xmldecl_version(str)
  @version = str
end