sboag       01/01/03 02:14:59

  Modified:    java/src/org/apache/xpath/axes DescendantWalker.java
  Log:
  Since an attribute can have a child in the DOM, but not in XSLT,
  check for attributes before calling getFirstChild.
  
  Revision  Changes    Path
  1.5       +3 -2      
xml-xalan/java/src/org/apache/xpath/axes/DescendantWalker.java
  
  Index: DescendantWalker.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xpath/axes/DescendantWalker.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DescendantWalker.java     2000/12/17 17:40:00     1.4
  +++ DescendantWalker.java     2001/01/03 10:14:59     1.5
  @@ -131,8 +131,9 @@
      */
     public Node firstChild()
     {
  -
  -    Node next = m_currentNode.getFirstChild();
  +    
  +    Node next = (m_currentNode.getNodeType() != Node.ATTRIBUTE_NODE) ?
  +                m_currentNode.getFirstChild() : null;
   
       m_nextLevelAmount = (null == next) ? 0 : (next.hasChildNodes() ? 1 : 0);
   
  
  
  

Reply via email to