# File rss/parser.rb, line 288
def instruction(name, content)
if name == "xml-stylesheet"
params = parse_pi_content(content)
if params.has_key?("href")
@xml_stylesheets << XMLStyleSheet.new(*params)
end
end
end
# File rss/parser.rb, line 321
def tag_end(name)
if DEBUG
p "end tag #{name}"
p @tag_stack
end
text = @text_stack.pop
tags = @tag_stack.pop
pr = @proc_stack.pop
pr.call(text, tags) unless pr.nil?
@ns_stack.pop
end
# File rss/parser.rb, line 297
def tag_start(name, attributes)
@text_stack.push('')
ns = @ns_stack.last.dup
attrs = {}
attributes.each do |n, v|
if /\Axmlns(?:\z|:)/ =~ n
ns[$POSTMATCH] = v
else
attrs[n] = v
end
end
@ns_stack.push(ns)
prefix, local = split_name(name)
@tag_stack.last.push([_ns(ns, prefix), local])
@tag_stack.push([])
if respond_to?("start_#{local}", true)
__send__("start_#{local}", local, prefix, attrs, ns.dup)
else
start_else_element(local, prefix, attrs, ns.dup)
end
end