morten      01/12/11 02:11:19

  Modified:    java/src/org/apache/xalan/xsltc/compiler
                        ParentLocationPath.java
  Log:
  A fix for '//' expression trying to extract a node set relative to root.
  PR:           Bugzilla 5325
  Obtained from:        n/a
  Submitted by: [EMAIL PROTECTED]
  Reviewed by:  [EMAIL PROTECTED]
  
  Revision  Changes    Path
  1.14      +6 -3      
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ParentLocationPath.java
  
  Index: ParentLocationPath.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/ParentLocationPath.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ParentLocationPath.java   2001/11/08 10:23:39     1.13
  +++ ParentLocationPath.java   2001/12/11 10:11:19     1.14
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: ParentLocationPath.java,v 1.13 2001/11/08 10:23:39 morten Exp $
  + * @(#)$Id: ParentLocationPath.java,v 1.14 2001/12/11 10:11:19 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -213,9 +213,12 @@
        il.append(new INVOKESPECIAL(initSI));
   
        // This is a special case for the //* path with or without predicates
  -     if ((_path instanceof Step) && (_step instanceof Step)) {
  +     Expression stp = _step;
  +     if (stp instanceof ParentLocationPath)
  +         stp = ((ParentLocationPath)stp).getStep();
  +     if ((_path instanceof Step) && (stp instanceof Step)) {
            final int path = ((Step)_path).getAxis();
  -         final int step = ((Step)_step).getAxis();
  +         final int step = ((Step)stp).getAxis();
            if ((path == Axis.DESCENDANTORSELF && step == Axis.CHILD) ||
                (path == Axis.PRECEDING        && step == Axis.PARENT)) {
                final int incl = cpg.addMethodref(STEP_ITERATOR_CLASS,
  
  
  

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

Reply via email to