# File lib/squish.rb, line 477 def usedPrefixes (text) nslist = text.split(/\s+/) state='prefix' #Todo: investigate ruby constants mechanism content="" nslist.each { |item| if state =~ /prefix/ content=item state='for' elsif state =~ /for/ state = 'uri' elsif state =~ /uri/ self.xmlns[content]=item content="" state = 'prefix' elsif puts "TODO: parse USING clause properly!\n" end } return xmlns end