Carmona Perez, David wrote:

Hi all,

I have a problem with Cocoon that I find a little hard to debug.

My pipeline is something like:

<map:read src="myfile.xml"/>

<map:read>????

<map:transform type="xinclude"/>
<!--Till here XML received is well formed-->
<map:transform type="saxon" src="mystylesheet.xsl"/>
<map:generate type="html"/>


If you get content is not allowed in prolog, look for characters before the <?xml tag at the beginning of your files. From the stacktrace, I'd look at your XSLTs first. Basically, the <? should be ABSOLUTELY the first characters in the file. No spaces, no newlines.

Upayavira

And receive the following exception (inside Xerces and Saxon):

org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:232)
        at 
org.apache.xerces.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:213)
        at 
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:385)
        at 
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:315)
        at org.apache.xerces.impl.XMLScanner.reportFatalError(XMLScanner.java:1309)
        at 
org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:809)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:350)
        at 
org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:220)
        at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:595)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
        at 
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1162)
        at com.icl.saxon.om.Builder.build(Builder.java:265)
        at com.icl.saxon.functions.Document.makeDoc(Document.java:228)
        at com.icl.saxon.functions.Document.getDocuments(Document.java:134)
        at com.icl.saxon.functions.Document.evaluate(Document.java:70)
        at 
com.icl.saxon.style.XSLGeneralVariable.getSelectValue(XSLGeneralVariable.java:251)
        at com.icl.saxon.style.XSLParam.process(XSLParam.java:76)
        at com.icl.saxon.style.StyleElement.processChildren(StyleElement.java:634)
        at com.icl.saxon.style.XSLTemplate.expand(XSLTemplate.java:225)
        at com.icl.saxon.style.XSLTemplate.start(XSLTemplate.java:198)

How can I guess where it is happening? A breakpoint doesn't help much.
Even though this error, I get correct results.  The problem is that the logs get full 
and slows my app.

Thanks in advance for any help.

David.

*************************************************************
Este correo ha sido procesado por el Antivirus del Grupo FCC.
*************************************************************

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







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



Reply via email to