Mike, this is fixed with my latest checkin.  If you'll file a proper bug
report in bugzilla (http://nagoya.apache.org/bugzilla/), I'll create a
proper regression test against it.

Please let me know if you can build from the CVS, or if you would like me
to send you a latest build jar.

Since this is a pretty nasty/ugly bug, and since a few other important bugs
were fixed last week, we should probably spin a 2_2_D10 real soon.
However, I think I'm too backed up this week to do it myself.  Any
volunteers?  It would be neat to get non-Lotus folks spinning developer
builds once in a while!  (one of these days we'll be so automated, we'll be
able to just type a simple command on the server and have everything happen
automatically...)  [There might be some way to get the latest from Gump,
though I'm not sure how, and it wouldn't be numbered properly...]

-scott




                                                                                       
                            
                    Scott Boag                                                         
                            
                                         To:     [EMAIL PROTECTED]              
                            
                    08/20/2001           cc:                                           
                            
                    05:29 PM             Subject:     Re: Xalan-J 2_2_D9 Bug -- 
XPathAPI.selectNodeList hangs      
                                         (Document link: Scott Boag)                   
                            
                                                                                       
                            



I believe this is related to an optimization I did week-before-last, having
to do with not continuing the search once an indexed node is found.  It
occurs in unions with literal positional predicates.  Myriam (who just left
on vacation for a week) thinks she has a fix, but I want to review it
before checking it in.

Sorry for the problem.

-scott




                                                                                       
                            
                    Mike Starr                                                         
                            
                    <mike.starr@ai       To:     "'[EMAIL PROTECTED]'" 
<[EMAIL PROTECTED]>           
                    r2web.com>           cc:     (bcc: Scott Boag/CAM/Lotus)           
                            
                                         Subject:     Xalan-J 2_2_D9 Bug -- 
XPathAPI.selectNodeList hangs          
                    08/16/01 06:09                                                     
                            
                    PM                                                                 
                            
                    Please respond                                                     
                            
                    to xalan-dev                                                       
                            
                                                                                       
                            
                                                                                       
                            




This worked with Xalan 2_2_D6 and hangs in 2_2_D9.  The problem is centered
around the "branch[2]" part of the XPath expression.  Seems that if the
number of branch elements in the test case is equal to or greater than the
XPath qualifier number, selectNodeList hangs. Otherwise it returns
correctly.  For example, if I comment out the second branch element, it
does
not hang and returns the NodeList.

-Mike

My sample xml file:

<?xml version="1.0" ?>
 <a2wml version="2.0">
           <card id="b">
              <prompt>
                 this is a prompt
              </prompt>
              <branch target="#c" label="c"/>
              <branch target="#f" type="options" label="f"/>
           </card>
  </a2wml>


My java code:

    public static void main(String args[])
    {

        try
        {
            //parse test case
            DocumentBuilderFactory dbf =
DocumentBuilderFactory.newInstance();
            dbf.setValidating(false);
            DocumentBuilder db = dbf.newDocumentBuilder();
            InputSource in = new InputSource(new FileReader(args[0]));
            Document doc = db.parse(in);

            //make the card the context node
            Node ctx = doc.getElementsByTagName("card").item(0);

            NodeList nl = XPathAPI.selectNodeList (ctx, "prompt |
branch[2]");
            System.out.println("nodelist.length:" + nl.getLength());
        } catch (Exception e)
        {
            e.printStackTrace();
        }

    }






Reply via email to