Ok, weird I accidently deleted that commend... anyway, this code would be better I think:

<pre>
@schema.validate(@xml).each do |error| 
  validation_error("#{error.message}\n\n#{@xml.to_s}") unless soft
end.empty?
</pre>