--f46d040890fde93e6204b4795e88
Content-Type: text/plain; charset=ISO-8859-1

It appears that the same problem exists with Builder.  From
http://builder.rubyforge.org/:

"The order that attributes are inserted in markup tags is undefined."

Interestingly, though, the _special method exists, which is used by Builder
itself to enforce the ordering of XML attributes in the  XML processing
instruction typically found on the first line of an XML file.  In this
case, they ensure that the order is version, encoding, standalone:

 def instruct!(directive_tagml, attrs)
      _ensure_no_block ::Kernel::block_given?
      if directive_tag :xml
        a   :version1.0", :encodingUTF-8" }
        attrs  .merge attrs
    @encoding  ttrs[:encoding].downcase
      end
      _special(
        "<?#{directive_tag}",
        "?>",
        nil,
        attrs,
        [:version, :encoding, :standalone])
    end

-jon

--f46d040890fde93e6204b4795e88--