<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>spec/xml/object_spec.rb</filename>
    </added>
    <added>
      <filename>spec/xml/text_spec.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -9,6 +9,8 @@
 
   * attributes collected :as =&gt; [] were previously output improperly,
     as a single attribute on a single node
+  * don't output crazy, context-less namespaces and local-name xpaths
+    when trying to output namespaced attributes
 
 == 3.1.2 (October 18, 2009)
 </diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -95,7 +95,9 @@ in this case.
 
 === Namespace Support
 
-Namespaces are supported via the xml_namespace declaration and the :from and :namespace attr options.  See spec/xml/namespace_spec.rb for usage.
+Namespaced nodes are supported via the xml_namespace and xml_namespaces declarations and the :from and :namespace attr options.  See spec/xml/namespace_spec.rb for usage.
+
+Note that ROXML does not currently support outputting namespaced nodes.  This is planned for a future version.
 
 == Manipulation
 </diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,8 @@ Planned:
 
 v 3.2
 
+  * Support outputting namespaced attrs
+
   * Consider class_inheritable_attribute rather than superclass.try stuff.
 
   * Do some benchmarking</diff>
      <filename>TODO</filename>
    </modified>
    <modified>
      <diff>@@ -22,6 +22,7 @@ module ROXML # :nodoc:
     # Returns an XML object representing this object
     def to_xml(params = {})
       params.reverse_merge!(:name =&gt; self.class.tag_name, :namespace =&gt; self.class.roxml_namespace)
+      params[:namespace] = nil if ['*', 'xmlns'].include?(params[:namespace])
       XML::Node.create([params[:namespace], params[:name]].compact.join(':')).tap do |root|
         refs = (self.roxml_references.present? \
           ? self.roxml_references \</diff>
      <filename>lib/roxml.rb</filename>
    </modified>
    <modified>
      <diff>@@ -177,10 +177,10 @@ module ROXML
           xml.name = value
         elsif array?
           value.each do |v|
-            add(xml.add_child(XML::Node.create(xpath_name)), v)
+            add(xml.add_child(XML::Node.create(name)), v)
           end
         else
-          add(xml.add_child(XML::Node.create(xpath_name)), value)
+          add(xml.add_child(XML::Node.create(name)), value)
         end
       end
     end
@@ -294,7 +294,7 @@ module ROXML
         elsif value.is_a?(ROXML)
           xml.add_child(value.to_xml(params))
         else
-          node = XML::Node.create(xpath_name)
+          node = XML::Node.create(name)
           node.content = value.to_xml
           xml.add_child(node)
         end</diff>
      <filename>lib/roxml/xml/references.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ describe ROXML::XMLAttributeRef do
   &lt;node name=&quot;third&quot; /&gt;
 &lt;/myxml&gt;)
   end
-  
+
   context &quot;plain vanilla&quot; do
     before do
       @ref = ROXML::XMLAttributeRef.new(OpenStruct.new(:name =&gt; 'name', :wrapper =&gt; 'node', :array? =&gt; false), RoxmlObject.new)
@@ -36,4 +36,36 @@ describe ROXML::XMLAttributeRef do
       xml.to_s.squeeze(' ').should == @xml.root.to_s.squeeze(' ')
     end
   end
+  
+  context &quot;when the namespaces are different&quot; do
+    before do
+      @xml = ROXML::XML::Parser.parse %(
+      &lt;document&gt;
+      &lt;myxml xmlns=&quot;http://example.com/three&quot; xmlns:one=&quot;http://example.com/one&quot; xmlns:two=&quot;http://example.com/two&quot;&gt;
+        &lt;one:node name=&quot;first&quot; /&gt;
+        &lt;two:node name=&quot;second&quot; /&gt;
+        &lt;node name=&quot;third&quot; /&gt;
+      &lt;/myxml&gt;
+      &lt;/document&gt;
+      )
+    end
+
+    context &quot;with :namespace =&gt; '*'&quot; do
+      before do
+        @ref = ROXML::XMLAttributeRef.new(OpenStruct.new(:name =&gt; 'name', :wrapper =&gt; 'node', :array? =&gt; true, :namespace =&gt; '*'), RoxmlObject.new)
+      end
+
+      it &quot;should collect all instances&quot; do
+        pending &quot;Test bug?&quot;
+        @ref.value_in(@xml).should == [&quot;first&quot;, &quot;second&quot;, &quot;third&quot;]
+      end
+
+      it &quot;should output all instances with namespaces&quot; do
+        pending &quot;Full namespace write support&quot;
+        xml = ROXML::XML::Node.create('result')
+        @ref.update_xml(xml, [&quot;first&quot;, &quot;second&quot;, &quot;third&quot;])
+        xml.should == @xml.root
+      end
+    end
+  end
 end
\ No newline at end of file</diff>
      <filename>spec/xml/attributes_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -51,6 +51,7 @@ EOS
       it &quot;should reproduce the input xml&quot; do
         output = ROXML::XML::Document.new
         output.root = VApp.from_xml(@xml).to_xml
+        pending &quot;Full namespace write support&quot;
         output.should == ROXML::XML::Parser.parse(@xml)
       end
     end</diff>
      <filename>spec/xml/namespace_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>69a8077bd961b57271181ea7eaf728d526e90438</id>
    </parent>
  </parents>
  <author>
    <name>Ben Woosley</name>
    <email>ben.woosley@gmail.com</email>
  </author>
  <url>http://github.com/Empact/roxml/commit/055d96037ccd91013eed5818d6e53c3166b7bb8a</url>
  <id>055d96037ccd91013eed5818d6e53c3166b7bb8a</id>
  <committed-date>2009-10-26T22:26:31-07:00</committed-date>
  <authored-date>2009-10-26T22:26:31-07:00</authored-date>
  <message>Don't output crazy, context-less namespaces and local-name xpaths when trying to output namespaced attributes</message>
  <tree>d79762231fe0fc6ddad366c887f478513fcfe173</tree>
  <committer>
    <name>Ben Woosley</name>
    <email>ben.woosley@gmail.com</email>
  </committer>
</commit>
