cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/xscript XScriptObjectInlineXML.java
Date Thu, 20 Jun 2002 04:28:11 GMT
vgritsenko    2002/06/19 21:28:11

  Modified:    src/java/org/apache/cocoon/components/xscript
                        XScriptObjectInlineXML.java
  Log:
  Must create InputSource with reader to avoid char to byte conversion and errors in it
  
  Revision  Changes    Path
  1.6       +17 -1     xml-cocoon2/src/java/org/apache/cocoon/components/xscript/XScriptObjectInlineXML.java
  
  Index: XScriptObjectInlineXML.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/xscript/XScriptObjectInlineXML.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XScriptObjectInlineXML.java	14 Apr 2002 00:45:29 -0000	1.5
  +++ XScriptObjectInlineXML.java	20 Jun 2002 04:28:10 -0000	1.6
  @@ -68,6 +68,7 @@
    * An <code>XScriptObject</code> created from an inline XML fragment.
    *
    * @author <a href="mailto:ovidiu@cup.hp.com">Ovidiu Predescu</a>
  + * @author <a href="mailto:vgritsenko@apache.org">Vadim Gritsenko</a>
    * @version CVS $Id$
    * @since July 7, 2001
    */
  @@ -102,9 +103,19 @@
     public InputStream getInputStream()
       throws ProcessingException, IOException
     {
  +    // FIXME(VG): This method should never be used because it
  +    // incorrectly converts characters into bytes.
       return new StringBufferInputStream(stringBuffer.toString());
     }
   
  +  public InputSource getInputSource()
  +    throws ProcessingException, IOException
  +  {
  +    InputSource is = new InputSource(new StringReader(stringBuffer.toString()));
  +    is.setSystemId(getSystemId());
  +    return is;
  +  }
  +
     public ContentHandler getContentHandler()
     {
       return streamHandler;
  @@ -123,6 +134,11 @@
     public long getContentLength()
     {
       return stringBuffer.length();
  +  }
  +
  +  public String getContent()
  +  {
  +    return stringBuffer.toString();
     }
   
     public String getSystemId()
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message