Sha256: c817c8286870aeeb0d78d2f654087a28576fe05aa75dc2136bb335ccc2000cb6
Contents?: true
Size: 1.48 KB
Versions: 1
Compression:
Stored size: 1.48 KB
Contents
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>process_attributes (Tailor)</title> <link rel=StyleSheet href="../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body bgcolor="white"> <pre><span class="cmt"># File tailor.rb, line 207</span> <span class="kw">def</span> process_attributes(xml_context, eval_context) elements = REXML::XPath.match(xml_context, <span class="str">'.//*[@attributes]'</span>) elements.each <span class="kw">do</span> |element| <span class="kw">begin</span> assignments = element.attributes[<span class="str">'attributes'</span>].split(<span class="str">'\\'</span>) assignments.each <span class="kw">do</span> |assignment| attribute_name, attribute_value = assignment.split(<span class="str">'='</span>) attribute_name.strip! attribute_value.strip! <span class="kw">if</span> element.attributes.has_key?(attribute_name) element.attributes[attribute_name] = eval(attribute_value.untaint, eval_context).to_s <span class="kw">end</span> <span class="kw">end</span> element.attributes.get_attribute(<span class="str">'attributes'</span>).remove <span class="kw">rescue</span> NameError <span class="kw">next</span> <span class="kw">end</span> <span class="kw">end</span> <span class="kw">end</span></pre> </body> </html>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mega-0.3.1 | pub/xml/xmltailor/rdoc/classes/Tailor.src/M000010.html |