ilene       2002/08/15 07:31:17

  Modified:    java/src/org/apache/xalan/templates FuncKey.java
               java/src/org/apache/xalan/transformer KeyTable.java
  Log:
  Patch for bug: "The key() function throws an exception when called in the context of 
a 
  local variable." reported on xalan-dev.
  
  Modified FuncKey.execute to use getDocumentRoot instead of getDocument.
  
  Revision  Changes    Path
  1.15      +1 -1      xml-xalan/java/src/org/apache/xalan/templates/FuncKey.java
  
  Index: FuncKey.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/templates/FuncKey.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- FuncKey.java      22 Mar 2002 01:04:40 -0000      1.14
  +++ FuncKey.java      15 Aug 2002 14:31:17 -0000      1.15
  @@ -104,7 +104,7 @@
       XNodeSet nodes = null;
       int context = xctxt.getCurrentNode();
       DTM dtm = xctxt.getDTM(context);
  -    int docContext = dtm.getDocument();
  +    int docContext = dtm.getDocumentRoot(context);
   
       if (DTM.NULL == docContext)
       {
  
  
  
  1.12      +2 -1      xml-xalan/java/src/org/apache/xalan/transformer/KeyTable.java
  
  Index: KeyTable.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/KeyTable.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- KeyTable.java     22 Mar 2002 01:04:41 -0000      1.11
  +++ KeyTable.java     15 Aug 2002 14:31:17 -0000      1.12
  @@ -126,7 +126,8 @@
       m_keyNodes = new XNodeSet(ki);
       m_keyNodes.allowDetachToRelease(false);
       
  -    m_keyNodes.setRoot(xctxt.getDTM(doc).getDocument(), xctxt);
  +    m_keyNodes.setRoot(doc, xctxt);
  +
     }  
   
     /**
  
  
  

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

Reply via email to