You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Zu...@external.mckinsey.com on 2007/02/01 14:00:47 UTC

Content is not allowed in prolog error

Hi ,

I have a pipeline , through which I am trying to aggregate some xml and 
later transform it through an xsl

like, 
         <map:match pattern="abc">
            <map:act type="request">
                        <map:generate 
src="http://abc.com?STRING={request-param:STRING}""/> 
                </map:act> 
                        <map:serialize type="xml"/>
            </map:match> 
and then i call this repeated in aggregate

<map:match pattern="aggabc">
              <map:aggregate element="abcagg">
                        <map:part 
src="http://localhost:9080/abc?STRING=a"/>
                        <map:part 
src="http://localhost:9080/abc?STRING=b"/>
                        <map:part 
src="http://localhost:9080/abc?STRING=c"/>
                </map:aggregate> 
        <map:transform type="xsltc" src="xyz.xsl"/>
         <map:serialize type="text"/>
       </map:match> 

Sometimes this runs successfully, sometimes it fails. The times when it 
fails is random and this is the what the error says
Could anybody throw some light on this:

Exception: org.xml.sax.SAXParseException: Content is not allowed in 
prolog.

        at 
com.documentum.xerces_2_3_0.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown 
Source)

        at 
com.documentum.xerces_2_3_0.xerces.util.ErrorHandlerWrapper.fatalError(Unknown 
Source)

        at 
com.documentum.xerces_2_3_0.xerces.impl.XMLErrorReporter.reportError(Unknown 
Source)

        at 
com.documentum.xerces_2_3_0.xerces.impl.XMLErrorReporter.reportError(Unknown 
Source)

        at 
com.documentum.xerces_2_3_0.xerces.impl.XMLScanner.reportFatalError(Unknown 
Source)

        at 
com.documentum.xerces_2_3_0.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown 
Source)

        at 
com.documentum.xerces_2_3_0.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)

        at 
com.documentum.xerces_2_3_0.xerces.parsers.DTDConfiguration.parse(Unknown 
Source)

        at com.documentum.xerce

Thanks, 
Zulfikar

+=========================================================+
This message may contain confidential and/or privileged
information.  If you are not the addressee or authorized to
receive this for the addressee, you must not use, copy,
disclose or take any action based on this message or any
information herein.  If you have received this message in
error, please advise the sender immediately by reply e-mail
and delete this message.  Thank you for your cooperation.
+=========================================================+

Re: Content is not allowed in prolog error

Posted by Jeroen Reijn <j....@hippo.nl>.
Hi Zulfikar,

from my experience I noticed the content is not allowed in prolog 
message when the XML markup of one of your XML fragments is not correct 
and starts with character data in front of the XML declaration or root 
node of your XML document.

Regards,

Jeroen Reijn

Zulfikar_Soni@external.mckinsey.com wrote:
> 
> Hi ,
> 
> I have a pipeline , through which I am trying to aggregate some xml and 
> later transform it through an xsl
> 
> like,
>           <map:match pattern="abc">
>             <map:act type="request">
>                         <map:generate 
> src="http://abc.com?STRING={request-param:STRING}""/>                   
>      
>                     </map:act>        
>                          <map:serialize type="xml"/>
>             </map:match>
> and then i call this repeated in aggregate
> 
> <map:match pattern="aggabc">
>               <map:aggregate element="abcagg">
>                         <map:part 
> src="http://localhost:9080/abc?STRING=a"/>
>                         <map:part 
> src="http://localhost:9080/abc?STRING=b"/>
>                         <map:part 
> src="http://localhost:9080/abc?STRING=c"/>
>                 </map:aggregate>        
>         <map:transform type="xsltc" src="xyz.xsl"/>
>          <map:serialize type="text"/>
>        </map:match>
> 
> Sometimes this runs successfully, sometimes it fails. The times when it 
> fails is random and this is the what the error says
> Could anybody throw some light on this:
> 
> Exception: org.xml.sax.SAXParseException: Content is not allowed in prolog.
> 
>         at 
> com.documentum.xerces_2_3_0.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown 
> Source)
> 
>         at 
> com.documentum.xerces_2_3_0.xerces.util.ErrorHandlerWrapper.fatalError(Unknown 
> Source)
> 
>         at 
> com.documentum.xerces_2_3_0.xerces.impl.XMLErrorReporter.reportError(Unknown 
> Source)
> 
>         at 
> com.documentum.xerces_2_3_0.xerces.impl.XMLErrorReporter.reportError(Unknown 
> Source)
> 
>         at 
> com.documentum.xerces_2_3_0.xerces.impl.XMLScanner.reportFatalError(Unknown 
> Source)
> 
>         at 
> com.documentum.xerces_2_3_0.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown 
> Source)
> 
>         at 
> com.documentum.xerces_2_3_0.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
> Source)
> 
>         at 
> com.documentum.xerces_2_3_0.xerces.parsers.DTDConfiguration.parse(Unknown 
> Source)
> 
>         at com.documentum.xerce
> 
> Thanks,
> Zulfikar
> 
> +=========================================================+
> This message may contain confidential and/or privileged
> information.  If you are not the addressee or authorized to
> receive this for the addressee, you must not use, copy,
> disclose or take any action based on this message or any
> information herein.  If you have received this message in
> error, please advise the sender immediately by reply e-mail
> and delete this message.  Thank you for your cooperation.
> +=========================================================+
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org