PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT
ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW
AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE
DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL
BE LOST SOMEWHERE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2903

*** shadow/2903 Mon Jul 30 13:26:34 2001
--- shadow/2903.tmp.29771       Mon Jul 30 13:27:52 2001
***************
*** 2,9 ****
  | DescendantIterator problems                                                |
  +----------------------------------------------------------------------------+
  |        Bug #: 2903                        Product: XalanJ2                 |
! |       Status: NEW                         Version: 2.2.x                   |
! |   Resolution:                            Platform: PC                      |
  |     Severity: Critical                 OS/Version: All                     |
  |     Priority: Other                     Component: Xalan                   |
  +----------------------------------------------------------------------------+
--- 2,9 ----
  | DescendantIterator problems                                                |
  +----------------------------------------------------------------------------+
  |        Bug #: 2903                        Product: XalanJ2                 |
! |       Status: RESOLVED                    Version: 2.2.x                   |
! |   Resolution: FIXED                      Platform: PC                      |
  |     Severity: Critical                 OS/Version: All                     |
  |     Priority: Other                     Component: Xalan                   |
  +----------------------------------------------------------------------------+
***************
*** 153,156 ****
  > > >Any idea why?
  > > >
  > > >Thanks-
! > > >Pete
--- 153,579 ----
  > > >Any idea why?
  > > >
  > > >Thanks-
! > > >Pete
! 
! ------- Additional Comments From [EMAIL PROTECTED]  2001-07-30 13:27 -------
! The major mistake is that I didn't calculate the fact that obviously 
! DescendantIterator can only have one named node test at the end.  Fixing that 
! (in isOptimizableForDescendantIterator) fixed most of the problems.  There were 
! several issues also in the DescendantIterator constructor for calculating the 
! offset for the named node test.
! 
! (BTW, not all of your list of 25 were creating DescendantIterators).
! 
! > is duplicative because the latter three conditions are already checked
! 
! Yep.  Fixed.
! 
! > Intermediate predicates seem to be ignored, even when they are not
! > "proximity-aware"
! 
! OK, I added a check for this condition in isOptimizableForDescendantIterator... 
! I punt if any but the last have a predicate.
! 
! > 4.  I haven't checked the actual iterator code but will it work if the
! > context node is an attribute, namespace, or text node?
! 
! It should, though I didn't add any specific tests for these.  TBD.
! 
! In the test below, I tried to make an instance of each of your 25 with full 
! name tests, and then repeated those with node() tests on all but the last 
! step.  Obviously I could add some tests with * also.  In the stylesheet, I 
! precedded each item with DS, meaning it is optimizable as a descendent 
! iterator, or NDS, meaning it is not.
! 
! ==== XML ====
! <?xml version="1.0"?>
! <far-north>
!  <north>
!   <near-north>
!    <far-west/>
!    <west/>
!    <near-west/>
!    <center>
!     <near-south>
!      <south>
!       <far-south/>
!      </south>
!     </near-south>
!    </center>
!    <near-east/>
!    <east/>
!    <far-east/>
!   </near-north>
!  </north>
! </far-north>
! 
! ==== XSL ===
! <?xml version="1.0"?>
! <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
! 
! <xsl:template match="north">
!   <out>
!   <!-- DS meands the location path is optimizable as a single descendant 
! iterator. -->
! DS   1. AC: <xsl:value-of select="name(/descendant-or-self::north)"/>
! DS   2. AD: <xsl:value-of select="name(/descendant::near-north)"/>
! DS   3. BC: <xsl:value-of select="name(self::node()/descendant-or-
! self::north)"/>
! DS   4. BD: <xsl:value-of select="name(self::node()/descendant::near-north)"/>
! NDS  5. CC: <xsl:value-of select="name(descendant-or-self::north/descendant-or-
! self::north)"/>
! NDS  6. CD: <xsl:value-of select="name(descendant-or-
! self::north/descendant::near-north)"/>
! NDS  7. CE: <xsl:value-of select="name(descendant-or-self::north/child::near-
! north)"/>
! NDS  8. DC: <xsl:value-of select="name(descendant::near-north/descendant-or-
! self::near-north)"/>
! NDS  9. DD: <xsl:value-of select="name(descendant::near-north/descendant::far-
! west)"/>
! 
! NDS 10. ACC: <xsl:value-of select="name(/descendant-or-self::north/descendant-
! or-self::north)"/>
! NDS 11. ACE: <xsl:value-of select="name(/descendant-or-self::north/child::near-
! north)"/>
! NDS 12. ADC: <xsl:value-of select="name(/descendant::near-north/descendant-or-
! self::near-north)"/>
! NDS 13. BCC: <xsl:value-of select="name(self::node()/descendant-or-
! self::north/descendant-or-self::north)"/>
! NDS 14. BCE: <xsl:value-of select="name(self::node()/descendant-or-
! self::north/child::near-north)"/>
! NDS 15. BDC: <xsl:value-of select="name(self::node()/descendant::near-
! north/descendant-or-self::far-west)"/>
! NDS 16. BDE: <xsl:value-of select="name(self::node()/descendant::near-
! north/child::far-west)"/>
! NDS 17. CCC: <xsl:value-of select="name(descendant-or-self::north/descendant-or-
! self::north/descendant-or-self::north)"/>
! NDS 18. CCE: <xsl:value-of select="name(descendant-or-self::north/descendant-or-
! self::north/child::near-north)"/>
! NDS 19. CDC: <xsl:value-of select="name(descendant-or-
! self::north/descendant::near-north/descendant-or-self::near-north)"/>
! NDS 20. CDE: <xsl:value-of select="name(descendant-or-
! self::north/descendant::near-north/child::far-west)"/>
! NDS 21. CEC: <xsl:value-of select="name(descendant-or-self::north/child::near-
! north/descendant-or-self::near-north)"/>
! NDS 22. CEE: <xsl:value-of select="name(descendant-or-self::north/child::near-
! north/child::far-west)"/>
! NDS 23. DCC: <xsl:value-of select="name(descendant::near-north/descendant-or-
! self::near-north/descendant-or-self::near-north)"/>
! NDS 24. DCE: <xsl:value-of select="name(descendant::near-north/descendant-or-
! self::near-north/child::far-west)"/>
! NDS 25. DDC: <xsl:value-of select="name(descendant::near-north/descendant::far-
! west/descendant-or-self::far-west)"/>
! 
! DS  26. CC: <xsl:value-of select="name(descendant-or-self::node()/descendant-or-
! self::north)"/>
! DS  27. CD: <xsl:value-of select="name(descendant-or-self::node
! ()/descendant::near-north)"/>
! DS  28. CE: <xsl:value-of select="name(descendant-or-self::node()/child::near-
! north)"/>
! DS  29. DC: <xsl:value-of select="name(descendant::node()/descendant-or-
! self::near-north)"/>
! DS  30. DD: <xsl:value-of select="name(descendant::node()/descendant::far-
! west)"/>
! 
! DS  31. ACC: <xsl:value-of select="name(/descendant-or-self::node()/descendant-
! or-self::north)"/>
! DS  32. ACE: <xsl:value-of select="name(/descendant-or-self::node()/child::near-
! north)"/>
! DS  33. ADC: <xsl:value-of select="name(/descendant::node()/descendant-or-
! self::near-north)"/>
! DS  34. BCC: <xsl:value-of select="name(self::node()/descendant-or-self::node
! ()/descendant-or-self::north)"/>
! DS  35. BCE: <xsl:value-of select="name(self::node()/descendant-or-self::node
! ()/child::near-north)"/>
! DS  36. BDC: <xsl:value-of select="name(self::node()/descendant::node
! ()/descendant-or-self::far-west)"/>
! DS  37. BDE: <xsl:value-of select="name(self::node()/descendant::node
! ()/child::far-west)"/>
! DS  38. CCC: <xsl:value-of select="name(descendant-or-self::node()/descendant-
! or-self::node()/descendant-or-self::north)"/>
! DS  39. CCE: <xsl:value-of select="name(descendant-or-self::node()/descendant-
! or-self::node()/child::near-north)"/>
! DS  40. CDC: <xsl:value-of select="name(descendant-or-self::node
! ()/descendant::node()/descendant-or-self::near-north)"/>
! DS  41. CDE: <xsl:value-of select="name(descendant-or-self::node
! ()/descendant::node()/child::far-west)"/>
! DS  42. CEC: <xsl:value-of select="name(descendant-or-self::node()/child::node
! ()/descendant-or-self::near-north)"/>
! DS  43. CEE: <xsl:value-of select="name(descendant-or-self::node()/child::node
! ()/child::far-west)"/>
! DS  44. DCC: <xsl:value-of select="name(descendant::node()/descendant-or-
! self::node()/descendant-or-self::near-north)"/>
! DS  45. DCE: <xsl:value-of select="name(descendant::node()/descendant-or-
! self::node()/child::far-west)"/>
! DS  46. DDC: <xsl:value-of select="name(descendant::node()/descendant::node
! ()/descendant-or-self::far-west)"/>
! 
!   </out>
! </xsl:template>
! 
! </xsl:stylesheet>
! ===========
! 
! The output, with DEBUG_ITERATOR_CREATION in the walker factory turned on, and a 
! debug statement in DescendantIterator#asNode, is below.  Note that not all the 
! paths are optimized that could be, but since this is mainly for the 
! optimizations of obvious patterns, I'm not going to worry about it right now.
! 
! I will check this test into the axes tests.
! 
! ==== OUTPUT ======
! node(), ChildIterator, 1000000000000010000000000000001, count: 1 NTANY|CH|
! 
! ., SelfIteratorNoPredicate, 1000010000000000000000000000001, count: 1 NTANY|.|
! 
! name(/descendant-or-self::north), DescendantIterator, 
! 101000000001000000000000000010, count: 2 DESCOS|R|
! 
! name(/descendant::near-north), DescendantIterator, 
! 1000000000100000000000000010, count: 2 DESC|R|
! 
! name(self::node()/descendant-or-self::north), DescendantIterator, 
! 1000010000001000000000000000010, count: 2 NTANY|DESCOS|.|
! 
! name(self::node()/descendant::near-north), DescendantIterator, 
! 1000010000000100000000000000010, count: 2 NTANY|DESC|.|
! 
! name(descendant-or-self::north/descendant-or-self::north), WalkingIterator, 
! 1000000000000000010, count: 2 DESCOS|
! 
! name(descendant-or-self::north/descendant::near-north), WalkingIterator, 
! 1100000000000000010, count: 2 DESC|DESCOS|
! 
! name(descendant-or-self::north/child::near-north), WalkingIteratorSorted, 
! 1010000000000000010, count: 2 CH|DESCOS|
! 
! name(descendant::near-north/descendant-or-self::near-north), WalkingIterator, 
! 1100000000000000010, count: 2 DESC|DESCOS|
! 
! name(descendant::near-north/descendant::far-west), WalkingIterator, 
! 100000000000000010, count: 2 DESC|
! 
! name(/descendant-or-self::north/descendant-or-self::north), WalkingIterator, 
! 101000000001000000000000000011, count: 3 DESCOS|R|
! 
! name(/descendant-or-self::north/child::near-north), WalkingIteratorSorted, 
! 101000000001010000000000000011, count: 3 CH|DESCOS|R|
! 
! name(/descendant::near-north/descendant-or-self::near-north), WalkingIterator, 
! 1000000001100000000000000011, count: 3 DESC|DESCOS|R|
! 
! name(self::node()/descendant-or-self::north/descendant-or-self::north), 
! WalkingIterator, 1000010000001000000000000000011, count: 3 NTANY|DESCOS|.|
! 
! name(self::node()/descendant-or-self::north/child::near-north), 
! WalkingIteratorSorted, 1000010000001010000000000000011, count: 3 
! NTANY|CH|DESCOS|.|
! 
! name(self::node()/descendant::near-north/descendant-or-self::far-west), 
! WalkingIterator, 1000010000001100000000000000011, count: 3 NTANY|DESC|DESCOS|.|
! 
! name(self::node()/descendant::near-north/child::far-west), 
! WalkingIteratorSorted, 1000010000000110000000000000011, count: 3 
! NTANY|CH|DESC|.|
! 
! name(descendant-or-self::north/descendant-or-self::north/descendant-or-
! self::north), WalkingIterator, 1000000000000000011, count: 3 DESCOS|
! 
! name(descendant-or-self::north/descendant-or-self::north/child::near-north), 
! WalkingIteratorSorted, 1010000000000000011, count: 3 CH|DESCOS|
! 
! name(descendant-or-self::north/descendant::near-north/descendant-or-self::near-
! north), WalkingIterator, 1100000000000000011, count: 3 DESC|DESCOS|
! 
! name(descendant-or-self::north/descendant::near-north/child::far-west), 
! WalkingIteratorSorted, 1110000000000000011, count: 3 CH|DESC|DESCOS|
! 
! name(descendant-or-self::north/child::near-north/descendant-or-self::near-
! north), WalkingIteratorSorted, 1010000000000000011, count: 3 CH|DESCOS|
! 
! name(descendant-or-self::north/child::near-north/child::far-west), 
! WalkingIteratorSorted, 1010000000000000011, count: 3 CH|DESCOS|
! 
! name(descendant::near-north/descendant-or-self::near-north/descendant-or-
! self::near-north), WalkingIterator, 1100000000000000011, count: 3 DESC|DESCOS|
! 
! name(descendant::near-north/descendant-or-self::near-north/child::far-west), 
! WalkingIteratorSorted, 1110000000000000011, count: 3 CH|DESC|DESCOS|
! 
! name(descendant::near-north/descendant::far-west/descendant-or-self::far-west), 
! WalkingIterator, 1100000000000000011, count: 3 DESC|DESCOS|
! 
! name(descendant-or-self::node()/descendant-or-self::north), DescendantIterator, 
! 1000000000001000000000000000010, count: 2 NTANY|DESCOS|
! 
! name(descendant-or-self::node()/descendant::near-north), DescendantIterator, 
! 1000000000001100000000000000010, count: 2 NTANY|DESC|DESCOS|
! 
! name(descendant-or-self::node()/child::near-north), DescendantIterator, 
! 1000000000001010000000000000010, count: 2 NTANY|CH|DESCOS|
! 
! name(descendant::node()/descendant-or-self::near-north), DescendantIterator, 
! 1000000000001100000000000000010, count: 2 NTANY|DESC|DESCOS|
! 
! name(descendant::node()/descendant::far-west), DescendantIterator, 
! 1000000000000100000000000000010, count: 2 NTANY|DESC|
! 
! name(/descendant-or-self::node()/descendant-or-self::north), WalkingIterator, 
! 1101000000001000000000000000011, count: 3 NTANY|DESCOS|R|
! 
! name(/descendant-or-self::node()/child::near-north), DescendantIterator, 
! 1101000000001010000000000000011, count: 3 NTANY|CH|DESCOS|R|
! 
! name(/descendant::node()/descendant-or-self::near-north), WalkingIterator, 
! 1001000000001100000000000000011, count: 3 NTANY|DESC|DESCOS|R|
! 
! name(self::node()/descendant-or-self::node()/descendant-or-self::north), 
! WalkingIterator, 1000010000001000000000000000011, count: 3 NTANY|DESCOS|.|
! 
! name(self::node()/descendant-or-self::node()/child::near-north), 
! DescendantIterator, 1000010000001010000000000000011, count: 3 NTANY|CH|DESCOS|.|
! 
! name(self::node()/descendant::node()/descendant-or-self::far-west), 
! WalkingIterator, 1000010000001100000000000000011, count: 3 NTANY|DESC|DESCOS|.|
! 
! name(self::node()/descendant::node()/child::far-west), DescendantIterator, 
! 1000010000000110000000000000011, count: 3 NTANY|CH|DESC|.|
! 
! name(descendant-or-self::node()/descendant-or-self::node()/descendant-or-
! self::north), WalkingIterator, 1000000000001000000000000000011, count: 3 
! NTANY|DESCOS|
! 
! name(descendant-or-self::node()/descendant-or-self::node()/child::near-north), 
! DescendantIterator, 1000000000001010000000000000011, count: 3 NTANY|CH|DESCOS|
! 
! name(descendant-or-self::node()/descendant::node()/descendant-or-self::near-
! north), WalkingIterator, 1000000000001100000000000000011, count: 3 
! NTANY|DESC|DESCOS|
! 
! name(descendant-or-self::node()/descendant::node()/child::far-west), 
! DescendantIterator, 1000000000001110000000000000011, count: 3 
! NTANY|CH|DESC|DESCOS|
! 
! name(descendant-or-self::node()/child::node()/descendant-or-self::near-north), 
! WalkingIteratorSorted, 1000000000001010000000000000011, count: 3 
! NTANY|CH|DESCOS|
! 
! name(descendant-or-self::node()/child::node()/child::far-west), 
! DescendantIterator, 1000000000001010000000000000011, count: 3 NTANY|CH|DESCOS|
! 
! name(descendant::node()/descendant-or-self::node()/descendant-or-self::near-
! north), WalkingIterator, 1000000000001100000000000000011, count: 3 
! NTANY|DESC|DESCOS|
! 
! name(descendant::node()/descendant-or-self::node()/child::far-west), 
! DescendantIterator, 1000000000001110000000000000011, count: 3 
! NTANY|CH|DESC|DESCOS|
! 
! name(descendant::node()/descendant::node()/descendant-or-self::far-west), 
! WalkingIterator, 1000000000001100000000000000011, count: 3 NTANY|DESC|DESCOS|
! 
! <?xml version="1.0" encoding="UTF-8"?>
! 
! 
! 
!  <out>
! 
!   
! 
! DS   1. AC:  (DescendantIterator) north
! 
! DS   2. AD:  (DescendantIterator) near-north
! 
! DS   3. BC:  (DescendantIterator) north
! 
! DS   4. BD:  (DescendantIterator) north
! 
! NDS  5. CC: north
! 
! NDS  6. CD: near-north
! 
! NDS  7. CE: near-north
! 
! NDS  8. DC: near-north
! 
! NDS  9. DD: far-west
! 
! 
! 
! NDS 10. ACC: north
! 
! NDS 11. ACE: near-north
! 
! NDS 12. ADC: near-north
! 
! NDS 13. BCC: north
! 
! NDS 14. BCE: near-north
! 
! NDS 15. BDC: far-west
! 
! NDS 16. BDE: far-west
! 
! NDS 17. CCC: north
! 
! NDS 18. CCE: near-north
! 
! NDS 19. CDC: near-north
! 
! NDS 20. CDE: far-west
! 
! NDS 21. CEC: near-north
! 
! NDS 22. CEE: far-west
! 
! NDS 23. DCC: near-north
! 
! NDS 24. DCE: far-west
! 
! NDS 25. DDC: far-west
! 
! 
! 
! DS  26. CC:  (DescendantIterator) north
! 
! DS  27. CD:  (DescendantIterator) near-north
! 
! DS  28. CE:  (DescendantIterator) near-north
! 
! DS  29. DC:  (DescendantIterator) near-north
! 
! DS  30. DD:  (DescendantIterator) far-west
! 
! 
! 
! DS  31. ACC: north
! 
! DS  32. ACE:  (DescendantIterator) far-north
! 
! DS  33. ADC: near-north
! 
! DS  34. BCC: north
! 
! DS  35. BCE:  (DescendantIterator) near-north
! 
! DS  36. BDC: far-west
! 
! DS  37. BDE:  (DescendantIterator) far-west
! 
! DS  38. CCC: north
! 
! DS  39. CCE:  (DescendantIterator) near-north
! 
! DS  40. CDC: near-north
! 
! DS  41. CDE:  (DescendantIterator) far-west
! 
! DS  42. CEC: near-north
! 
! DS  43. CEE:  (DescendantIterator) far-west
! 
! DS  44. DCC: near-north
! 
! DS  45. DCE:  (DescendantIterator) far-west
! 
! DS  46. DDC: far-west</out>

Reply via email to