From: Peter Fitzgibbons Date: 2005-10-26T00:44:56+09:00 Subject: Re: REXML::XPath results out of sort order ? ------=_Part_8666_31922828.1130255093094 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 10/21/05, daz wrote: > > > Peter Fitzgibbons wrote: > > Peter Fitzgibbons wrote: > > > > > > How do I find my current REXML version ? I'm using the default lib > > >installed with one-click 1.8.15 > > > > Oh, yes, I'm using 3.1.3. > > > There's a contradiction, somewhere (?) > > "One-click" 1.8.2-15 Stable Release (April 20, 2005) has REXML 3.1.2.1 > in Ruby 1.8.2 final (2004-12-25). > > > require 'rexml/document' > puts 'ruby %s (%s) [%s]' % [RUBY_VERSION, RUBY_RELEASE_DATE, > RUBY_PLATFORM] > puts REXML::Version > > xml =3D REXML::Document.new(File.read > ('D:\ruby\DfB\TEMP\clruby\___test.xml')) > mi =3D REXML:: XPath.match(xml, > '//HomesiteTree/Builder/Division/Workflow/Milestone') > > mi.each { |e| print ' ', e.elements['MsMilestoneId'].text }; puts > > #------------------------------------------ > > #-> ruby 1.8.2 (2004-12-25) [i386-mswin32] > #-> 3.1.2.1 > #-> 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 > 220 230 240 270 280 290 10 20 > > #------------------------------------------ > > #-> ruby 1.8.3 (2005-07-22) [i386-mswin32] > #-> 3.1.3 > #-> 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 20= 0 > 210 220 230 240 270 280 290 > > #------------------------------------------ > > > > So what's different then ? > > I *know* I'm using 3.1.3 :) > > It fixes several bugs relating to XPath result ordering. > The REXML tracker is down as I write, otherwise I'd give a link. > > If you're sure you're getting incorrect results using 3.1.3, > please submit a bug report to: > http://www.germane-software.com/projects/rexml/ > > As you can see from my tests - the 2nd result array is in order. > > The disorder of the 1st result seems to be different from yours > (first element of <80>) but maybe there's a random factor > associated with the bug in 3.1.2.1 (?) > > > daz > > > > > #-> ruby 1.8.2 (2004-12-25) [i386-mswin32] #-> 3.1.2.1 Yes, this is my result. I may have to update my system with ruby 1.8.3. On windows. Argh. ------=_Part_8666_31922828.1130255093094--