DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13190>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13190

Reading from XSLTInputSource with an ifstream stops prematurely

           Summary: Reading from XSLTInputSource with an ifstream stops
                    prematurely
           Product: XalanC
           Version: 1.4.x
          Platform: Macintosh
        OS/Version: MacOS 9
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: XalanC
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When using an XSLTInputSource that has an ifstream to read from, the underlying file 
is 
read only partly. The reason is that StdBinInputStream uses ifstream::readsome() to 
read 
from the stream. According to the C++ specification readsome() should only read from 
the internal buffer and return 0 if the buffer contains no more character to read.
In Metrowerks CodeWarrior (version 8.2) the ifstream implementation does exactly that.
Using ifstream::read() or calling ifstream::peek() before calling readsome() fixes the 
problem.

Reply via email to