You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/06/18 04:16:15 UTC

cvs commit: xml-xalan/java/src/org/apache/xpath/objects XStringForChars.java XStringForFSB.java

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: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org