sboag       01/06/17 19:16:15

  Modified:    java/src/org/apache/xpath/objects XStringForChars.java
                        XStringForFSB.java
  Log:
  Implement obj() as str(), since simply returning the FSB or char
  array will not be complete.  This fixes bugs in some extension
  functions, where the entire FSB was being translated into the
  string value.
  
  Revision  Changes    Path
  1.3       +12 -0     
xml-xalan/java/src/org/apache/xpath/objects/XStringForChars.java
  
  Index: XStringForChars.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xpath/objects/XStringForChars.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XStringForChars.java      2001/06/12 19:16:53     1.2
  +++ XStringForChars.java      2001/06/18 02:16:14     1.3
  @@ -94,6 +94,18 @@
       
       return m_strCache;
     }
  +  
  +
  +  /**
  +   * Since this object is incomplete without the length and the offset, we 
  +   * have to convert to a string when this function is called.
  +   *
  +   * @return The java String representation of this object.
  +   */
  +  public Object object()
  +  {
  +    return str();
  +  }
   
     /**
      * Directly call the
  
  
  
  1.3       +11 -0     
xml-xalan/java/src/org/apache/xpath/objects/XStringForFSB.java
  
  Index: XStringForFSB.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xpath/objects/XStringForFSB.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XStringForFSB.java        2001/06/12 19:16:53     1.2
  +++ XStringForFSB.java        2001/06/18 02:16:14     1.3
  @@ -153,6 +153,17 @@
   //  static java.util.Hashtable xtable = new java.util.Hashtable();
   
     /**
  +   * Since this object is incomplete without the length and the offset, we 
  +   * have to convert to a string when this function is called.
  +   *
  +   * @return The java String representation of this object.
  +   */
  +  public Object object()
  +  {
  +    return str();
  +  }
  +
  +  /**
      * Cast result object to a string.
      *
      * @return The string this wraps or the empty string if null
  
  
  

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

Reply via email to