You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2001/10/05 15:48:19 UTC

DO NOT REPLY [Bug 3991] New: - compileStylesheet does not accept input streams

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=3991>.
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=3991

compileStylesheet does not accept input streams

           Summary: compileStylesheet does not accept input streams
           Product: XalanC
           Version: 1.2.x
          Platform: PC
        OS/Version: Windows 9x
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: XalanC
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: bschrager@neonsys.com


Forgive me if I get this wrong as I am new to all this.  The version of the 
XALAN code I am using is dated 8/16/01.

I am attempting to pre-compile a stylesheet from an input stream.  

istrstream theXSLStream(InputXSL, InputXSLLength);
theResult = theXalanTransformer.compileStylesheet(&theXSLStream, 
theCompiledStylesheet);

This produces an error: 

StreamTransform Error:
XSL Warning: Fatal Error at (file <unknown>, line 1, column 1): The main XML doc
ument cannot be empty, line 1, offset 1

However, when I pass the input stream directly to the transform process it 
works fine:

istrstream theXMLStream(InputXML, InputXMLLength);
istrstream theXSLStream(InputXSL, InputXSLLength);

theResult = theXalanTransformer.transform(&theXMLStream, &theXSLStream, 
&theOUTStream);

The compileStylesheet call also works fine if I replace the input stream with a 
file name as in:

char XSLinputfile[] = "d:/neon/xml/ficpln.xsl";

theResult = theXalanTransformer.compileStylesheet
(XSLinputfile,theCompiledStylesheet);

Please feel free to contact me for further information if required.

Thank you.

Barry Schrager