tmiller     02/03/06 08:31:50

  Modified:    java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
  Log:
  bug fix 6850, Santiago Pericas-Geerston
  
  Revision  Changes    Path
  1.36      +13 -12    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Stylesheet.java
  
  Index: Stylesheet.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/Stylesheet.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- Stylesheet.java   1 Feb 2002 20:07:08 -0000       1.35
  +++ Stylesheet.java   6 Mar 2002 16:31:50 -0000       1.36
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: Stylesheet.java,v 1.35 2002/02/01 20:07:08 tmiller Exp $
  + * @(#)$Id: Stylesheet.java,v 1.36 2002/03/06 16:31:50 tmiller Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -878,6 +878,18 @@
                                           "("+OUTPUT_HANDLER_SIG+")V");
        il.append(new INVOKEVIRTUAL(index));
   
  +     // Compile buildKeys -- TODO: omit if not needed
  +     final String keySig = compileBuildKeys(classGen);
  +     final int    keyIdx = cpg.addMethodref(getClassName(),
  +                                            "buildKeys", keySig);
  +     il.append(classGen.loadTranslet());     // The 'this' pointer
  +     il.append(classGen.loadTranslet());
  +     il.append(new GETFIELD(domField));      // The DOM reference
  +     il.append(transf.loadIterator());       // Not really used, but...
  +     il.append(transf.loadHandler());        // The output handler
  +     il.append(new PUSH(cpg, DOM.ROOTNODE)); // Start with the root node
  +     il.append(new INVOKEVIRTUAL(keyIdx));
  +
        // Look for top-level elements that need handling
        final Enumeration toplevel = elements();
        if ((_globals.size() > 0) || (toplevel.hasMoreElements())) {
  @@ -896,17 +908,6 @@
            il.append(new INVOKEVIRTUAL(topLevelIdx));
        }
        
  -     final String keySig = compileBuildKeys(classGen);
  -     final int    keyIdx = cpg.addMethodref(getClassName(),
  -                                            "buildKeys", keySig);
  -     il.append(classGen.loadTranslet());     // The 'this' pointer
  -     il.append(classGen.loadTranslet());
  -     il.append(new GETFIELD(domField));      // The DOM reference
  -     il.append(transf.loadIterator());       // Not really used, but...
  -     il.append(transf.loadHandler());        // The output handler
  -     il.append(new PUSH(cpg, DOM.ROOTNODE)); // Start with the root node
  -     il.append(new INVOKEVIRTUAL(keyIdx));
  -
        // start document
        il.append(transf.loadHandler());
        il.append(transf.startDocument());
  
  
  

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

Reply via email to