sboag       01/05/15 10:57:31

  Modified:    java/src/org/apache/xml/dtm/sax2dtm Tag: DTM_EXP
                        SAX2DTM.java
  Log:
  In getElementById, if the id does not yield an element, call nextNode()
  until either the id does yield an element, or nextNode() returns
  false.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.9   +15 -6     
xml-xalan/java/src/org/apache/xml/dtm/sax2dtm/Attic/SAX2DTM.java
  
  Index: SAX2DTM.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/sax2dtm/Attic/SAX2DTM.java,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- SAX2DTM.java      2001/05/15 16:08:38     1.1.2.8
  +++ SAX2DTM.java      2001/05/15 17:57:26     1.1.2.9
  @@ -1116,12 +1116,21 @@
     public int getElementById(String elementId)
     {
   
  -    Integer intObj = (Integer) m_idAttributes.get(elementId);
  -
  -    if (null != intObj)
  -      return intObj.intValue();
  -    else
  -      return DTM.NULL;
  +    Integer intObj;
  +    
  +    do
  +    {
  +      intObj = (Integer) m_idAttributes.get(elementId);
  +  
  +      if (null != intObj)
  +        return intObj.intValue();
  +      
  +      if(false == nextNode())
  +        break;
  +    }
  +      while(null == intObj);
  +    
  +    return DTM.NULL;
     }
   
     /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to