On 12/11/01 7:21 AM, "James Strachan" <[EMAIL PROTECTED]> wrote:
> If we had this XML > > <foo>X <bar>Y</bar> Z</foo> > > And we evaluated the XPath expression > > * | text() > > We'd get > > Element(<bar>),. text('X'), text('Z') > > Rather than > > text('X'), element(<bar>), text('Z') > > So the document order is wrong. Basically because the XPath expressions are > evaluated in full and appended together by the union operator, rather than > intermingled in document order. > > I've heard Michael Kay say in the past that maintaining document order is > one of the hardest parts of XSLT. > > In simple terms for common path expressions like * | @* | text() or > whatever, we need to evaluate all of the expressions in the union on each > node as we navigate - rather than walking the tree entire for each > expression then concatenating the results together . > > I'm a bit heavily loaded until the towards the end of next week, does anyone > fancy diving in and taking a look? This could be quite hard to fix... > Greetings. I'm an acquaintance of a few here in this community (James, Bob, ?) and I am a new convert to dom4j, hence jaxen. While this is clearly a case of me knowing I am biting off way more than I can chew, since I found the bug, and I am in need of a fix, and I really am impressed with Jaxen via dom4j, I am going to look at it... <waiting for the guffaws to stop, wiping coffee off screens, drying tears, etc :) > Could someone give me a 2 second pointer where to look? I have been wandering about in the source. I think I am starting to get it, but its quite involved... I have a testcase that shows the problem (2 seconds...) and now looking where to start (2 hours...) Tia, and thanks for such a wonderful project. geir -- Geir Magnusson Jr. [EMAIL PROTECTED] System and Software Consulting Be a giant. Take giant steps. Do giant things... _______________________________________________ Jaxen-interest mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jaxen-interest