# File lib/xtemplate/xpath.rb, line 612 def path_split(path) i = 0 l = 0 s = 0 ids = [] path.each_byte{|c| case c when ?{, ?[ l += 1 when ?}, ?] l -= 1 when ?/ if( l == 0 ) ids.push(path[s..i].chop) s = i + 1 end end i += 1 } ids.push(path[s..i]) if( path[0] == ?/ ) ids[0] = RootNode end ids end